Mercurial > repos > bgruening > chemfp
comparison mol2fps.xml @ 38:02e03ac072cf draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/chemfp commit ed9b6859de648aa5f7cde483732f5df20aaff90e
author | bgruening |
---|---|
date | Tue, 07 May 2019 13:19:01 -0400 |
parents | 73b8c87779ae |
children | 0a1c281e9224 |
comparison
equal
deleted
inserted
replaced
37:ea7557bd4635 | 38:02e03ac072cf |
---|---|
1 <tool id="ctb_chemfp_mol2fps" name="Molecules to Fingerprints" version="0.3.0"> | 1 <tool id="ctb_chemfp_mol2fps" name="Molecule to fingerprint" version="1.5"> |
2 <description>with different fingerprint types</description> | 2 <description>conversion to several different fingerprint formats</description> |
3 <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" merge_outputs="outfile"></parallelism--> | 3 <!--parallelism method="multi" split_inputs="infile" split_mode="to_size" split_size="10000" merge_outputs="outfile"></parallelism--> |
4 <requirements> | 4 <requirements> |
5 <requirement type="package" version="1.1p1">chemfp</requirement> | 5 <requirement type="package" version="1.5">chemfp</requirement> |
6 <requirement type="package" version="2016.03.3">rdkit</requirement> | 6 <requirement type="package" version="2018.09.3">rdkit</requirement> |
7 <requirement type="package" version="2.4.1">openbabel</requirement> | 7 <requirement type="package" version="2.4.1">openbabel</requirement> |
8 </requirements> | 8 </requirements> |
9 <command> | 9 <command> |
10 <![CDATA[ | 10 <![CDATA[ |
11 #set $fptype = $fp_opts.fp_opts_selector | 11 |
12 | 12 #if $fp_opts.fp_opts_selector in ['--FP2', '--FP3', '--FP4', '--MACCS']: |
13 #if $fptype in ['--FP2', '--FP3', '--FP4', '--MACCS']: | |
14 ## Open Babel fingerprints | 13 ## Open Babel fingerprints |
15 ob2fps $fptype --in '${infile.ext}' '${infile}' -o '${outfile}' | 14 ob2fps $fp_opts.fp_opts_selector --in '${infile.ext}' '${infile}' -o '${outfile}' --out 'fps' |
16 #else: | 15 #else: |
17 ## RDKit fingerprints | 16 ## RDKit fingerprints |
18 rdkit2fps --in '${infile.ext}' '${infile}' -o '${outfile}' | 17 rdkit2fps --in '${infile.ext}' '${infile}' -o '${outfile}' --out 'fps' |
19 #if $fp_opts.fp_opts_selector == "--RDK": | 18 #if $fp_opts.fp_opts_selector == "--RDK": |
20 --RDK | 19 --RDK |
21 --fpSize $fp_opts.fpSize | 20 --fpSize $fp_opts.fpSize |
22 --minPath $fp_opts.minPath | 21 --minPath $fp_opts.minPath |
23 --maxPath $fp_opts.maxPath | 22 --maxPath $fp_opts.maxPath |
33 --radius $fp_opts.radius | 32 --radius $fp_opts.radius |
34 $fp_opts.useFeatures | 33 $fp_opts.useFeatures |
35 $fp_opts.useChirality | 34 $fp_opts.useChirality |
36 $fp_opts.useBondTypes | 35 $fp_opts.useBondTypes |
37 #elif $fp_opts.fp_opts_selector == "--pairs": | 36 #elif $fp_opts.fp_opts_selector == "--pairs": |
38 --paris | 37 --pairs |
39 --fpSize $fp_opts.fpSize | 38 --fpSize $fp_opts.fpSize |
40 --minLength $fp_opts.minLength | 39 --minLength $fp_opts.minLength |
41 --maxLength $fp_opts.maxLength | 40 --maxLength $fp_opts.maxLength |
42 #elif $fp_opts.fp_opts_selector == "--maccs166": | 41 #elif $fp_opts.fp_opts_selector == "--maccs166": |
43 --maccs166 | 42 --maccs166 |
47 #end if | 46 #end if |
48 --errors report 2>&1 | 47 --errors report 2>&1 |
49 ]]> | 48 ]]> |
50 </command> | 49 </command> |
51 <inputs> | 50 <inputs> |
52 <param name="infile" type='data' format="sdf,smi,mol,mol2,cml,inchi" label="molecule file"/> | 51 <param name="infile" type='data' format="sdf,smi,mol,mol2,cml,inchi" label="Molecule file"/> |
53 <conditional name="fp_opts"> | 52 <conditional name="fp_opts"> |
54 <param name="fp_opts_selector" type="select" label="Type of fingerprint"> | 53 <param name="fp_opts_selector" type="select" label="Type of fingerprint"> |
55 <option value='--FP2' selected="True">Open Babel FP2 fingerprints</option> | 54 <option value='--FP2' selected="True">Open Babel FP2 fingerprints</option> |
56 <option value='--FP3'>Open Babel FP3 fingerprints</option> | 55 <option value='--FP3'>Open Babel FP3 fingerprints</option> |
57 <option value='--FP4'>Open Babel FP4 fingerprints</option> | 56 <option value='--FP4'>Open Babel FP4 fingerprints</option> |
66 <when value="--FP2" /> | 65 <when value="--FP2" /> |
67 <when value="--FP3" /> | 66 <when value="--FP3" /> |
68 <when value="--FP4" /> | 67 <when value="--FP4" /> |
69 <when value="--MACCS" /> | 68 <when value="--MACCS" /> |
70 <when value="--RDK"> | 69 <when value="--RDK"> |
71 <param name="fpSize" type="integer" value="2048" label="number of bits in the fingerprint" help=""> | 70 <param name="fpSize" type="integer" value="2048" label="Number of bits in the fingerprint" help=""> |
72 <validator type="in_range" min="1" /> | 71 <validator type="in_range" min="1" /> |
73 </param> | 72 </param> |
74 <param name="minPath" type="integer" value="1" label="minimum number of bonds to include in the subgraph" help=""> | 73 <param name="minPath" type="integer" value="1" label="Minimum number of bonds to include in the subgraph" help=""> |
75 <validator type="in_range" min="1" /> | 74 <validator type="in_range" min="1" /> |
76 </param> | 75 </param> |
77 <param name="maxPath" type="integer" value="7" label="maximum number of bonds to include in the subgraph" help=""> | 76 <param name="maxPath" type="integer" value="7" label="Maximum number of bonds to include in the subgraph" help=""> |
78 <validator type="in_range" min="1" /> | 77 <validator type="in_range" min="1" /> |
79 </param> | 78 </param> |
80 <param name="nBitsPerHash" type="integer" value="4" label="number of bits to set per path" help=""> | 79 <param name="nBitsPerHash" type="integer" value="4" label="Number of bits to set per path" help=""> |
81 <validator type="in_range" min="1" /> | 80 <validator type="in_range" min="1" /> |
82 </param> | 81 </param> |
83 <param name="useHs" type="boolean" truevalue="--useHs 1" falsevalue="--useHs 0" checked="true" | 82 <param name="useHs" type="boolean" truevalue="--useHs 1" falsevalue="--useHs 0" checked="true" |
84 label="include information about the number of hydrogens on each atom" /> | 83 label="Include information about the number of hydrogens on each atom" /> |
85 </when> | 84 </when> |
86 <when value="--torsions"> | 85 <when value="--torsions"> |
87 <param name="fpSize" type="integer" value="2048" label="number of bits in the fingerprint" help=""> | 86 <param name="fpSize" type="integer" value="2048" label="Number of bits in the fingerprint" help=""> |
88 <validator type="in_range" min="1" /> | 87 <validator type="in_range" min="1" /> |
89 </param> | 88 </param> |
90 <param name="targetSize" type="integer" value="4" label="number of target bits in the fingerprint" help=""> | 89 <param name="targetSize" type="integer" value="4" label="Number of target bits in the fingerprint" help=""> |
91 <validator type="in_range" min="1" /> | 90 <validator type="in_range" min="1" /> |
92 </param> | 91 </param> |
93 </when> | 92 </when> |
94 <when value="--morgan"> | 93 <when value="--morgan"> |
95 <param name="fpSize" type="integer" value="2048" label="number of bits in the fingerprint" help=""> | 94 <param name="fpSize" type="integer" value="2048" label="Number of bits in the fingerprint" help=""> |
96 <validator type="in_range" min="1" /> | 95 <validator type="in_range" min="1" /> |
97 </param> | 96 </param> |
98 <param name="radius" type="integer" value="2" label="radius for the Morgan algorithm" help=""> | 97 <param name="radius" type="integer" value="2" label="Radius for the Morgan algorithm" help=""> |
99 <validator type="in_range" min="1" /> | 98 <validator type="in_range" min="1" /> |
100 </param> | 99 </param> |
101 <param name="useFeatures" type="boolean" truevalue="--useFeatures 1" falsevalue="--useFeatures 0" checked="false" | 100 <param name="useFeatures" type="boolean" truevalue="--useFeatures 1" falsevalue="--useFeatures 0" checked="false" |
102 label="include information about the number of hydrogens on each atom" /> | 101 label="Include information about the number of hydrogens on each atom" /> |
103 <param name="useChirality" type="boolean" truevalue="--useChirality 1" falsevalue="--useChirality 0" checked="false" | 102 <param name="useChirality" type="boolean" truevalue="--useChirality 1" falsevalue="--useChirality 0" checked="false" |
104 label="include information about the number of hydrogens on each atom" /> | 103 label="Include information about the number of hydrogens on each atom" /> |
105 <param name="useBondTypes" type="boolean" truevalue="--useBondTypes 1" falsevalue="--useBondTypes 0" checked="true" | 104 <param name="useBondTypes" type="boolean" truevalue="--useBondTypes 1" falsevalue="--useBondTypes 0" checked="true" |
106 label="include information about the number of hydrogens on each atom" /> | 105 label="Include information about the number of hydrogens on each atom" /> |
107 </when> | 106 </when> |
108 <when value="--pairs"> | 107 <when value="--pairs"> |
109 <param name="fpSize" type="integer" value="2048" label="number of bits in the fingerprint" help=""> | 108 <param name="fpSize" type="integer" value="2048" label="Number of bits in the fingerprint" help=""> |
110 <validator type="in_range" min="1" /> | 109 <validator type="in_range" min="1" /> |
111 </param> | 110 </param> |
112 <param name="minLength" type="integer" value="1" label="minimum bond count for a pair" help=""> | 111 <param name="minLength" type="integer" value="1" label="Minimum bond count for a pair" help=""> |
113 <validator type="in_range" min="1" /> | 112 <validator type="in_range" min="1" /> |
114 </param> | 113 </param> |
115 <param name="maxLength" type="integer" value="30" label="maximum bond count for a pair" help=""> | 114 <param name="maxLength" type="integer" value="30" label="Maximum bond count for a pair" help=""> |
116 <validator type="in_range" min="1" /> | 115 <validator type="in_range" min="1" /> |
117 </param> | 116 </param> |
118 </when> | 117 </when> |
119 <when value="--maccs166" /> | 118 <when value="--maccs166" /> |
120 <when value="--substruct" /> | 119 <when value="--substruct" /> |
126 </outputs> | 125 </outputs> |
127 <tests> | 126 <tests> |
128 <!-- FP2 --> | 127 <!-- FP2 --> |
129 <test> | 128 <test> |
130 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> | 129 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> |
131 <param name="fp_opts.fp_opts_selector" value="--FP2" /> | 130 <conditional name="fp_opts"> |
131 <param name="fp_opts_selector" value="--FP2" /> | |
132 </conditional> | |
132 <output name="outfile" file="CID_2244_FP2.fps" ftype="fps" lines_diff="4"/> | 133 <output name="outfile" file="CID_2244_FP2.fps" ftype="fps" lines_diff="4"/> |
133 </test> | 134 </test> |
134 <test> | 135 <test> |
135 <param name="infile" value="CID_2244.smi" ftype="smi" /> | 136 <param name="infile" value="CID_2244.smi" ftype="smi" /> |
136 <param name="fp_opts.fp_opts_selector" value="--FP2" /> | 137 <conditional name="fp_opts"> |
138 <param name="fp_opts_selector" value="--FP2" /> | |
139 </conditional> | |
137 <output name="outfile" file="CID_2244_FP2.fps" ftype="fps" lines_diff="4"/> | 140 <output name="outfile" file="CID_2244_FP2.fps" ftype="fps" lines_diff="4"/> |
138 </test> | 141 </test> |
139 <!-- FP3 --> | 142 <!-- FP3 --> |
140 <test> | 143 <test> |
141 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> | 144 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> |
142 <param name="fp_opts.fp_opts_selector" value="--FP3" /> | 145 <conditional name="fp_opts"> |
146 <param name="fp_opts_selector" value="--FP3" /> | |
147 </conditional> | |
143 <output name="outfile" file="CID_2244_FP3.fps" ftype="fps" lines_diff="4"/> | 148 <output name="outfile" file="CID_2244_FP3.fps" ftype="fps" lines_diff="4"/> |
144 </test> | 149 </test> |
145 <test> | 150 <test> |
146 <param name="infile" value="CID_2244.smi" ftype="smi" /> | 151 <param name="infile" value="CID_2244.smi" ftype="smi" /> |
147 <param name="fp_opts.fp_opts_selector" value="--FP3" /> | 152 <conditional name="fp_opts"> |
153 <param name="fp_opts_selector" value="--FP3" /> | |
154 </conditional> | |
148 <output name="outfile" file="CID_2244_FP3.fps" ftype="fps" lines_diff="4"/> | 155 <output name="outfile" file="CID_2244_FP3.fps" ftype="fps" lines_diff="4"/> |
149 </test> | 156 </test> |
150 <!-- FP4 --> | 157 <!-- FP4 --> |
151 <test> | 158 <test> |
152 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> | 159 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> |
153 <param name="fp_opts.fp_opts_selector" value="--FP4" /> | 160 <conditional name="fp_opts"> |
161 <param name="fp_opts_selector" value="--FP4" /> | |
162 </conditional> | |
154 <output name="outfile" file="CID_2244_FP4.fps" ftype="fps" lines_diff="4"/> | 163 <output name="outfile" file="CID_2244_FP4.fps" ftype="fps" lines_diff="4"/> |
155 </test> | 164 </test> |
156 <test> | 165 <test> |
157 <param name="infile" value="CID_2244.smi" ftype="smi" /> | 166 <param name="infile" value="CID_2244.smi" ftype="smi" /> |
158 <param name="fp_opts.fp_opts_selector" value="--FP4" /> | 167 <conditional name="fp_opts"> |
168 <param name="fp_opts_selector" value="--FP4" /> | |
169 </conditional> | |
159 <output name="outfile" file="CID_2244_FP4.fps" ftype="fps" lines_diff="4"/> | 170 <output name="outfile" file="CID_2244_FP4.fps" ftype="fps" lines_diff="4"/> |
160 </test> | 171 </test> |
161 <!-- MACCS --> | 172 <!-- MACCS --> |
162 <test> | 173 <test> |
163 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> | 174 <param name="infile" value="CID_2244.sdf" ftype="sdf" /> |
164 <param name="fp_opts.fp_opts_selector" value="--MACCS" /> | 175 <conditional name="fp_opts"> |
176 <param name="fp_opts_selector" value="--MACCS" /> | |
177 </conditional> | |
165 <output name="outfile" file="CID_2244_MACCS.fps" ftype="fps" lines_diff="4"/> | 178 <output name="outfile" file="CID_2244_MACCS.fps" ftype="fps" lines_diff="4"/> |
166 </test> | 179 </test> |
167 <test> | 180 <test> |
168 <param name="infile" value="CID_2244.smi" ftype="smi" /> | 181 <param name="infile" value="CID_2244.smi" ftype="smi" /> |
169 <param name="fp_opts.fp_opts_selector" value="--MACCS" /> | 182 <conditional name="fp_opts"> |
183 <param name="fp_opts_selector" value="--MACCS" /> | |
184 </conditional> | |
170 <output name="outfile" file="CID_2244_MACCS.fps" ftype="fps" lines_diff="4"/> | 185 <output name="outfile" file="CID_2244_MACCS.fps" ftype="fps" lines_diff="4"/> |
186 </test> | |
187 <!-- RDKit2fps --> | |
188 <test> | |
189 <param name="infile" value="CID_2244.smi" ftype="smi" /> | |
190 <conditional name="fp_opts"> | |
191 <param name="fp_opts_selector" value="--torsions" /> | |
192 </conditional> | |
193 <param name="fp_opts.fpSize" value="2048" /> | |
194 <param name="fp_opts.targetSize" value="4" /> | |
195 <output name="outfile" file="CID_2244_torsions.fps" ftype="fps" lines_diff="4"/> | |
171 </test> | 196 </test> |
172 </tests> | 197 </tests> |
173 <help> | 198 <help> |
174 <![CDATA[ | 199 <![CDATA[ |
175 | 200 |
176 .. class:: infomark | 201 .. class:: infomark |
177 | 202 |
178 **What this tool does** | 203 **What this tool does** |
179 | 204 |
180 This tool uses chemfp_ to calculate 10 different fingerprints of common file formats. Chemfp uses `Open Babel`_, OpenEye_ and RDKit_. | 205 This tool uses chemfp to calculate molecular fingerprints, supporting a number of common file formats. Chemfp uses OpenBabel, OpenEye and RDKit. |
181 | 206 |
182 For more information check the websites listed below:: | 207 For more information check the websites listed below:: |
183 | 208 |
184 - http://www.rdkit.org/docs/GettingStartedInPython.html#fingerprinting-and-molecular-similarity | 209 - http://www.rdkit.org/docs/GettingStartedInPython.html#fingerprinting-and-molecular-similarity |
185 - http://openbabel.org/wiki/Tutorial:Fingerprints | 210 - http://openbabel.org/wiki/Tutorial:Fingerprints |
192 | 217 |
193 FPS fingerprint file format | 218 FPS fingerprint file format |
194 | 219 |
195 * Example:: | 220 * Example:: |
196 | 221 |
197 - SDF File | 222 - SD-File |
198 | 223 |
199 28434379 | 224 28434379 |
200 -OEChem-02031205132D | 225 -OEChem-02031205132D |
201 | 226 |
202 37 39 0 0 0 0 0 0 0999 V2000 | 227 37 39 0 0 0 0 0 0 0999 V2000 |