Mercurial > repos > deepakjadmin > mayatool3_test2
comparison docs/scripts/html/ExtractFromSDFiles.html @ 0:4816e4a8ae95 draft default tip
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 09:23:18 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4816e4a8ae95 |
---|---|
1 <html> | |
2 <head> | |
3 <title>MayaChemTools:Documentation:ExtractFromSDFiles.pl</title> | |
4 <meta http-equiv="content-type" content="text/html;charset=utf-8"> | |
5 <link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css"> | |
6 </head> | |
7 <body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10"> | |
8 <br/> | |
9 <center> | |
10 <a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a> | |
11 </center> | |
12 <br/> | |
13 <div class="DocNav"> | |
14 <table width="100%" border=0 cellpadding=0 cellspacing=2> | |
15 <tr align="left" valign="top"><td width="33%" align="left"><a href="./ExtractFromPDBFiles.html" title="ExtractFromPDBFiles.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./ExtractFromSequenceFiles.html" title="ExtractFromSequenceFiles.html">Next</a></td><td width="34%" align="middle"><strong>ExtractFromSDFiles.pl</strong></td><td width="33%" align="right"><a href="././code/ExtractFromSDFiles.html" title="View source code">Code</a> | <a href="./../pdf/ExtractFromSDFiles.pdf" title="PDF US Letter Size">PDF</a> | <a href="./../pdfgreen/ExtractFromSDFiles.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a> | <a href="./../pdfa4/ExtractFromSDFiles.pdf" title="PDF A4 Size">PDFA4</a> | <a href="./../pdfa4green/ExtractFromSDFiles.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr> | |
16 </table> | |
17 </div> | |
18 <p> | |
19 </p> | |
20 <h2>NAME</h2> | |
21 <p>ExtractFromSDFiles.pl - Extract specific data from SDFile(s)</p> | |
22 <p> | |
23 </p> | |
24 <h2>SYNOPSIS</h2> | |
25 <p>ExtractFromSDFiles.pl SDFile(s)...</p> | |
26 <p>ExtractFromSDFiles.pl [<strong>-h, --help</strong>] | |
27 [<strong>-d, --datafields</strong> "fieldlabel,..." | "fieldlabel,value,criteria..." | "fieldlabel,value,value..."] | |
28 [<strong>--datafieldsfile</strong> filename] [<strong>--indelim</strong> comma | tab | semicolon] [<strong>-m, --mode</strong> alldatafields | | |
29 commondatafields | | datafieldnotbylist | datafields | datafieldsbyvalue | datafieldsbyregex | datafieldbylist | | |
30 datafielduniquebylist | molnames | randomcmpds | recordnum | recordnums | recordrange | 2dcmpdrecords | | |
31 3dcmpdrecords ] [<strong>-n, --numofcmpds</strong> number] [<strong>--outdelim</strong> comma | tab | semicolon] | |
32 [<strong>--output</strong> SD | text | both] [<strong>-o, --overwrite</strong>] [<strong>-q, --quote</strong> yes | no] | |
33 [<strong>--record</strong> recnum | startrecnum,endrecnum] <strong>--RegexIgnoreCase</strong> <em>yes or no</em> | |
34 [<strong>-r, --root</strong> rootname] [<strong>-s, --seed</strong> number] [<strong>--StrDataString</strong> yes | no] | |
35 [<strong>--StrDataStringDelimiter</strong> text] [<strong>--StrDataStringMode</strong> StrOnly | StrAndDataFields] | |
36 [<strong>--ValueComparisonMode</strong> <em>Numeric | Alphanumeric</em>] | |
37 [<strong>-v, --violations-</strong> number] [<strong>-w, --workingdir</strong> dirname] SDFile(s)...</p> | |
38 <p> | |
39 </p> | |
40 <h2>DESCRIPTION</h2> | |
41 <p>Extract specific data from <em>SDFile(s)</em> and generate appropriate SD or CSV/TSV text | |
42 file(s). The structure data from SDFile(s) is not transferred to CSV/TSV text file(s). | |
43 Multiple SDFile names are separated by spaces. The valid file extensions are <em>.sdf</em> | |
44 and <em>.sd</em>. All other file names are ignored. All the SD files in a current directory | |
45 can be specified either by <em>*.sdf</em> or the current directory name.</p> | |
46 <p> | |
47 </p> | |
48 <h2>OPTIONS</h2> | |
49 <dl> | |
50 <dt><strong><strong>-h, --help</strong></strong></dt> | |
51 <dd> | |
52 <p>Print this help message.</p> | |
53 </dd> | |
54 <dt><strong><strong>-d, --datafields</strong> <em>"fieldlabel,..." | "fieldlabel,value,criteria..." | "fieldlabel,value,value,..."</em></strong></dt> | |
55 <dd> | |
56 <p>This value is mode specific. In general, it's a list of comma separated data field labels | |
57 and associated mode specific values.</p> | |
58 <p>For <em>datafields</em> mode, input value format is: <em>fieldlabel,...</em>. Examples:</p> | |
59 <div class="OptionsBox"> | |
60 Extreg | |
61 <br/> Extreg,CompoundName,ID</div> | |
62 <p>For <em>datafieldsbyvalue</em> mode, input value format contains these triplets: | |
63 <em>fieldlabel,value, criteria...</em>. Possible values for criteria: <em>le, ge or eq</em>. | |
64 The values of <strong>--ValueComparisonMode</strong> indicates whether values are | |
65 compared numerical or string comarison operators. Default is to consider | |
66 data field values as numerical values and use numerical comparison operators. | |
67 Examples:</p> | |
68 <div class="OptionsBox"> | |
69 MolWt,450,le | |
70 <br/> MolWt,450,le,LogP,5,le,SumNumNO,10,le,SumNHOH,5,le</div> | |
71 <p>For <em>datafieldsbyregex</em> mode, input value format contains these triplets: | |
72 <em>fieldlabel,regex, criteria...</em>. <em>regex</em> corresponds to any valid regular expression | |
73 and is used to match the values for specified <em>fieldlabel</em>. Possible values for criteria: | |
74 <em>eq or ne</em>. During <em>eq</em> and <em>ne</em> values, data field label value is matched with | |
75 regular expression using =~ and !~ respectively. <strong>--RegexIgnoreCase</strong> option | |
76 value is used to determine whether to ignore letter upper/lower case during | |
77 regular expression match. Examples:</p> | |
78 <div class="OptionsBox"> | |
79 Name,ol,eq | |
80 <br/> Name,'^pat',ne</div> | |
81 <p>For <em>datafieldbylist</em> and <em>datafielduniquebylist</em> mode, input value format is: | |
82 <em>fieldlabel,value1,value2...</em>. This is equivalent to <em>datafieldsbyvalue</em> mode with | |
83 this input value format:<em>fieldlabel,value1,eq,fieldlabel,value2,eq,...</em>. For | |
84 <em>datafielduniquebylist</em> mode, only unique compounds identified by first occurrence | |
85 of <em>value</em> associated with <em>fieldlabel</em> in <em>SDFile(s)</em> are kept; any subsequent compounds | |
86 are simply ignored.</p> | |
87 <p>For <em>datafieldnotbylist</em> mode, input value format is: <em>fieldlabel,value1,value2...</em>. In this | |
88 mode, the script behaves exactly opposite of <em>datafieldbylist</em> mode, and only those compounds | |
89 are extracted whose data field values don't match any specified data field value.</p> | |
90 </dd> | |
91 <dt><strong><strong>--datafieldsfile</strong> <em>filename</em></strong></dt> | |
92 <dd> | |
93 <p>Filename which contains various mode specific values. This option provides a way | |
94 to specify mode specific values in a file instead of entering them on the command | |
95 line using <strong>-d --datafields</strong>.</p> | |
96 <p>For <em>datafields</em> mode, input file lines contain comma delimited field labels: | |
97 <em>fieldlabel,...</em>. Example:</p> | |
98 <div class="OptionsBox"> | |
99 Line 1:MolId | |
100 <br/> Line 2:"Extreg",CompoundName,ID</div> | |
101 <p>For <em>datafieldsbyvalue</em> mode, input file lines contains these comma separated triplets: | |
102 <em>fieldlabel,value, criteria</em>. Possible values for criteria: <em>le, ge or eq</em>. Examples:</p> | |
103 <div class="OptionsBox"> | |
104 Line 1:MolWt,450,le</div> | |
105 <div class="OptionsBox"> | |
106 Line 1:"MolWt",450,le,"LogP",5,le,"SumNumNO",10,le,"SumNHOH",5,le</div> | |
107 <div class="OptionsBox"> | |
108 Line 1:MolWt,450,le | |
109 <br/> Line 2:"LogP",5,le | |
110 <br/> Line 3:"SumNumNO",10,le | |
111 <br/> Line 4: SumNHOH,5,le</div> | |
112 <p>For <em>datafieldbylist</em> and <em>datafielduniquebylist</em> mode, input file line format is:</p> | |
113 <div class="OptionsBox"> | |
114 Line 1:fieldlabel; | |
115 <br/> Subsequent lines:value1,value2...</div> | |
116 <p>For <em>datafieldbylist</em>, <em>datafielduniquebylist</em>, and <em>datafieldnotbylist</em> mode, input file | |
117 line format is:</p> | |
118 <div class="OptionsBox"> | |
119 Line 1:fieldlabel; | |
120 <br/> Subsequent lines:value1,value2...</div> | |
121 <p>For <em>datafielduniquebylist</em> mode, only unique compounds identified by first occurrence | |
122 of <em>value</em> associated with <em>fieldlabel</em> in <em>SDFile(s)</em> are kept; any subsequent compounds | |
123 are simply ignored. Example:</p> | |
124 <div class="OptionsBox"> | |
125 Line 1: MolID | |
126 <br/> Subsequent Lines: | |
127 <br/> 907508 | |
128 <br/> 832291,4642 | |
129 <br/> "1254","907303"</div> | |
130 </dd> | |
131 <dt><strong><strong>--indelim</strong> <em>comma | tab | semicolon</em></strong></dt> | |
132 <dd> | |
133 <p>Delimiter used to specify text values for <strong>-d --datafields</strong> and <strong>--datafieldsfile</strong> options. | |
134 Possible values: <em>comma, tab, or semicolon</em>. Default value: <em>comma</em>.</p> | |
135 </dd> | |
136 <dt><strong><strong>-m, --mode</strong> <em>alldatafields | commondatafields | datafields | datafieldsbyvalue | datafieldsbyregex | datafieldbylist | datafielduniquebylist | datafieldnotbylist | molnames | randomcmpds | recordnum | recordnums | recordrange | 2dcmpdrecords | 3dcmpdrecords</em></strong></dt> | |
137 <dd> | |
138 <p>Specify what to extract from <em>SDFile(s)</em>. Possible values: <em>alldatafields, commondatafields, | |
139 datafields, datafieldsbyvalue, datafieldsbyregex, datafieldbylist, datafielduniquebylist, datafieldnotbylist, | |
140 molnames, randomcmpds, recordnum, recordnums, recordrange, 2dcmpdrecords, 3dcmpdrecords</em>. | |
141 Default value: <em>alldatafields</em>.</p> | |
142 <p>For <em>alldatafields</em> and <em>molnames</em> mode, only a CSV/TSV text file is generated; for all | |
143 other modes, however, a SD file is generated by default - you can change the behavior to genereate | |
144 text file using <em>--output</em> option.</p> | |
145 <p>For <em>3DCmpdRecords</em> mode, only those compounds with at least one non-zero value for Z atomic coordinates | |
146 are retrieved; however, during retrieval of compounds in <em>2DCmpdRecords</em> mode, all Z atomic coordinates must | |
147 be zero.</p> | |
148 </dd> | |
149 <dt><strong><strong>-n, --numofcmpds</strong> <em>number</em></strong></dt> | |
150 <dd> | |
151 <p>Number of compouds to extract during <em>randomcmpds</em> mode.</p> | |
152 </dd> | |
153 <dt><strong><strong>--outdelim</strong> <em>comma | tab | semicolon</em></strong></dt> | |
154 <dd> | |
155 <p>Delimiter for output CSV/TSV text file(s). Possible values: <em>comma, tab, or semicolon</em> | |
156 Default value: <em>comma</em></p> | |
157 </dd> | |
158 <dt><strong><strong>--output</strong> <em>SD | text | both</em></strong></dt> | |
159 <dd> | |
160 <p>Type of output files to generate. Possible values: <em>SD, text, or both</em>. Default value: <em>SD</em>. For | |
161 <em>alldatafields</em> and <em>molnames</em> mode, this option is ingored and only a CSV/TSV text file is generated.</p> | |
162 </dd> | |
163 <dt><strong><strong>-o, --overwrite</strong></strong></dt> | |
164 <dd> | |
165 <p>Overwrite existing files.</p> | |
166 </dd> | |
167 <dt><strong><strong>-q, --quote</strong> <em>yes | no</em></strong></dt> | |
168 <dd> | |
169 <p>Put quote around column values in output CSV/TSV text file(s). Possible values: | |
170 <em>yes or no</em>. Default value: <em>yes</em>.</p> | |
171 </dd> | |
172 <dt><strong><strong>--record</strong> <em>recnum | recnums | startrecnum,endrecnum</em></strong></dt> | |
173 <dd> | |
174 <p>Record number, record numbers or range of records to extract during <em>recordnum</em>, <em>recordnums</em> | |
175 and <em>recordrange</em> mode. Input value format is: <num>, <num1,num2,...> and <startnum, endnum> | |
176 for <em>recordnum</em>, <em>recordnums</em> and <em>recordrange</em> modes recpectively. Default value: none.</p> | |
177 </dd> | |
178 <dt><strong><strong>--RegexIgnoreCase</strong> <em>yes or no</em></strong></dt> | |
179 <dd> | |
180 <p>Specify whether to ingnore case during <em>datafieldsbyregex</em> value of <strong>-m, --mode</strong> option. | |
181 Possible values: <em>yes or no</em>. Default value: <em>yes</em>.</p> | |
182 </dd> | |
183 <dt><strong><strong>-r, --root</strong> <em>rootname</em></strong></dt> | |
184 <dd> | |
185 <p>New file name is generated using the root: <Root>.<Ext>. Default for new file | |
186 names: <SDFileName><mode>.<Ext>. The file type determines <Ext> value. | |
187 The sdf, csv, and tsv <Ext> values are used for SD, comma/semicolon, and tab | |
188 delimited text files respectively.This option is ignored for multiple input files.</p> | |
189 </dd> | |
190 <dt><strong><strong>-s, --seed</strong> <em>number</em></strong></dt> | |
191 <dd> | |
192 <p>Random number seed used for <em>randomcmpds</em> mode. Default:123456789.</p> | |
193 </dd> | |
194 <dt><strong><strong>--StrDataString</strong> <em>yes | no</em></strong></dt> | |
195 <dd> | |
196 <p>Specify whether to write out structure data string to CSV/TSV text file(s). Possible values: | |
197 <em>yes or no</em>. Default value: <em>no</em>.</p> | |
198 <p>The value of <strong>StrDataStringDelimiter</strong> option is used as a delimiter to join structure | |
199 data lines into a structure data string.</p> | |
200 <p>This option is ignored during generation of SD file(s).</p> | |
201 </dd> | |
202 <dt><strong><strong>--StrDataStringDelimiter</strong> <em>text</em></strong></dt> | |
203 <dd> | |
204 <p>Delimiter for joining multiple stucture data lines into a string before writing to CSV/TSV text | |
205 file(s). Possible values: <em>any alphanumeric text</em>. Default value: <em>|</em>.</p> | |
206 <p>This option is ignored during generation of SD file(s).</p> | |
207 </dd> | |
208 <dt><strong><strong>--StrDataStringMode</strong> <em>StrOnly | StrAndDataFields</em></strong></dt> | |
209 <dd> | |
210 <p>Specify whether to include SD data fields and values along with the structure data into structure | |
211 data string before writing it out to CSV/TSV text file(s). Possible values: <em>StrOnly or StrAndDataFields</em>. | |
212 Default value: <em>StrOnly</em>.</p> | |
213 <p>The value of <strong>StrDataStringDelimiter</strong> option is used as a delimiter to join structure | |
214 data lines into a structure data string.</p> | |
215 <p>This option is ignored during generation of SD file(s).</p> | |
216 </dd> | |
217 <dt><strong><strong>--ValueComparisonMode</strong> <em>Numeric | Alphanumeric</em></strong></dt> | |
218 <dd> | |
219 <p>Specify how to compare data field values during <em>datafieldsbyvalue</em> mode: Compare | |
220 values using either numeric or string ((eq, le, ge) comparison operators. Possible values: | |
221 <em>Numeric or Alphanumeric</em>. Defaule value: <em>Numeric</em>.</p> | |
222 </dd> | |
223 <dt><strong><strong>-v, --violations</strong> <em>number</em></strong></dt> | |
224 <dd> | |
225 <p>Number of criterion violations allowed for values specified during <em>datafieldsbyvalue</em> | |
226 and <em>datafieldsbyregex</em> mode. Default value: <em>0</em>.</p> | |
227 </dd> | |
228 <dt><strong><strong>-w, --workingdir</strong> <em>dirname</em></strong></dt> | |
229 <dd> | |
230 <p>Location of working directory. Default: current directory.</p> | |
231 </dd> | |
232 </dl> | |
233 <p> | |
234 </p> | |
235 <h2>EXAMPLES</h2> | |
236 <p>To retrieve all data fields from SD files and generate CSV text files, type:</p> | |
237 <div class="ExampleBox"> | |
238 % ExtractFromSDFiles.pl -o Sample.sdf | |
239 <br/>% ExtractFromSDFiles.pl -o *.sdf</div> | |
240 <p>To retrieve all data fields from SD file and generate CSV text files containing | |
241 a column with structure data as a string with | as line delimiter, type:</p> | |
242 <div class="ExampleBox"> | |
243 % ExtractFromSDFiles.pl --StrDataString Yes -o Sample.sdf</div> | |
244 <p>To retrieve MOL_ID data fileld from SD file and generate CSV text files containing | |
245 a column with structure data along with all data fields as a string with | as line | |
246 delimiter, type:</p> | |
247 <div class="ExampleBox"> | |
248 % ExtractFromSDFiles.pl -m datafields -d "Mol_ID" --StrDataString Yes | |
249 --StrDataStringMode StrAndDataFields --StrDataStringDelimiter "|" | |
250 --output text -o Sample.sdf</div> | |
251 <p>To retrieve common data fields which exists for all the compounds in | |
252 a SD file and generate a TSV text file NewSample.tsv, type:</p> | |
253 <div class="ExampleBox"> | |
254 % ExtractFromSDFiles.pl -m commondatafields --outdelim tab -r NewSample | |
255 --output Text -o Sample.sdf</div> | |
256 <p>To retrieve MolId, ExtReg, and CompoundName data field from a SD file and generate a | |
257 CSV text file NewSample.csv, type:</p> | |
258 <div class="ExampleBox"> | |
259 % ExtractFromSDFiles.pl -m datafields -d "Mol_ID,MolWeight, | |
260 CompoundName" -r NewSample --output Text -o Sample.sdf</div> | |
261 <p>To retrieve compounds from a SD which meet a specific set of criteria - MolWt <= 450, | |
262 LogP <= 5 and SumNO < 10 - from a SD file and generate a new SD file NewSample.sdf, | |
263 type:</p> | |
264 <div class="ExampleBox"> | |
265 % ExtractFromSDFiles.pl -m datafieldsbyvalue -d "MolWt,450,le,LogP | |
266 ,5,le,SumNO,10" -r NewSample -o Sample.sdf</div> | |
267 <p>To retrive compounds from a SD file with a specific set of values for MolID and | |
268 generate a new SD file NewSample.sdf, type:</p> | |
269 <div class="ExampleBox"> | |
270 % ExtractFromSDFiles.pl -m datafieldbylist -d "Mol_ID,159,4509,4619" | |
271 -r NewSample -o Sample.sdf</div> | |
272 <p>To retrive compounds from a SD file with values for MolID not on a list of specified | |
273 values and generate a new SD file NewSample.sdf, type:</p> | |
274 <div class="ExampleBox"> | |
275 % ExtractFromSDFiles.pl -m datafieldnotbylist -d "Mol_ID,159,4509,4619" | |
276 -r NewSample -o Sample.sdf</div> | |
277 <p>To retrive 10 random compounds from a SD file and generate a new SD file RandomSample.sdf, type:</p> | |
278 <div class="ExampleBox"> | |
279 % ExtractFromSDFiles.pl -m randomcmpds -n 10 -r RandomSample | |
280 -o Sample.sdf</div> | |
281 <p>To retrive compound record number 10 from a SD file and generate a new SD file NewSample.sdf, type:</p> | |
282 <div class="ExampleBox"> | |
283 % ExtractFromSDFiles.pl -m recordnum --record 10 -r NewSample | |
284 -o Sample.sdf</div> | |
285 <p>To retrive compound record numbers 10, 20 and 30 from a SD file and generate a new SD file | |
286 NewSample.sdf, type:</p> | |
287 <div class="ExampleBox"> | |
288 % ExtractFromSDFiles.pl -m recordnums --record 10,20,30 -r NewSample | |
289 -o Sample.sdf</div> | |
290 <p>To retrive compound records between 10 to 20 from SD file and generate a new SD | |
291 file NewSample.sdf, type:</p> | |
292 <div class="ExampleBox"> | |
293 % ExtractFromSDFiles.pl -m recordrange --record 10,20 -r NewSample | |
294 -o Sample.sdf</div> | |
295 <p> | |
296 </p> | |
297 <h2>AUTHOR</h2> | |
298 <p><a href="mailto:msud@san.rr.com">Manish Sud</a></p> | |
299 <p> | |
300 </p> | |
301 <h2>SEE ALSO</h2> | |
302 <p><a href="./FilterSDFiles.html">FilterSDFiles.pl</a>, <a href="./InfoSDFiles.html">InfoSDFiles.pl</a>, <a href="./SplitSDFiles.html">SplitSDFiles.pl</a>, <a href="./MergeTextFilesWithSD.html">MergeTextFilesWithSD.pl</a> | |
303 </p> | |
304 <p> | |
305 </p> | |
306 <h2>COPYRIGHT</h2> | |
307 <p>Copyright (C) 2015 Manish Sud. All rights reserved.</p> | |
308 <p>This file is part of MayaChemTools.</p> | |
309 <p>MayaChemTools is free software; you can redistribute it and/or modify it under | |
310 the terms of the GNU Lesser General Public License as published by the Free | |
311 Software Foundation; either version 3 of the License, or (at your option) | |
312 any later version.</p> | |
313 <p> </p><p> </p><div class="DocNav"> | |
314 <table width="100%" border=0 cellpadding=0 cellspacing=2> | |
315 <tr align="left" valign="top"><td width="33%" align="left"><a href="./ExtractFromPDBFiles.html" title="ExtractFromPDBFiles.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./ExtractFromSequenceFiles.html" title="ExtractFromSequenceFiles.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>ExtractFromSDFiles.pl</strong></td></tr> | |
316 </table> | |
317 </div> | |
318 <br /> | |
319 <center> | |
320 <img src="../../images/h2o2.png"> | |
321 </center> | |
322 </body> | |
323 </html> |