0
|
1 #!/usr/bin/perl -w
|
|
2 #
|
|
3 # $RCSfile: TopologicalPharmacophoreAtomTripletsFingerprints.pl,v $
|
|
4 # $Date: 2015/02/28 20:46:23 $
|
|
5 # $Revision: 1.34 $
|
|
6 #
|
|
7 # Author: Manish Sud <msud@san.rr.com>
|
|
8 #
|
|
9 # Copyright (C) 2015 Manish Sud. All rights reserved.
|
|
10 #
|
|
11 # This file is part of MayaChemTools.
|
|
12 #
|
|
13 # MayaChemTools is free software; you can redistribute it and/or modify it under
|
|
14 # the terms of the GNU Lesser General Public License as published by the Free
|
|
15 # Software Foundation; either version 3 of the License, or (at your option) any
|
|
16 # later version.
|
|
17 #
|
|
18 # MayaChemTools is distributed in the hope that it will be useful, but without
|
|
19 # any warranty; without even the implied warranty of merchantability of fitness
|
|
20 # for a particular purpose. See the GNU Lesser General Public License for more
|
|
21 # details.
|
|
22 #
|
|
23 # You should have received a copy of the GNU Lesser General Public License
|
|
24 # along with MayaChemTools; if not, see <http://www.gnu.org/licenses/> or
|
|
25 # write to the Free Software Foundation Inc., 59 Temple Place, Suite 330,
|
|
26 # Boston, MA, 02111-1307, USA.
|
|
27 #
|
|
28
|
|
29 use strict;
|
|
30 use FindBin; use lib "$FindBin::Bin/../lib";
|
|
31 use Getopt::Long;
|
|
32 use File::Basename;
|
|
33 use Text::ParseWords;
|
|
34 use Benchmark;
|
|
35 use FileUtil;
|
|
36 use TextUtil;
|
|
37 use SDFileUtil;
|
|
38 use MoleculeFileIO;
|
|
39 use FileIO::FingerprintsSDFileIO;
|
|
40 use FileIO::FingerprintsTextFileIO;
|
|
41 use FileIO::FingerprintsFPFileIO;
|
|
42 use AtomTypes::FunctionalClassAtomTypes;
|
|
43 use Fingerprints::TopologicalPharmacophoreAtomTripletsFingerprints;
|
|
44
|
|
45 my($ScriptName, %Options, $StartTime, $EndTime, $TotalTime);
|
|
46
|
|
47 # Autoflush STDOUT
|
|
48 $| = 1;
|
|
49
|
|
50 # Starting message...
|
|
51 $ScriptName = basename($0);
|
|
52 print "\n$ScriptName: Starting...\n\n";
|
|
53 $StartTime = new Benchmark;
|
|
54
|
|
55 # Get the options and setup script...
|
|
56 SetupScriptUsage();
|
|
57 if ($Options{help} || @ARGV < 1) {
|
|
58 die GetUsageFromPod("$FindBin::Bin/$ScriptName");
|
|
59 }
|
|
60
|
|
61 my(@SDFilesList);
|
|
62 @SDFilesList = ExpandFileNames(\@ARGV, "sdf sd");
|
|
63
|
|
64 # Process options...
|
|
65 print "Processing options...\n";
|
|
66 my(%OptionsInfo);
|
|
67 ProcessOptions();
|
|
68
|
|
69 # Setup information about input files...
|
|
70 print "Checking input SD file(s)...\n";
|
|
71 my(%SDFilesInfo);
|
|
72 RetrieveSDFilesInfo();
|
|
73
|
|
74 # Process input files..
|
|
75 my($FileIndex);
|
|
76 if (@SDFilesList > 1) {
|
|
77 print "\nProcessing SD files...\n";
|
|
78 }
|
|
79 for $FileIndex (0 .. $#SDFilesList) {
|
|
80 if ($SDFilesInfo{FileOkay}[$FileIndex]) {
|
|
81 print "\nProcessing file $SDFilesList[$FileIndex]...\n";
|
|
82 GenerateTopologicalPharmacophoreAtomTripletsFingerprints($FileIndex);
|
|
83 }
|
|
84 }
|
|
85 print "\n$ScriptName:Done...\n\n";
|
|
86
|
|
87 $EndTime = new Benchmark;
|
|
88 $TotalTime = timediff ($EndTime, $StartTime);
|
|
89 print "Total time: ", timestr($TotalTime), "\n";
|
|
90
|
|
91 ###############################################################################
|
|
92
|
|
93 # Generate fingerprints for a SD file...
|
|
94 #
|
|
95 sub GenerateTopologicalPharmacophoreAtomTripletsFingerprints {
|
|
96 my($FileIndex) = @_;
|
|
97 my($CmpdCount, $IgnoredCmpdCount, $SDFile, $MoleculeFileIO, $Molecule, $TopologicalPharmacophoreAtomTripletsFingerprints, $NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO, $SetupOutputFiles);
|
|
98
|
|
99 $SDFile = $SDFilesList[$FileIndex];
|
|
100
|
|
101 ($NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO) = (undef) x 3;
|
|
102 $SetupOutputFiles = 1;
|
|
103
|
|
104 $MoleculeFileIO = new MoleculeFileIO('Name' => $SDFile);
|
|
105 $MoleculeFileIO->Open();
|
|
106
|
|
107 $CmpdCount = 0;
|
|
108 $IgnoredCmpdCount = 0;
|
|
109
|
|
110 COMPOUND: while ($Molecule = $MoleculeFileIO->ReadMolecule()) {
|
|
111 $CmpdCount++;
|
|
112
|
|
113 # Filter compound data before calculating fingerprints...
|
|
114 if ($OptionsInfo{Filter}) {
|
|
115 if (CheckAndFilterCompound($CmpdCount, $Molecule)) {
|
|
116 $IgnoredCmpdCount++;
|
|
117 next COMPOUND;
|
|
118 }
|
|
119 }
|
|
120
|
|
121 $TopologicalPharmacophoreAtomTripletsFingerprints = GenerateMoleculeFingerprints($Molecule);
|
|
122 if (!$TopologicalPharmacophoreAtomTripletsFingerprints) {
|
|
123 $IgnoredCmpdCount++;
|
|
124 ProcessIgnoredCompound('FingerprintsGenerationFailed', $CmpdCount, $Molecule);
|
|
125 next COMPOUND;
|
|
126 }
|
|
127
|
|
128 if ($SetupOutputFiles) {
|
|
129 $SetupOutputFiles = 0;
|
|
130 SetupFingerprintsLabelValueIDs($TopologicalPharmacophoreAtomTripletsFingerprints);
|
|
131 ($NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO) = SetupAndOpenOutputFiles($FileIndex);
|
|
132 }
|
|
133
|
|
134 WriteDataToOutputFiles($FileIndex, $CmpdCount, $Molecule, $TopologicalPharmacophoreAtomTripletsFingerprints, $NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO);
|
|
135 }
|
|
136 $MoleculeFileIO->Close();
|
|
137
|
|
138 if ($NewFPSDFileIO) {
|
|
139 $NewFPSDFileIO->Close();
|
|
140 }
|
|
141 if ($NewFPTextFileIO) {
|
|
142 $NewFPTextFileIO->Close();
|
|
143 }
|
|
144 if ($NewFPFileIO) {
|
|
145 $NewFPFileIO->Close();
|
|
146 }
|
|
147
|
|
148 WriteFingerprintsGenerationSummaryStatistics($CmpdCount, $IgnoredCmpdCount);
|
|
149 }
|
|
150
|
|
151 # Process compound being ignored due to problems in fingerprints geneation...
|
|
152 #
|
|
153 sub ProcessIgnoredCompound {
|
|
154 my($Mode, $CmpdCount, $Molecule) = @_;
|
|
155 my($CmpdID, $DataFieldLabelAndValuesRef);
|
|
156
|
|
157 $DataFieldLabelAndValuesRef = $Molecule->GetDataFieldLabelAndValues();
|
|
158 $CmpdID = SetupCmpdIDForOutputFiles($CmpdCount, $Molecule, $DataFieldLabelAndValuesRef);
|
|
159
|
|
160 MODE: {
|
|
161 if ($Mode =~ /^ContainsNonElementalData$/i) {
|
|
162 warn "\nWarning: Ignoring compound record number $CmpdCount with ID $CmpdID: Compound contains atom data corresponding to non-elemental atom symbol(s)...\n\n";
|
|
163 next MODE;
|
|
164 }
|
|
165
|
|
166 if ($Mode =~ /^ContainsNoElementalData$/i) {
|
|
167 warn "\nWarning: Ignoring compound record number $CmpdCount with ID $CmpdID: Compound contains no atom data...\n\n";
|
|
168 next MODE;
|
|
169 }
|
|
170
|
|
171 if ($Mode =~ /^FingerprintsGenerationFailed$/i) {
|
|
172 warn "\nWarning: Ignoring compound record number $CmpdCount with ID $CmpdID: Fingerprints generation didn't succeed...\n\n";
|
|
173 next MODE;
|
|
174 }
|
|
175 warn "\nWarning: Ignoring compound record number $CmpdCount with ID $CmpdID: Fingerprints generation didn't succeed...\n\n";
|
|
176 }
|
|
177 }
|
|
178
|
|
179 # Check and filter compounds....
|
|
180 #
|
|
181 sub CheckAndFilterCompound {
|
|
182 my($CmpdCount, $Molecule) = @_;
|
|
183 my($ElementCount, $NonElementCount);
|
|
184
|
|
185 ($ElementCount, $NonElementCount) = $Molecule->GetNumOfElementsAndNonElements();
|
|
186
|
|
187 if ($NonElementCount) {
|
|
188 ProcessIgnoredCompound('ContainsNonElementalData', $CmpdCount, $Molecule);
|
|
189 return 1;
|
|
190 }
|
|
191
|
|
192 if (!$ElementCount) {
|
|
193 ProcessIgnoredCompound('ContainsNoElementalData', $CmpdCount, $Molecule);
|
|
194 return 1;
|
|
195 }
|
|
196
|
|
197 return 0;
|
|
198 }
|
|
199
|
|
200 # Write out compounds fingerprints generation summary statistics...
|
|
201 #
|
|
202 sub WriteFingerprintsGenerationSummaryStatistics {
|
|
203 my($CmpdCount, $IgnoredCmpdCount) = @_;
|
|
204 my($ProcessedCmpdCount);
|
|
205
|
|
206 $ProcessedCmpdCount = $CmpdCount - $IgnoredCmpdCount;
|
|
207
|
|
208 print "\nNumber of compounds: $CmpdCount\n";
|
|
209 print "Number of compounds processed successfully during fingerprints generation: $ProcessedCmpdCount\n";
|
|
210 print "Number of compounds ignored during fingerprints generation: $IgnoredCmpdCount\n";
|
|
211 }
|
|
212
|
|
213 # Append atom pair value IDs to fingerprint label...
|
|
214 #
|
|
215 sub SetupFingerprintsLabelValueIDs {
|
|
216 my($TopologicalPharmacophoreAtomTripletsFingerprints) = @_;
|
|
217
|
|
218 if ($OptionsInfo{AtomTripletsSetSizeToUse} =~ /^ArbitrarySize$/i ||
|
|
219 $OptionsInfo{FingerprintsLabelMode} !~ /^FingerprintsLabelWithIDs$/i) {
|
|
220 return;
|
|
221 }
|
|
222 $OptionsInfo{FingerprintsLabel} .= "; Value IDs: " . $TopologicalPharmacophoreAtomTripletsFingerprints->GetFingerprintsVector->GetValueIDsString();
|
|
223 }
|
|
224
|
|
225 # Open output files...
|
|
226 #
|
|
227 sub SetupAndOpenOutputFiles {
|
|
228 my($FileIndex) = @_;
|
|
229 my($NewFPSDFile, $NewFPFile, $NewFPTextFile, $NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO, %FingerprintsFileIOParams);
|
|
230
|
|
231 ($NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO) = (undef) x 3;
|
|
232
|
|
233 # Setup common parameters for fingerprints file IO objects...
|
|
234 #
|
|
235 %FingerprintsFileIOParams = ('Mode' => 'Write', 'Overwrite' => $OptionsInfo{OverwriteFiles}, 'FingerprintsStringMode' => 'FingerprintsVectorString', 'VectorStringFormat' => $OptionsInfo{VectorStringFormat});
|
|
236
|
|
237 if ($OptionsInfo{SDOutput}) {
|
|
238 $NewFPSDFile = $SDFilesInfo{SDOutFileNames}[$FileIndex];
|
|
239 print "Generating SD file $NewFPSDFile...\n";
|
|
240 $NewFPSDFileIO = new FileIO::FingerprintsSDFileIO('Name' => $NewFPSDFile, %FingerprintsFileIOParams, 'FingerprintsFieldLabel' => $OptionsInfo{FingerprintsLabel});
|
|
241 $NewFPSDFileIO->Open();
|
|
242 }
|
|
243
|
|
244 if ($OptionsInfo{FPOutput}) {
|
|
245 $NewFPFile = $SDFilesInfo{FPOutFileNames}[$FileIndex];
|
|
246 print "Generating FP file $NewFPFile...\n";
|
|
247 $NewFPFileIO = new FileIO::FingerprintsFPFileIO('Name' => $NewFPFile, %FingerprintsFileIOParams);
|
|
248 $NewFPFileIO->Open();
|
|
249 }
|
|
250
|
|
251 if ($OptionsInfo{TextOutput}) {
|
|
252 my($ColLabelsRef);
|
|
253
|
|
254 $NewFPTextFile = $SDFilesInfo{TextOutFileNames}[$FileIndex];
|
|
255 $ColLabelsRef = SetupFPTextFileCoulmnLabels($FileIndex);
|
|
256
|
|
257 print "Generating text file $NewFPTextFile...\n";
|
|
258 $NewFPTextFileIO = new FileIO::FingerprintsTextFileIO('Name' => $NewFPTextFile, %FingerprintsFileIOParams, 'DataColLabels' => $ColLabelsRef, 'OutDelim' => $OptionsInfo{OutDelim}, 'OutQuote' => $OptionsInfo{OutQuote});
|
|
259 $NewFPTextFileIO->Open();
|
|
260 }
|
|
261
|
|
262 return ($NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO);
|
|
263 }
|
|
264
|
|
265 # Write fingerpritns and other data to appropriate output files...
|
|
266 #
|
|
267 sub WriteDataToOutputFiles {
|
|
268 my($FileIndex, $CmpdCount, $Molecule, $TopologicalPharmacophoreAtomTripletsFingerprints, $NewFPSDFileIO, $NewFPTextFileIO, $NewFPFileIO) = @_;
|
|
269 my($DataFieldLabelAndValuesRef);
|
|
270
|
|
271 $DataFieldLabelAndValuesRef = undef;
|
|
272 if ($NewFPTextFileIO || $NewFPFileIO) {
|
|
273 $DataFieldLabelAndValuesRef = $Molecule->GetDataFieldLabelAndValues();
|
|
274 }
|
|
275
|
|
276 if ($NewFPSDFileIO) {
|
|
277 my($CmpdString);
|
|
278
|
|
279 $CmpdString = $Molecule->GetInputMoleculeString();
|
|
280 $NewFPSDFileIO->WriteFingerprints($TopologicalPharmacophoreAtomTripletsFingerprints, $CmpdString);
|
|
281 }
|
|
282
|
|
283 if ($NewFPTextFileIO) {
|
|
284 my($ColValuesRef);
|
|
285
|
|
286 $ColValuesRef = SetupFPTextFileCoulmnValues($FileIndex, $CmpdCount, $Molecule, $DataFieldLabelAndValuesRef);
|
|
287 $NewFPTextFileIO->WriteFingerprints($TopologicalPharmacophoreAtomTripletsFingerprints, $ColValuesRef);
|
|
288 }
|
|
289
|
|
290 if ($NewFPFileIO) {
|
|
291 my($CompoundID);
|
|
292
|
|
293 $CompoundID = SetupCmpdIDForOutputFiles($CmpdCount, $Molecule, $DataFieldLabelAndValuesRef);
|
|
294 $NewFPFileIO->WriteFingerprints($TopologicalPharmacophoreAtomTripletsFingerprints, $CompoundID);
|
|
295 }
|
|
296 }
|
|
297
|
|
298 # Generate approriate column labels for FPText output file...
|
|
299 #
|
|
300 sub SetupFPTextFileCoulmnLabels {
|
|
301 my($FileIndex) = @_;
|
|
302 my($Line, @ColLabels);
|
|
303
|
|
304 @ColLabels = ();
|
|
305 if ($OptionsInfo{DataFieldsMode} =~ /^All$/i) {
|
|
306 push @ColLabels, @{$SDFilesInfo{AllDataFieldsRef}[$FileIndex]};
|
|
307 }
|
|
308 elsif ($OptionsInfo{DataFieldsMode} =~ /^Common$/i) {
|
|
309 push @ColLabels, @{$SDFilesInfo{CommonDataFieldsRef}[$FileIndex]};
|
|
310 }
|
|
311 elsif ($OptionsInfo{DataFieldsMode} =~ /^Specify$/i) {
|
|
312 push @ColLabels, @{$OptionsInfo{SpecifiedDataFields}};
|
|
313 }
|
|
314 elsif ($OptionsInfo{DataFieldsMode} =~ /^CompoundID$/i) {
|
|
315 push @ColLabels, $OptionsInfo{CompoundIDLabel};
|
|
316 }
|
|
317 # Add fingerprints label...
|
|
318 push @ColLabels, $OptionsInfo{FingerprintsLabel};
|
|
319
|
|
320 return \@ColLabels;
|
|
321 }
|
|
322
|
|
323 # Generate column values FPText output file..
|
|
324 #
|
|
325 sub SetupFPTextFileCoulmnValues {
|
|
326 my($FileIndex, $CmpdCount, $Molecule, $DataFieldLabelAndValuesRef) = @_;
|
|
327 my(@ColValues);
|
|
328
|
|
329 @ColValues = ();
|
|
330 if ($OptionsInfo{DataFieldsMode} =~ /^CompoundID$/i) {
|
|
331 push @ColValues, SetupCmpdIDForOutputFiles($CmpdCount, $Molecule, $DataFieldLabelAndValuesRef);
|
|
332 }
|
|
333 elsif ($OptionsInfo{DataFieldsMode} =~ /^All$/i) {
|
|
334 @ColValues = map { exists $DataFieldLabelAndValuesRef->{$_} ? $DataFieldLabelAndValuesRef->{$_} : ''} @{$SDFilesInfo{AllDataFieldsRef}[$FileIndex]};
|
|
335 }
|
|
336 elsif ($OptionsInfo{DataFieldsMode} =~ /^Common$/i) {
|
|
337 @ColValues = map { exists $DataFieldLabelAndValuesRef->{$_} ? $DataFieldLabelAndValuesRef->{$_} : ''} @{$SDFilesInfo{CommonDataFieldsRef}[$FileIndex]};
|
|
338 }
|
|
339 elsif ($OptionsInfo{DataFieldsMode} =~ /^Specify$/i) {
|
|
340 @ColValues = map { exists $DataFieldLabelAndValuesRef->{$_} ? $DataFieldLabelAndValuesRef->{$_} : ''} @{$OptionsInfo{SpecifiedDataFields}};
|
|
341 }
|
|
342
|
|
343 return \@ColValues;
|
|
344 }
|
|
345
|
|
346 # Generate compound ID for FP and FPText output files..
|
|
347 #
|
|
348 sub SetupCmpdIDForOutputFiles {
|
|
349 my($CmpdCount, $Molecule, $DataFieldLabelAndValuesRef) = @_;
|
|
350 my($CmpdID);
|
|
351
|
|
352 $CmpdID = '';
|
|
353 if ($OptionsInfo{CompoundIDMode} =~ /^MolNameOrLabelPrefix$/i) {
|
|
354 my($MolName);
|
|
355 $MolName = $Molecule->GetName();
|
|
356 $CmpdID = $MolName ? $MolName : "$OptionsInfo{CompoundID}${CmpdCount}";
|
|
357 }
|
|
358 elsif ($OptionsInfo{CompoundIDMode} =~ /^LabelPrefix$/i) {
|
|
359 $CmpdID = "$OptionsInfo{CompoundID}${CmpdCount}";
|
|
360 }
|
|
361 elsif ($OptionsInfo{CompoundIDMode} =~ /^DataField$/i) {
|
|
362 my($SpecifiedDataField);
|
|
363 $SpecifiedDataField = $OptionsInfo{CompoundID};
|
|
364 $CmpdID = exists $DataFieldLabelAndValuesRef->{$SpecifiedDataField} ? $DataFieldLabelAndValuesRef->{$SpecifiedDataField} : '';
|
|
365 }
|
|
366 elsif ($OptionsInfo{CompoundIDMode} =~ /^MolName$/i) {
|
|
367 $CmpdID = $Molecule->GetName();
|
|
368 }
|
|
369 return $CmpdID;
|
|
370 }
|
|
371
|
|
372 # Generate fingerprints for molecule...
|
|
373 #
|
|
374 sub GenerateMoleculeFingerprints {
|
|
375 my($Molecule) = @_;
|
|
376 my($TopologicalPharmacophoreAtomTripletsFingerprints);
|
|
377
|
|
378 if ($OptionsInfo{KeepLargestComponent}) {
|
|
379 $Molecule->KeepLargestComponent();
|
|
380 }
|
|
381 if (!$Molecule->DetectRings()) {
|
|
382 return undef;
|
|
383 }
|
|
384 $Molecule->SetAromaticityModel($OptionsInfo{AromaticityModel});
|
|
385 $Molecule->DetectAromaticity();
|
|
386
|
|
387 $TopologicalPharmacophoreAtomTripletsFingerprints = new Fingerprints::TopologicalPharmacophoreAtomTripletsFingerprints('Molecule' => $Molecule, 'AtomTripletsSetSizeToUse' => $OptionsInfo{AtomTripletsSetSizeToUse}, 'MinDistance' => $OptionsInfo{MinDistance}, 'MaxDistance' => $OptionsInfo{MaxDistance}, 'DistanceBinSize' => $OptionsInfo{DistanceBinSize}, 'UseTriangleInequality' => $OptionsInfo{UseTriangleInequality}, 'AtomTypesToUse' => \@{$OptionsInfo{AtomTypesToUse}});
|
|
388
|
|
389 # Generate fingerprints...
|
|
390 $TopologicalPharmacophoreAtomTripletsFingerprints->GenerateFingerprints();
|
|
391
|
|
392 # Make sure fingerprints generation is successful...
|
|
393 if (!$TopologicalPharmacophoreAtomTripletsFingerprints->IsFingerprintsGenerationSuccessful()) {
|
|
394 return undef;
|
|
395 }
|
|
396
|
|
397 return $TopologicalPharmacophoreAtomTripletsFingerprints;
|
|
398 }
|
|
399
|
|
400 # Retrieve information about SD files...
|
|
401 #
|
|
402 sub RetrieveSDFilesInfo {
|
|
403 my($SDFile, $Index, $FileDir, $FileExt, $FileName, $OutFileRoot, $TextOutFileExt, $SDOutFileExt, $FPOutFileExt, $NewSDFileName, $NewFPFileName, $NewTextFileName, $CheckDataField, $CollectDataFields, $AllDataFieldsRef, $CommonDataFieldsRef);
|
|
404
|
|
405 %SDFilesInfo = ();
|
|
406 @{$SDFilesInfo{FileOkay}} = ();
|
|
407 @{$SDFilesInfo{OutFileRoot}} = ();
|
|
408 @{$SDFilesInfo{SDOutFileNames}} = ();
|
|
409 @{$SDFilesInfo{FPOutFileNames}} = ();
|
|
410 @{$SDFilesInfo{TextOutFileNames}} = ();
|
|
411 @{$SDFilesInfo{AllDataFieldsRef}} = ();
|
|
412 @{$SDFilesInfo{CommonDataFieldsRef}} = ();
|
|
413
|
|
414 $CheckDataField = ($OptionsInfo{TextOutput} && ($OptionsInfo{DataFieldsMode} =~ /^CompoundID$/i) && ($OptionsInfo{CompoundIDMode} =~ /^DataField$/i)) ? 1 : 0;
|
|
415 $CollectDataFields = ($OptionsInfo{TextOutput} && ($OptionsInfo{DataFieldsMode} =~ /^(All|Common)$/i)) ? 1 : 0;
|
|
416
|
|
417 FILELIST: for $Index (0 .. $#SDFilesList) {
|
|
418 $SDFile = $SDFilesList[$Index];
|
|
419
|
|
420 $SDFilesInfo{FileOkay}[$Index] = 0;
|
|
421 $SDFilesInfo{OutFileRoot}[$Index] = '';
|
|
422 $SDFilesInfo{SDOutFileNames}[$Index] = '';
|
|
423 $SDFilesInfo{FPOutFileNames}[$Index] = '';
|
|
424 $SDFilesInfo{TextOutFileNames}[$Index] = '';
|
|
425
|
|
426 $SDFile = $SDFilesList[$Index];
|
|
427 if (!(-e $SDFile)) {
|
|
428 warn "Warning: Ignoring file $SDFile: It doesn't exist\n";
|
|
429 next FILELIST;
|
|
430 }
|
|
431 if (!CheckFileType($SDFile, "sd sdf")) {
|
|
432 warn "Warning: Ignoring file $SDFile: It's not a SD file\n";
|
|
433 next FILELIST;
|
|
434 }
|
|
435
|
|
436 if ($CheckDataField) {
|
|
437 # Make sure data field exists in SD file..
|
|
438 my($CmpdString, $SpecifiedDataField, @CmpdLines, %DataFieldValues);
|
|
439
|
|
440 @CmpdLines = ();
|
|
441 open SDFILE, "$SDFile" or die "Error: Couldn't open $SDFile: $! \n";
|
|
442 $CmpdString = ReadCmpdString(\*SDFILE);
|
|
443 close SDFILE;
|
|
444 @CmpdLines = split "\n", $CmpdString;
|
|
445 %DataFieldValues = GetCmpdDataHeaderLabelsAndValues(\@CmpdLines);
|
|
446 $SpecifiedDataField = $OptionsInfo{CompoundID};
|
|
447 if (!exists $DataFieldValues{$SpecifiedDataField}) {
|
|
448 warn "Warning: Ignoring file $SDFile: Data field value, $SpecifiedDataField, using \"--CompoundID\" option in \"DataField\" \"--CompoundIDMode\" doesn't exist\n";
|
|
449 next FILELIST;
|
|
450 }
|
|
451 }
|
|
452
|
|
453 $AllDataFieldsRef = '';
|
|
454 $CommonDataFieldsRef = '';
|
|
455 if ($CollectDataFields) {
|
|
456 my($CmpdCount);
|
|
457 open SDFILE, "$SDFile" or die "Error: Couldn't open $SDFile: $! \n";
|
|
458 ($CmpdCount, $AllDataFieldsRef, $CommonDataFieldsRef) = GetAllAndCommonCmpdDataHeaderLabels(\*SDFILE);
|
|
459 close SDFILE;
|
|
460 }
|
|
461
|
|
462 # Setup output file names...
|
|
463 $FileDir = ""; $FileName = ""; $FileExt = "";
|
|
464 ($FileDir, $FileName, $FileExt) = ParseFileName($SDFile);
|
|
465
|
|
466 $TextOutFileExt = "csv";
|
|
467 if ($Options{outdelim} =~ /^tab$/i) {
|
|
468 $TextOutFileExt = "tsv";
|
|
469 }
|
|
470 $SDOutFileExt = $FileExt;
|
|
471 $FPOutFileExt = "fpf";
|
|
472
|
|
473 if ($OptionsInfo{OutFileRoot} && (@SDFilesList == 1)) {
|
|
474 my ($RootFileDir, $RootFileName, $RootFileExt) = ParseFileName($OptionsInfo{OutFileRoot});
|
|
475 if ($RootFileName && $RootFileExt) {
|
|
476 $FileName = $RootFileName;
|
|
477 }
|
|
478 else {
|
|
479 $FileName = $OptionsInfo{OutFileRoot};
|
|
480 }
|
|
481 $OutFileRoot = $FileName;
|
|
482 }
|
|
483 else {
|
|
484 $OutFileRoot = "${FileName}TopologicalPharmacophoreAtomTripletsFP";
|
|
485 }
|
|
486
|
|
487 $NewSDFileName = "${OutFileRoot}.${SDOutFileExt}";
|
|
488 $NewFPFileName = "${OutFileRoot}.${FPOutFileExt}";
|
|
489 $NewTextFileName = "${OutFileRoot}.${TextOutFileExt}";
|
|
490
|
|
491 if ($OptionsInfo{SDOutput}) {
|
|
492 if ($SDFile =~ /$NewSDFileName/i) {
|
|
493 warn "Warning: Ignoring input file $SDFile: Same output, $NewSDFileName, and input file names.\n";
|
|
494 print "Specify a different name using \"-r --root\" option or use default name.\n";
|
|
495 next FILELIST;
|
|
496 }
|
|
497 }
|
|
498
|
|
499 if (!$OptionsInfo{OverwriteFiles}) {
|
|
500 # Check SD and text outout files...
|
|
501 if ($OptionsInfo{SDOutput}) {
|
|
502 if (-e $NewSDFileName) {
|
|
503 warn "Warning: Ignoring file $SDFile: The file $NewSDFileName already exists\n";
|
|
504 next FILELIST;
|
|
505 }
|
|
506 }
|
|
507 if ($OptionsInfo{FPOutput}) {
|
|
508 if (-e $NewFPFileName) {
|
|
509 warn "Warning: Ignoring file $SDFile: The file $NewFPFileName already exists\n";
|
|
510 next FILELIST;
|
|
511 }
|
|
512 }
|
|
513 if ($OptionsInfo{TextOutput}) {
|
|
514 if (-e $NewTextFileName) {
|
|
515 warn "Warning: Ignoring file $SDFile: The file $NewTextFileName already exists\n";
|
|
516 next FILELIST;
|
|
517 }
|
|
518 }
|
|
519 }
|
|
520
|
|
521 $SDFilesInfo{FileOkay}[$Index] = 1;
|
|
522
|
|
523 $SDFilesInfo{OutFileRoot}[$Index] = $OutFileRoot;
|
|
524 $SDFilesInfo{SDOutFileNames}[$Index] = $NewSDFileName;
|
|
525 $SDFilesInfo{FPOutFileNames}[$Index] = $NewFPFileName;
|
|
526 $SDFilesInfo{TextOutFileNames}[$Index] = $NewTextFileName;
|
|
527
|
|
528 $SDFilesInfo{AllDataFieldsRef}[$Index] = $AllDataFieldsRef;
|
|
529 $SDFilesInfo{CommonDataFieldsRef}[$Index] = $CommonDataFieldsRef;
|
|
530 }
|
|
531 }
|
|
532
|
|
533 # Process option values...
|
|
534 sub ProcessOptions {
|
|
535 %OptionsInfo = ();
|
|
536
|
|
537 ProcessAtomTypesToUseOption();
|
|
538
|
|
539 $OptionsInfo{AromaticityModel} = $Options{aromaticitymodel};
|
|
540
|
|
541 $OptionsInfo{AtomTripletsSetSizeToUse} = $Options{atomtripletssetsizetouse};
|
|
542
|
|
543 $OptionsInfo{CompoundIDMode} = $Options{compoundidmode};
|
|
544 $OptionsInfo{CompoundIDLabel} = $Options{compoundidlabel};
|
|
545 $OptionsInfo{DataFieldsMode} = $Options{datafieldsmode};
|
|
546
|
|
547 my(@SpecifiedDataFields);
|
|
548 @SpecifiedDataFields = ();
|
|
549
|
|
550 @{$OptionsInfo{SpecifiedDataFields}} = ();
|
|
551 $OptionsInfo{CompoundID} = '';
|
|
552
|
|
553 if ($Options{datafieldsmode} =~ /^CompoundID$/i) {
|
|
554 if ($Options{compoundidmode} =~ /^DataField$/i) {
|
|
555 if (!$Options{compoundid}) {
|
|
556 die "Error: You must specify a value for \"--CompoundID\" option in \"DataField\" \"--CompoundIDMode\". \n";
|
|
557 }
|
|
558 $OptionsInfo{CompoundID} = $Options{compoundid};
|
|
559 }
|
|
560 elsif ($Options{compoundidmode} =~ /^(LabelPrefix|MolNameOrLabelPrefix)$/i) {
|
|
561 $OptionsInfo{CompoundID} = $Options{compoundid} ? $Options{compoundid} : 'Cmpd';
|
|
562 }
|
|
563 }
|
|
564 elsif ($Options{datafieldsmode} =~ /^Specify$/i) {
|
|
565 if (!$Options{datafields}) {
|
|
566 die "Error: You must specify a value for \"--DataFields\" option in \"Specify\" \"-d, --DataFieldsMode\". \n";
|
|
567 }
|
|
568 @SpecifiedDataFields = split /\,/, $Options{datafields};
|
|
569 push @{$OptionsInfo{SpecifiedDataFields}}, @SpecifiedDataFields;
|
|
570 }
|
|
571
|
|
572 $OptionsInfo{Filter} = ($Options{filter} =~ /^Yes$/i) ? 1 : 0;
|
|
573
|
|
574 $OptionsInfo{FingerprintsLabelMode} = $Options{fingerprintslabelmode};
|
|
575 $OptionsInfo{FingerprintsLabel} = $Options{fingerprintslabel} ? $Options{fingerprintslabel} : 'TopologicalPharmacophoreAtomTripletsFingerprints';
|
|
576
|
|
577 $OptionsInfo{KeepLargestComponent} = ($Options{keeplargestcomponent} =~ /^Yes$/i) ? 1 : 0;
|
|
578
|
|
579 $OptionsInfo{DistanceBinSize} = $Options{distancebinsize};
|
|
580
|
|
581 $OptionsInfo{MinDistance} = $Options{mindistance};
|
|
582 $OptionsInfo{MaxDistance} = $Options{maxdistance};
|
|
583
|
|
584 $OptionsInfo{Output} = $Options{output};
|
|
585 $OptionsInfo{SDOutput} = ($Options{output} =~ /^(SD|All)$/i) ? 1 : 0;
|
|
586 $OptionsInfo{FPOutput} = ($Options{output} =~ /^(FP|All)$/i) ? 1 : 0;
|
|
587 $OptionsInfo{TextOutput} = ($Options{output} =~ /^(Text|All)$/i) ? 1 : 0;
|
|
588
|
|
589 $OptionsInfo{OutDelim} = $Options{outdelim};
|
|
590 $OptionsInfo{OutQuote} = ($Options{quote} =~ /^Yes$/i) ? 1 : 0;
|
|
591
|
|
592 $OptionsInfo{OverwriteFiles} = $Options{overwrite} ? 1 : 0;
|
|
593 $OptionsInfo{OutFileRoot} = $Options{root} ? $Options{root} : 0;
|
|
594
|
|
595 $OptionsInfo{UseTriangleInequality} = ($Options{usetriangleinequality} =~ /^Yes$/i) ? 1 : 0;
|
|
596
|
|
597 # Setup default vector string format...
|
|
598 my($VectorStringFormat);
|
|
599 $VectorStringFormat = '';
|
|
600
|
|
601 if ($Options{vectorstringformat}) {
|
|
602 $VectorStringFormat = $Options{vectorstringformat};
|
|
603
|
|
604 if ($Options{atomtripletssetsizetouse} =~ /^ArbitrarySize$/i && $VectorStringFormat =~ /^ValuesString$/i) {
|
|
605 die "Error: The value specified, $Options{vectorstringformat}, for option \"-v, --VectorStringFormat\" is not valid for $Options{atomtripletssetsizetouse} value of \"--AtomTripletsSetSizeToUse\" option. Allowed values: IDsAndValuesString, IDsAndValuesPairsString, ValuesAndIDsString or ValuesAndIDsPairsString\n";
|
|
606 }
|
|
607 }
|
|
608 else {
|
|
609 $VectorStringFormat = ($Options{atomtripletssetsizetouse} =~ /^FixedSize$/) ? "ValuesString" : "IDsAndValuesString";
|
|
610 }
|
|
611 $OptionsInfo{VectorStringFormat} = $VectorStringFormat;
|
|
612 }
|
|
613
|
|
614 # Process atom type to use option...
|
|
615 #
|
|
616 sub ProcessAtomTypesToUseOption {
|
|
617 my($AtomType, $SpecifiedAtomTypesToUse, @AtomTypesWords);
|
|
618
|
|
619 @{$OptionsInfo{AtomTypesToUse}} = ();
|
|
620 if (IsEmpty($Options{atomtypestouse})) {
|
|
621 die "Error: Atom types value specified using \"-a, --AtomTypesToUse\" option is empty\n";
|
|
622 }
|
|
623
|
|
624 $SpecifiedAtomTypesToUse = $Options{atomtypestouse};
|
|
625 $SpecifiedAtomTypesToUse =~ s/ //g;
|
|
626 @AtomTypesWords = split /\,/, $SpecifiedAtomTypesToUse;
|
|
627
|
|
628 for $AtomType (@AtomTypesWords) {
|
|
629 if (!AtomTypes::FunctionalClassAtomTypes::IsFunctionalClassAvailable($AtomType)) {
|
|
630 die "Error: Atom type specified, $AtomType, using \"-a, --AtomTypesToUse\" option is not valid...\n ";
|
|
631 }
|
|
632 push @{$OptionsInfo{AtomTypesToUse}}, $AtomType;
|
|
633 }
|
|
634 }
|
|
635
|
|
636 # Setup script usage and retrieve command line arguments specified using various options...
|
|
637 sub SetupScriptUsage {
|
|
638
|
|
639 # Retrieve all the options...
|
|
640 %Options = ();
|
|
641
|
|
642 $Options{aromaticitymodel} = 'MayaChemToolsAromaticityModel';
|
|
643
|
|
644 $Options{atomtripletssetsizetouse} = 'ArbitrarySize';
|
|
645
|
|
646 $Options{atomtypestouse} = 'HBD,HBA,PI,NI,H,Ar';
|
|
647
|
|
648 $Options{compoundidmode} = 'LabelPrefix';
|
|
649 $Options{compoundidlabel} = 'CompoundID';
|
|
650 $Options{datafieldsmode} = 'CompoundID';
|
|
651
|
|
652 $Options{filter} = 'Yes';
|
|
653
|
|
654 $Options{fingerprintslabelmode} = 'FingerprintsLabelOnly';
|
|
655
|
|
656 $Options{keeplargestcomponent} = 'Yes';
|
|
657
|
|
658 $Options{mindistance} = 1;
|
|
659 $Options{maxdistance} = 10;
|
|
660
|
|
661 $Options{distancebinsize} = 2;
|
|
662
|
|
663 $Options{usetriangleinequality} = 'Yes';
|
|
664
|
|
665 $Options{output} = 'text';
|
|
666 $Options{outdelim} = 'comma';
|
|
667 $Options{quote} = 'yes';
|
|
668
|
|
669 $Options{vectorstringformat} = '';
|
|
670
|
|
671 if (!GetOptions(\%Options, "aromaticitymodel=s", "atomtripletssetsizetouse=s", "atomtypestouse|a=s", "compoundid=s", "compoundidlabel=s", "compoundidmode=s", "datafields=s", "datafieldsmode|d=s", "distancebinsize=s", "filter|f=s", "fingerprintslabelmode=s", "fingerprintslabel=s", "help|h", "keeplargestcomponent|k=s", "mindistance=s", "maxdistance=s", "outdelim=s", "output=s", "overwrite|o", "quote|q=s", "root|r=s", "usetriangleinequality|u=s", "vectorstringformat|v=s", "workingdir|w=s")) {
|
|
672 die "\nTo get a list of valid options and their values, use \"$ScriptName -h\" or\n\"perl -S $ScriptName -h\" command and try again...\n";
|
|
673 }
|
|
674 if ($Options{workingdir}) {
|
|
675 if (! -d $Options{workingdir}) {
|
|
676 die "Error: The value specified, $Options{workingdir}, for option \"-w --workingdir\" is not a directory name.\n";
|
|
677 }
|
|
678 chdir $Options{workingdir} or die "Error: Couldn't chdir $Options{workingdir}: $! \n";
|
|
679 }
|
|
680 if (!Molecule::IsSupportedAromaticityModel($Options{aromaticitymodel})) {
|
|
681 my(@SupportedModels) = Molecule::GetSupportedAromaticityModels();
|
|
682 die "Error: The value specified, $Options{aromaticitymodel}, for option \"--AromaticityModel\" is not valid. Supported aromaticity models in current release of MayaChemTools: @SupportedModels\n";
|
|
683 }
|
|
684 if ($Options{atomtripletssetsizetouse} !~ /^(ArbitrarySize|FixedSize)$/i) {
|
|
685 die "Error: The value specified, $Options{atomtripletssetsizetouse}, for option \"--AtomTripletsSetSizeToUse\" is not valid. Allowed values: ArbitrarySize or FixedSize\n";
|
|
686 }
|
|
687 if ($Options{compoundidmode} !~ /^(DataField|MolName|LabelPrefix|MolNameOrLabelPrefix)$/i) {
|
|
688 die "Error: The value specified, $Options{compoundidmode}, for option \"--CompoundIDMode\" is not valid. Allowed values: DataField, MolName, LabelPrefix or MolNameOrLabelPrefix\n";
|
|
689 }
|
|
690 if ($Options{datafieldsmode} !~ /^(All|Common|Specify|CompoundID)$/i) {
|
|
691 die "Error: The value specified, $Options{datafieldsmode}, for option \"-d, --DataFieldsMode\" is not valid. Allowed values: All, Common, Specify or CompoundID\n";
|
|
692 }
|
|
693 if (!IsPositiveInteger($Options{distancebinsize})) {
|
|
694 die "Error: The value specified, $Options{distancebinsize}, for option \"--DistanceBinSize\" is not valid. Allowed values: > 0 \n";
|
|
695 }
|
|
696 if ($Options{filter} !~ /^(Yes|No)$/i) {
|
|
697 die "Error: The value specified, $Options{filter}, for option \"-f, --Filter\" is not valid. Allowed values: Yes or No\n";
|
|
698 }
|
|
699 if ($Options{fingerprintslabelmode} !~ /^(FingerprintsLabelOnly|FingerprintsLabelWithIDs)$/i) {
|
|
700 die "Error: The value specified, $Options{fingerprintslabelmode}, for option \"--FingerprintsLabelMode\" is not valid. Allowed values: FingerprintsLabelOnly or FingerprintsLabelWithIDs\n";
|
|
701 }
|
|
702 if ($Options{keeplargestcomponent} !~ /^(Yes|No)$/i) {
|
|
703 die "Error: The value specified, $Options{keeplargestcomponent}, for option \"-k, --KeepLargestComponent\" is not valid. Allowed values: Yes or No\n";
|
|
704 }
|
|
705 if (!IsPositiveInteger($Options{mindistance})) {
|
|
706 die "Error: The value specified, $Options{mindistance}, for option \"--MinDistance\" is not valid. Allowed values: > 0 \n";
|
|
707 }
|
|
708 if (!IsPositiveInteger($Options{maxdistance})) {
|
|
709 die "Error: The value specified, $Options{maxdistance}, for option \"--MaxDistance\" is not valid. Allowed values: > 0 \n";
|
|
710 }
|
|
711 if ($Options{mindistance} > $Options{maxdistance}) {
|
|
712 die "Error: The value specified, specified, $Options{mindistance}, for option \"--MinDistance\" must be less than the value specified, $Options{maxdistance}, for option \"--MaxDistance\" \n";
|
|
713 }
|
|
714 if ($Options{output} !~ /^(SD|FP|text|all)$/i) {
|
|
715 die "Error: The value specified, $Options{output}, for option \"--output\" is not valid. Allowed values: SD, FP, text, or all\n";
|
|
716 }
|
|
717 if ($Options{outdelim} !~ /^(comma|semicolon|tab)$/i) {
|
|
718 die "Error: The value specified, $Options{outdelim}, for option \"--outdelim\" is not valid. Allowed values: comma, tab, or semicolon\n";
|
|
719 }
|
|
720 if ($Options{quote} !~ /^(Yes|No)$/i) {
|
|
721 die "Error: The value specified, $Options{quote}, for option \"-q --quote\" is not valid. Allowed values: Yes or No\n";
|
|
722 }
|
|
723 if ($Options{outdelim} =~ /semicolon/i && $Options{quote} =~ /^No$/i) {
|
|
724 die "Error: The value specified, $Options{quote}, for option \"-q --quote\" is not allowed with, semicolon value of \"--outdelim\" option: Fingerprints string use semicolon as delimiter for various data fields and must be quoted.\n";
|
|
725 }
|
|
726 if ($Options{usetriangleinequality} !~ /^(Yes|No)$/i) {
|
|
727 die "Error: The value specified, $Options{usetriangleinequality}, for option \"-u, --UseTriangleInequality\" is not valid. Allowed values: Yes or No\n";
|
|
728 }
|
|
729 if ($Options{vectorstringformat} && $Options{vectorstringformat} !~ /^(ValuesString|IDsAndValuesString|IDsAndValuesPairsString|ValuesAndIDsString|ValuesAndIDsPairsString)$/i) {
|
|
730 die "Error: The value specified, $Options{vectorstringformat}, for option \"-v, --VectorStringFormat\" is not valid. Allowed values: ValuesString, IDsAndValuesString, IDsAndValuesPairsString, ValuesAndIDsString or ValuesAndIDsPairsString\n";
|
|
731 }
|
|
732 }
|
|
733
|
|
734 __END__
|
|
735
|
|
736 =head1 NAME
|
|
737
|
|
738 TopologicalPharmacophoreAtomTripletsFingerprints.pl - Generate topological pharmacophore atom triplets fingerprints for SD files
|
|
739
|
|
740 =head1 SYNOPSIS
|
|
741
|
|
742 TopologicalPharmacophoreAtomTripletsFingerprints.pl SDFile(s)...
|
|
743
|
|
744 TopologicalPharmacophoreAtomTripletsFingerprints.pl [B<--AromaticityModel> I<AromaticityModelType>]
|
|
745 [B<--AtomTripletsSetSizeToUse> I<ArbitrarySize | FixedSize>]
|
|
746 [B<-a, --AtomTypesToUse> I<"AtomType1, AtomType2...">]
|
|
747 [B<--AtomTypesWeight> I<"AtomType1, Weight1, AtomType2, Weight2...">]
|
|
748 [B<--CompoundID> I<DataFieldName or LabelPrefixString>] [B<--CompoundIDLabel> I<text>]
|
|
749 [B<--CompoundIDMode>] [B<--DataFields> I<"FieldLabel1, FieldLabel2,...">]
|
|
750 [B<-d, --DataFieldsMode> I<All | Common | Specify | CompoundID>] [B<--DistanceBinSize> I<number>] [B<-f, --Filter> I<Yes | No>]
|
|
751 [B<--FingerprintsLabelMode> I<FingerprintsLabelOnly | FingerprintsLabelWithIDs>] [B<--FingerprintsLabel> I<text>]
|
|
752 [B<-h, --help>] [B<-k, --KeepLargestComponent> I<Yes | No>] [B<--MinDistance> I<number>] [B<--MaxDistance> I<number>]
|
|
753 [B<--OutDelim> I<comma | tab | semicolon>] [B<--output> I<SD | FP | text | all>] [B<-o, --overwrite>]
|
|
754 [B<-q, --quote> I<Yes | No>] [B<-r, --root> I<RootName>] [B<-u, --UseTriangleInequality> I<Yes | No>]
|
|
755 [B<-v, --VectorStringFormat> I<ValuesString, IDsAndValuesString | IDsAndValuesPairsString | ValuesAndIDsString | ValuesAndIDsPairsString>]
|
|
756 [B<-w, --WorkingDir> dirname] SDFile(s)...
|
|
757
|
|
758 =head1 DESCRIPTION
|
|
759
|
|
760 Generate topological pharmacophore atom triplets fingerprints [ Ref 66, Ref 68-71 ] for
|
|
761 I<SDFile(s)> and create appropriate SD, FP or CSV/TSV text file(s) containing fingerprints vector
|
|
762 strings corresponding to molecular fingerprints.
|
|
763
|
|
764 Multiple SDFile names are separated by spaces. The valid file extensions are I<.sdf>
|
|
765 and I<.sd>. All other file names are ignored. All the SD files in a current directory
|
|
766 can be specified either by I<*.sdf> or the current directory name.
|
|
767
|
|
768 Based on the values specified for B<--AtomTypesToUse>, pharmacophore atom types are
|
|
769 assigned to all non-hydrogen atoms in a molecule and a distance matrix is generated.
|
|
770 Using B<--MinDistance>, B<--MaxDistance>, and B<--DistanceBinSize> values, a
|
|
771 binned distance matrix is generated with lower bound on the distance bin as the distance
|
|
772 in distance matrix; the lower bound on the distance bin is also used as the distance between
|
|
773 atom pairs for generation of atom triplet identifiers.
|
|
774
|
|
775 A pharmacophore atom triplets basis set is generated for all unique atom triplets constituting
|
|
776 atom pairs binned distances between B<--MinDistance> and B<--MaxDistance>. The value
|
|
777 of B<--UseTriangleInequality> determines whether the triangle inequality test is applied during
|
|
778 generation of atom triplets basis set. The lower distance bound, along with specified pharmacophore
|
|
779 types, is used during generation of atom triplet IDs.
|
|
780
|
|
781 Let:
|
|
782
|
|
783 P = Valid pharmacophore atom type
|
|
784
|
|
785 Px = Pharmacophore atom x
|
|
786 Py = Pharmacophore atom y
|
|
787 Pz = Pharmacophore atom z
|
|
788
|
|
789 Dmin = Minimum distance corresponding to number of bonds between two atoms
|
|
790 Dmax = Maximum distance corresponding to number of bonds between two atoms
|
|
791 D = Distance corresponding to number of bonds between two atom
|
|
792
|
|
793 Bsize = Distance bin size
|
|
794 Nbins = Number of distance bins
|
|
795
|
|
796 Dxy = Distance or lower bound of binned distance between Px and Py
|
|
797 Dxz = Distance or lower bound of binned distance between Px and Pz
|
|
798 Dyz = Distance or lower bound of binned distance between Py and Pz
|
|
799
|
|
800 Then:
|
|
801
|
|
802 PxDyz-PyDxz-PzDxy = Pharmacophore atom triplet IDs for atom types Px,
|
|
803 Py, and Pz
|
|
804
|
|
805 For example: H1-H1-H1, H2-HBA-H2 and so on
|
|
806
|
|
807 For default values of Dmin = 1 , Dmax = 10 and Bsize = 2:
|
|
808
|
|
809 the number of distance bins, Nbins = 5, are:
|
|
810
|
|
811 [1, 2] [3, 4] [5, 6] [7, 8] [9 10]
|
|
812
|
|
813 and atom triplet basis set size is 2692.
|
|
814
|
|
815 Atom triplet basis set size for various values of Dmin, Dmax and Bsize in
|
|
816 conjunction with usage of triangle inequality is:
|
|
817
|
|
818 Dmin Dmax Bsize UseTriangleInequality TripletBasisSetSize
|
|
819 1 10 2 No 4960
|
|
820 1 10 2 Yes 2692 [ Default ]
|
|
821 2 12 2 No 8436
|
|
822 2 12 2 Yes 4494
|
|
823
|
|
824
|
|
825 Using binned distance matrix and pharmacohore atom types, occurrence of unique pharmacohore
|
|
826 atom triplets is counted.
|
|
827
|
|
828 The final pharmacophore atom triples count along with atom pair identifiers involving all non-hydrogen
|
|
829 atoms constitute pharmacophore topological atom triplets fingerprints of the molecule.
|
|
830
|
|
831 For I<ArbitrarySize> value of B<--AtomTripletsSetSizeToUse> option, the fingerprint vector correspond to
|
|
832 only those topological pharmacophore atom triplets which are present and have non-zero count. However,
|
|
833 for I<FixedSize> value of B<--AtomTripletsSetSizeToUse> option, the fingerprint vector contains all possible
|
|
834 valid topological pharmacophore atom triplets with both zero and non-zero count values.
|
|
835
|
|
836 Example of I<SD> file containing topological pharmacophore atom triplets fingerprints string data:
|
|
837
|
|
838 ... ...
|
|
839 ... ...
|
|
840 $$$$
|
|
841 ... ...
|
|
842 ... ...
|
|
843 ... ...
|
|
844 41 44 0 0 0 0 0 0 0 0999 V2000
|
|
845 -3.3652 1.4499 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
|
846 ... ...
|
|
847 2 3 1 0 0 0 0
|
|
848 ... ...
|
|
849 M END
|
|
850 > <CmpdID>
|
|
851 Cmpd1
|
|
852
|
|
853 > <TopologicalPharmacophoreAtomTripletsFingerprints>
|
|
854 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:ArbitrarySize:
|
|
855 MinDistance1:MaxDistance10;696;NumericalValues;IDsAndValuesString;Ar1-
|
|
856 Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1 Ar1-H1-H1 Ar1-H1-HBA1 Ar1
|
|
857 -H1-HBD1 Ar1-HBA1-HBD1 H1-H1-H1 H1-H1-HBA1 H1-H1-HBD1 H1-HBA1-HBA1 H1-
|
|
858 HBA1-HBD1 H1-HBA1-NI1 H1-HBD1-NI1 HBA1-HBA1-NI1 HBA1-HBD1-NI1 Ar1-...;
|
|
859 46 106 8 3 83 11 4 1 21 5 3 1 2 2 1 1 1 100 101 18 11 145 132 26 14 23
|
|
860 28 3 3 5 4 61 45 10 4 16 20 7 5 1 3 4 5 3 1 1 1 1 5 4 2 1 2 2 2 1 1 1
|
|
861 119 123 24 15 185 202 41 25 22 17 3 5 85 95 18 11 23 17 3 1 1 6 4 ...
|
|
862
|
|
863 $$$$
|
|
864 ... ...
|
|
865 ... ...
|
|
866
|
|
867 Example of I<FP> file containing topological pharmacophore atom triplets fingerprints string data:
|
|
868
|
|
869 #
|
|
870 # Package = MayaChemTools 7.4
|
|
871 # Release Date = Oct 21, 2010
|
|
872 #
|
|
873 # TimeStamp = Fri Mar 11 15:38:58 2011
|
|
874 #
|
|
875 # FingerprintsStringType = FingerprintsVector
|
|
876 #
|
|
877 # Description = TopologicalPharmacophoreAtomTriplets:ArbitrarySize:M...
|
|
878 # VectorStringFormat = IDsAndValuesString
|
|
879 # VectorValuesType = NumericalValues
|
|
880 #
|
|
881 Cmpd1 696;Ar1-Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1...;;46 106...
|
|
882 Cmpd2 251;H1-H1-H1 H1-H1-HBA1 H1-H1-HBD1 H1-H1-NI1...;4 1 3 1 1 2 2...
|
|
883 ... ...
|
|
884 ... ..
|
|
885
|
|
886 Example of CSV I<Text> file containing topological pharmacophore atom triplets fingerprints string data:
|
|
887
|
|
888 "CompoundID","TopologicalPharmacophoreAtomTripletsFingerprints"
|
|
889 "Cmpd1","FingerprintsVector;TopologicalPharmacophoreAtomTriplets:Arbitr
|
|
890 arySize:MinDistance1:MaxDistance10;696;NumericalValues;IDsAndValuesStri
|
|
891 ng;Ar1-Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1 Ar1-H1-H1 Ar1-H1-HB
|
|
892 A1 Ar1-H1-HBD1 Ar1-HBA1-HBD1 H1-H1-H1 H1-H1-HBA1 H1-H1-HBD1 H1-HBA1-HBA
|
|
893 1 H1-HBA1-HBD1 H1-HBA1-NI1 H1-HBD1-NI1 HBA1-HBA1-NI1 HBA1-HBD1-NI1 A...;
|
|
894 46 106 8 3 83 11 4 1 21 5 3 1 2 2 1 1 1 100 101 18 11 145 132 26 14 23
|
|
895 28 3 3 5 4 61 45 10 4 16 20 7 5 1 3 4 5 3 1 1 1 1 5 4 2 1 2 2 2 1 1 1
|
|
896 119 123 24 15 185 202 41 25 22 17 3 5 85 95 18 11 23 17 3 1 1 6 4 ...
|
|
897 ... ...
|
|
898 ... ...
|
|
899
|
|
900 The current release of MayaChemTools generates the following types of topological pharmacophore
|
|
901 atom triplets fingerprints vector strings:
|
|
902
|
|
903 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:ArbitrarySize:
|
|
904 MinDistance1:MaxDistance10;696;NumericalValues;IDsAndValuesString;Ar1-
|
|
905 Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1 Ar1-H1-H1 Ar1-H1-HBA1 Ar1
|
|
906 -H1-HBD1 Ar1-HBA1-HBD1 H1-H1-H1 H1-H1-HBA1 H1-H1-HBD1 H1-HBA1-HBA1 H1-
|
|
907 HBA1-HBD1 H1-HBA1-NI1 H1-HBD1-NI1 HBA1-HBA1-NI1 HBA1-HBD1-NI1 Ar1-...;
|
|
908 46 106 8 3 83 11 4 1 21 5 3 1 2 2 1 1 1 100 101 18 11 145 132 26 14 23
|
|
909 28 3 3 5 4 61 45 10 4 16 20 7 5 1 3 4 5 3 1 1 1 1 5 4 2 1 2 2 2 1 1 1
|
|
910 119 123 24 15 185 202 41 25 22 17 3 5 85 95 18 11 23 17 3 1 1 6 4 ...
|
|
911
|
|
912 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:FixedSize:MinD
|
|
913 istance1:MaxDistance10;2692;OrderedNumericalValues;ValuesString;46 106
|
|
914 8 3 0 0 83 11 4 0 0 0 1 0 0 0 0 0 0 0 0 21 5 3 0 0 1 2 2 0 0 1 0 0 0
|
|
915 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 101 18 11 0 0 145 132 26
|
|
916 14 0 0 23 28 3 3 0 0 5 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 45 10 4 0
|
|
917 0 16 20 7 5 1 0 3 4 5 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 5 ...
|
|
918
|
|
919 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:FixedSize:MinD
|
|
920 istance1:MaxDistance10;2692;OrderedNumericalValues;IDsAndValuesString;
|
|
921 Ar1-Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1 Ar1-Ar1-NI1 Ar1-Ar1-P
|
|
922 I1 Ar1-H1-H1 Ar1-H1-HBA1 Ar1-H1-HBD1 Ar1-H1-NI1 Ar1-H1-PI1 Ar1-HBA1-HB
|
|
923 A1 Ar1-HBA1-HBD1 Ar1-HBA1-NI1 Ar1-HBA1-PI1 Ar1-HBD1-HBD1 Ar1-HBD1-...;
|
|
924 46 106 8 3 0 0 83 11 4 0 0 0 1 0 0 0 0 0 0 0 0 21 5 3 0 0 1 2 2 0 0 1
|
|
925 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 101 18 11 0 0 145
|
|
926 132 26 14 0 0 23 28 3 3 0 0 5 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 ...
|
|
927
|
|
928 =head1 OPTIONS
|
|
929
|
|
930 =over 4
|
|
931
|
|
932 =item B<--AromaticityModel> I<MDLAromaticityModel | TriposAromaticityModel | MMFFAromaticityModel | ChemAxonBasicAromaticityModel | ChemAxonGeneralAromaticityModel | DaylightAromaticityModel | MayaChemToolsAromaticityModel>
|
|
933
|
|
934 Specify aromaticity model to use during detection of aromaticity. Possible values in the current
|
|
935 release are: I<MDLAromaticityModel, TriposAromaticityModel, MMFFAromaticityModel,
|
|
936 ChemAxonBasicAromaticityModel, ChemAxonGeneralAromaticityModel, DaylightAromaticityModel
|
|
937 or MayaChemToolsAromaticityModel>. Default value: I<MayaChemToolsAromaticityModel>.
|
|
938
|
|
939 The supported aromaticity model names along with model specific control parameters
|
|
940 are defined in B<AromaticityModelsData.csv>, which is distributed with the current release
|
|
941 and is available under B<lib/data> directory. B<Molecule.pm> module retrieves data from
|
|
942 this file during class instantiation and makes it available to method B<DetectAromaticity>
|
|
943 for detecting aromaticity corresponding to a specific model.
|
|
944
|
|
945 =item B<--AtomTripletsSetSizeToUse> I<ArbitrarySize | FixedSize>
|
|
946
|
|
947 Atom triplets set size to use during generation of topological pharmacophore atom triplets
|
|
948 fingerprints.
|
|
949
|
|
950 Possible values: I<ArbitrarySize | FixedSize>; Default value: I<ArbitrarySize>.
|
|
951
|
|
952 For I<ArbitrarySize> value of B<--AtomTripletsSetSizeToUse> option, the fingerprint vector
|
|
953 correspond to only those topological pharmacophore atom triplets which are present and
|
|
954 have non-zero count. However, for I<FixedSize> value of B<--AtomTripletsSetSizeToUse>
|
|
955 option, the fingerprint vector contains all possible valid topological pharmacophore atom
|
|
956 triplets with both zero and non-zero count values.
|
|
957
|
|
958 =item B<-a, --AtomTypesToUse> I<"AtomType1,AtomType2,...">
|
|
959
|
|
960 Pharmacophore atom types to use during generation of topological phramacophore
|
|
961 atom triplets. It's a list of comma separated valid pharmacophore atom types.
|
|
962
|
|
963 Possible values for pharmacophore atom types are: I<Ar, CA, H, HBA, HBD, Hal, NI, PI, RA>.
|
|
964 Default value [ Ref 71 ] : I<HBD,HBA,PI,NI,H,Ar>.
|
|
965
|
|
966 The pharmacophore atom types abbreviations correspond to:
|
|
967
|
|
968 HBD: HydrogenBondDonor
|
|
969 HBA: HydrogenBondAcceptor
|
|
970 PI : PositivelyIonizable
|
|
971 NI : NegativelyIonizable
|
|
972 Ar : Aromatic
|
|
973 Hal : Halogen
|
|
974 H : Hydrophobic
|
|
975 RA : RingAtom
|
|
976 CA : ChainAtom
|
|
977
|
|
978 I<AtomTypes::FunctionalClassAtomTypes> module is used to assign pharmacophore atom
|
|
979 types. It uses following definitions [ Ref 60-61, Ref 65-66 ]:
|
|
980
|
|
981 HydrogenBondDonor: NH, NH2, OH
|
|
982 HydrogenBondAcceptor: N[!H], O
|
|
983 PositivelyIonizable: +, NH2
|
|
984 NegativelyIonizable: -, C(=O)OH, S(=O)OH, P(=O)OH
|
|
985
|
|
986 =item B<--CompoundID> I<DataFieldName or LabelPrefixString>
|
|
987
|
|
988 This value is B<--CompoundIDMode> specific and indicates how compound ID is generated.
|
|
989
|
|
990 For I<DataField> value of B<--CompoundIDMode> option, it corresponds to datafield label name
|
|
991 whose value is used as compound ID; otherwise, it's a prefix string used for generating compound
|
|
992 IDs like LabelPrefixString<Number>. Default value, I<Cmpd>, generates compound IDs which
|
|
993 look like Cmpd<Number>.
|
|
994
|
|
995 Examples for I<DataField> value of B<--CompoundIDMode>:
|
|
996
|
|
997 MolID
|
|
998 ExtReg
|
|
999
|
|
1000 Examples for I<LabelPrefix> or I<MolNameOrLabelPrefix> value of B<--CompoundIDMode>:
|
|
1001
|
|
1002 Compound
|
|
1003
|
|
1004 The value specified above generates compound IDs which correspond to Compound<Number>
|
|
1005 instead of default value of Cmpd<Number>.
|
|
1006
|
|
1007 =item B<--CompoundIDLabel> I<text>
|
|
1008
|
|
1009 Specify compound ID column label for CSV/TSV text file(s) used during I<CompoundID> value
|
|
1010 of B<--DataFieldsMode> option. Default value: I<CompoundID>.
|
|
1011
|
|
1012 =item B<--CompoundIDMode> I<DataField | MolName | LabelPrefix | MolNameOrLabelPrefix>
|
|
1013
|
|
1014 Specify how to generate compound IDs and write to FP or CSV/TSV text file(s) along with generated
|
|
1015 fingerprints for I<FP | text | all> values of B<--output> option: use a I<SDFile(s)> datafield value;
|
|
1016 use molname line from I<SDFile(s)>; generate a sequential ID with specific prefix; use combination
|
|
1017 of both MolName and LabelPrefix with usage of LabelPrefix values for empty molname lines.
|
|
1018
|
|
1019 Possible values: I<DataField | MolName | LabelPrefix | MolNameOrLabelPrefix>.
|
|
1020 Default value: I<LabelPrefix>.
|
|
1021
|
|
1022 For I<MolNameAndLabelPrefix> value of B<--CompoundIDMode>, molname line in I<SDFile(s)> takes
|
|
1023 precedence over sequential compound IDs generated using I<LabelPrefix> and only empty molname
|
|
1024 values are replaced with sequential compound IDs.
|
|
1025
|
|
1026 This is only used for I<CompoundID> value of B<--DataFieldsMode> option.
|
|
1027
|
|
1028 =item B<--DataFields> I<"FieldLabel1,FieldLabel2,...">
|
|
1029
|
|
1030 Comma delimited list of I<SDFiles(s)> data fields to extract and write to CSV/TSV text file(s) along
|
|
1031 with generated fingerprints for I<text | all> values of B<--output> option.
|
|
1032
|
|
1033 This is only used for I<Specify> value of B<--DataFieldsMode> option.
|
|
1034
|
|
1035 Examples:
|
|
1036
|
|
1037 Extreg
|
|
1038 MolID,CompoundName
|
|
1039
|
|
1040 =item B<-d, --DataFieldsMode> I<All | Common | Specify | CompoundID>
|
|
1041
|
|
1042 Specify how data fields in I<SDFile(s)> are transferred to output CSV/TSV text file(s) along
|
|
1043 with generated fingerprints for I<text | all> values of B<--output> option: transfer all SD
|
|
1044 data field; transfer SD data files common to all compounds; extract specified data fields;
|
|
1045 generate a compound ID using molname line, a compound prefix, or a combination of both.
|
|
1046 Possible values: I<All | Common | specify | CompoundID>. Default value: I<CompoundID>.
|
|
1047
|
|
1048 =item B<--DistanceBinSize> I<number>
|
|
1049
|
|
1050 Distance bin size used to bin distances between atom pairs in atom triplets. Default value: I<2>.
|
|
1051 Valid values: positive integers.
|
|
1052
|
|
1053 For default B<--MinDistance> and B<--MaxDistance> values of 1 and 10 with B<--DistanceBinSize>
|
|
1054 of 2 [ Ref 70 ], the following 5 distance bins are generated:
|
|
1055
|
|
1056 [1, 2] [3, 4] [5, 6] [7, 8] [9 10]
|
|
1057
|
|
1058 The lower distance bound on the distance bin is uses to bin the distance between atom pairs in
|
|
1059 atom triplets. So in the previous example, atom pairs with distances 1 and 2 fall in first distance
|
|
1060 bin, atom pairs with distances 3 and 4 fall in second distance bin and so on.
|
|
1061
|
|
1062 In order to distribute distance bins of equal size, the last bin is allowed to go past B<--MaxDistance>
|
|
1063 by up to distance bin size. For example, B<--MinDistance> and B<--MaxDistance> values of 2 and 10
|
|
1064 with B<--DistanceBinSize> of 2 generates the following 6 distance bins:
|
|
1065
|
|
1066 [2, 3] [4, 5] [6, 7] [8, 9] [10 11]
|
|
1067
|
|
1068 =item B<-f, --Filter> I<Yes | No>
|
|
1069
|
|
1070 Specify whether to check and filter compound data in SDFile(s). Possible values: I<Yes or No>.
|
|
1071 Default value: I<Yes>.
|
|
1072
|
|
1073 By default, compound data is checked before calculating fingerprints and compounds containing
|
|
1074 atom data corresponding to non-element symbols or no atom data are ignored.
|
|
1075
|
|
1076 =item B<--FingerprintsLabelMode> I<FingerprintsLabelOnly | FingerprintsLabelWithIDs>
|
|
1077
|
|
1078 Specify how fingerprints label is generated in conjunction with B<--FingerprintsLabel> option value:
|
|
1079 use fingerprints label generated only by B<--FingerprintsLabel> option value or append topological
|
|
1080 atom pair count value IDs to B<--FingerprintsLabel> option value.
|
|
1081
|
|
1082 Possible values: I<FingerprintsLabelOnly | FingerprintsLabelWithIDs>. Default value:
|
|
1083 I<FingerprintsLabelOnly>.
|
|
1084
|
|
1085 Topological atom pairs IDs appended to B<--FingerprintsLabel> value during I<FingerprintsLabelWithIDs>
|
|
1086 values of B<--FingerprintsLabelMode> correspond to atom pair count values in fingerprint vector string.
|
|
1087
|
|
1088 I<FingerprintsLabelWithIDs> value of B<--FingerprintsLabelMode> is ignored during I<ArbitrarySize> value
|
|
1089 of B<--AtomTripletsSetSizeToUse> option and topological atom triplets IDs not appended to the label.
|
|
1090
|
|
1091 =item B<--FingerprintsLabel> I<text>
|
|
1092
|
|
1093 SD data label or text file column label to use for fingerprints string in output SD or
|
|
1094 CSV/TSV text file(s) specified by B<--output>. Default value: I<TopologicalPharmacophoreAtomTripletsFingerprints>.
|
|
1095
|
|
1096 =item B<-h, --help>
|
|
1097
|
|
1098 Print this help message.
|
|
1099
|
|
1100 =item B<-k, --KeepLargestComponent> I<Yes | No>
|
|
1101
|
|
1102 Generate fingerprints for only the largest component in molecule. Possible values:
|
|
1103 I<Yes or No>. Default value: I<Yes>.
|
|
1104
|
|
1105 For molecules containing multiple connected components, fingerprints can be generated
|
|
1106 in two different ways: use all connected components or just the largest connected
|
|
1107 component. By default, all atoms except for the largest connected component are
|
|
1108 deleted before generation of fingerprints.
|
|
1109
|
|
1110 =item B<--MinDistance> I<number>
|
|
1111
|
|
1112 Minimum bond distance between atom pairs corresponding to atom triplets for generating
|
|
1113 topological pharmacophore atom triplets. Default value: I<1>. Valid values: positive integers and
|
|
1114 less than B<--MaxDistance>.
|
|
1115
|
|
1116 =item B<--MaxDistance> I<number>
|
|
1117
|
|
1118 Maximum bond distance between atom pairs corresponding to atom triplets for generating
|
|
1119 topological pharmacophore atom triplets. Default value: I<10>. Valid values: positive integers and
|
|
1120 greater than B<--MinDistance>.
|
|
1121
|
|
1122 =item B<--OutDelim> I<comma | tab | semicolon>
|
|
1123
|
|
1124 Delimiter for output CSV/TSV text file(s). Possible values: I<comma, tab, or semicolon>
|
|
1125 Default value: I<comma>.
|
|
1126
|
|
1127 =item B<--output> I<SD | FP | text | all>
|
|
1128
|
|
1129 Type of output files to generate. Possible values: I<SD, FP, text, or all>. Default value: I<text>.
|
|
1130
|
|
1131 =item B<-o, --overwrite>
|
|
1132
|
|
1133 Overwrite existing files.
|
|
1134
|
|
1135 =item B<-q, --quote> I<Yes | No>
|
|
1136
|
|
1137 Put quote around column values in output CSV/TSV text file(s). Possible values:
|
|
1138 I<Yes or No>. Default value: I<Yes>.
|
|
1139
|
|
1140 =item B<-r, --root> I<RootName>
|
|
1141
|
|
1142 New file name is generated using the root: <Root>.<Ext>. Default for new file names:
|
|
1143 <SDFileName><TopologicalPharmacophoreAtomTripletsFP>.<Ext>. The file type determines <Ext> value.
|
|
1144 The sdf, fpf, csv, and tsv <Ext> values are used for SD, FP, comma/semicolon, and tab
|
|
1145 delimited text files, respectively.This option is ignored for multiple input files.
|
|
1146
|
|
1147 =item B<-u, --UseTriangleInequality> I<Yes | No>
|
|
1148
|
|
1149 Specify whether to imply triangle distance inequality test to distances between atom pairs in
|
|
1150 atom triplets during generation of atom triplets basis set generation. Possible values:
|
|
1151 I<Yes or No>. Default value: I<Yes>.
|
|
1152
|
|
1153 Triangle distance inequality test implies that distance or binned distance between any two atom
|
|
1154 pairs in an atom triplet must be less than the sum of distances or binned distances between other
|
|
1155 two atoms pairs and greater than the difference of their distances.
|
|
1156
|
|
1157 For atom triplet PxDyz-PyDxz-PzDxy to satisfy triangle inequality:
|
|
1158
|
|
1159 Dyz > |Dxz - Dxy| and Dyz < Dxz + Dxy
|
|
1160 Dxz > |Dyz - Dxy| and Dyz < Dyz + Dxy
|
|
1161 Dxy > |Dyz - Dxz| and Dxy < Dyz + Dxz
|
|
1162
|
|
1163 =item B<-v, --VectorStringFormat> I<ValuesString, IDsAndValuesString | IDsAndValuesPairsString | ValuesAndIDsString | ValuesAndIDsPairsString>
|
|
1164
|
|
1165 Format of fingerprints vector string data in output SD, FP or CSV/TSV text file(s) specified by
|
|
1166 B<--output> option. Possible values: I<ValuesString, IDsAndValuesString | IDsAndValuesPairsString |
|
|
1167 ValuesAndIDsString | ValuesAndIDsPairsString>. Defaultvalue: I<ValuesString>.
|
|
1168
|
|
1169 Default value during I<FixedSize> value of B<--AtomTripletsSetSizeToUse> option: I<ValuesString>. Default
|
|
1170 value during I<ArbitrarySize> value of B<--AtomTripletsSetSizeToUse> option: I<IDsAndValuesString>.
|
|
1171
|
|
1172 I<ValuesString> option value is not allowed for I<ArbitrarySize> value of B<--AtomTripletsSetSizeToUse>
|
|
1173 option.
|
|
1174
|
|
1175 Examples:
|
|
1176
|
|
1177 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:ArbitrarySize:
|
|
1178 MinDistance1:MaxDistance10;696;NumericalValues;IDsAndValuesString;Ar1-
|
|
1179 Ar1-Ar1 Ar1-Ar1-H1 Ar1-Ar1-HBA1 Ar1-Ar1-HBD1 Ar1-H1-H1 Ar1-H1-HBA1 Ar1
|
|
1180 -H1-HBD1 Ar1-HBA1-HBD1 H1-H1-H1 H1-H1-HBA1 H1-H1-HBD1 H1-HBA1-HBA1 H1-
|
|
1181 HBA1-HBD1 H1-HBA1-NI1 H1-HBD1-NI1 HBA1-HBA1-NI1 HBA1-HBD1-NI1 Ar1-...;
|
|
1182 46 106 8 3 83 11 4 1 21 5 3 1 2 2 1 1 1 100 101 18 11 145 132 26 14 23
|
|
1183 28 3 3 5 4 61 45 10 4 16 20 7 5 1 3 4 5 3 1 1 1 1 5 4 2 1 2 2 2 1 1 1
|
|
1184 119 123 24 15 185 202 41 25 22 17 3 5 85 95 18 11 23 17 3 1 1 6 4 ...
|
|
1185
|
|
1186 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:FixedSize:MinD
|
|
1187 istance1:MaxDistance10;2692;OrderedNumericalValues;ValuesString;46 106
|
|
1188 8 3 0 0 83 11 4 0 0 0 1 0 0 0 0 0 0 0 0 21 5 3 0 0 1 2 2 0 0 1 0 0 0
|
|
1189 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 101 18 11 0 0 145 132 26
|
|
1190 14 0 0 23 28 3 3 0 0 5 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 61 45 10 4 0
|
|
1191 0 16 20 7 5 1 0 3 4 5 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 5 ...
|
|
1192
|
|
1193 FingerprintsVector;TopologicalPharmacophoreAtomTriplets:FixedSize:MinD
|
|
1194 istance1:MaxDistance10;2692;OrderedNumericalValues;ValuesAndIDsPairsSt
|
|
1195 ring;46 Ar1-Ar1-Ar1 106 Ar1-Ar1-H1 8 Ar1-Ar1-HBA1 3 Ar1-Ar1-HBD1 0 Ar1
|
|
1196 -Ar1-NI1 0 Ar1-Ar1-PI1 83 Ar1-H1-H1 11 Ar1-H1-HBA1 4 Ar1-H1-HBD1 0 Ar1
|
|
1197 -H1-NI1 0 Ar1-H1-PI1 0 Ar1-HBA1-HBA1 1 Ar1-HBA1-HBD1 0 Ar1-HBA1-NI1 0
|
|
1198 Ar1-HBA1-PI1 0 Ar1-HBD1-HBD1 0 Ar1-HBD1-NI1 0 Ar1-HBD1-PI1 0 Ar1-NI...
|
|
1199
|
|
1200 =item B<-w, --WorkingDir> I<DirName>
|
|
1201
|
|
1202 Location of working directory. Default value: current directory.
|
|
1203
|
|
1204 =back
|
|
1205
|
|
1206 =head1 EXAMPLES
|
|
1207
|
|
1208 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1209 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1210 inequality and create a SampleTPATFP.csv file containing sequential compound IDs along
|
|
1211 with fingerprints vector strings data in ValuesString format, type:
|
|
1212
|
|
1213 % TopologicalPharmacophoreAtomTripletsFingerprints.pl -r SampleTPATFP
|
|
1214 -o Sample.sdf
|
|
1215
|
|
1216 To generate topological pharmacophore atom triplets fingerprints of fixed size corresponding to 5
|
|
1217 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1218 inequality and create a SampleTPATFP.csv file containing sequential compound IDs along
|
|
1219 with fingerprints vector strings data in ValuesString format, type:
|
|
1220
|
|
1221 % TopologicalPharmacophoreAtomTripletsFingerprints.pl
|
|
1222 --AtomTripletsSetSizeToUse FixedSize -r SampleTPATFP -o Sample.sdf
|
|
1223
|
|
1224 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1225 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1226 inequality and create SampleTPATFP.sdf, SampleTPATFP.fpf and SampleTPATFP.csv files with CSV file containing
|
|
1227 sequential compound IDs along with fingerprints vector strings data in ValuesString format, type:
|
|
1228
|
|
1229 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --output all
|
|
1230 -r SampleTPATFP -o Sample.sdf
|
|
1231
|
|
1232 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1233 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1234 inequality and create a SampleTPATFP.csv file containing sequential compound IDs along
|
|
1235 with fingerprints vector strings data in ValuesString format and atom triplets IDs in the
|
|
1236 fingerprint data column label starting with Fingerprints, type:
|
|
1237
|
|
1238 % TopologicalPharmacophoreAtomTripletsFingerprints.pl
|
|
1239 --FingerprintsLabelMode FingerprintsLabelWithIDs --FingerprintsLabel
|
|
1240 Fingerprints -r SampleTPATFP -o Sample.sdf
|
|
1241
|
|
1242 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1243 distance bins spanning distances from 1 through 10 using default atoms with distances not satisfying triangle
|
|
1244 inequality and create a SampleTPATFP.csv file containing sequential compound IDs along
|
|
1245 with fingerprints vector strings data in ValuesString format, type:
|
|
1246
|
|
1247 % TopologicalPharmacophoreAtomTripletsFingerprints.pl
|
|
1248 --UseTriangleInequality No -r SampleTPATFP -o Sample.sdf
|
|
1249
|
|
1250 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 6
|
|
1251 distance bins spanning distances from 1 through 12 using default atoms with distances satisfying triangle
|
|
1252 inequality and create a SampleTPATFP.csv file containing sequential compound IDs along
|
|
1253 with fingerprints vector strings data in ValuesString format, type:
|
|
1254
|
|
1255 % TopologicalPharmacophoreAtomTripletsFingerprints.pl
|
|
1256 --UseTriangleInequality Yes --MinDistance 1 --MaxDistance 12
|
|
1257 --DistanceBinSIze 2 -r SampleTPATFP -o Sample.sdf
|
|
1258
|
|
1259 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 6
|
|
1260 distance bins spanning distances from 1 through 12 using "HBD,HBA,PI, NI, H, Ar" atoms with distances
|
|
1261 satisfying triangle inequality and create a SampleTPATFP.csv file containing sequential compound
|
|
1262 IDs along with fingerprints vector strings data in ValuesString format, type:
|
|
1263
|
|
1264 % TopologicalPharmacophoreAtomTripletsFingerprints.pl
|
|
1265 --AtomTypesToUse "HBD,HBA,PI,NI,H,Ar" --UseTriangleInequality Yes
|
|
1266 --MinDistance 1 --MaxDistance 12 --DistanceBinSIze 2
|
|
1267 --VectorStringFormat ValuesString -r SampleTPATFP -o Sample.sdf
|
|
1268
|
|
1269 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1270 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1271 inequality and create a SampleTPATFP.csv file containing sequential compound IDs from
|
|
1272 molecule name line along with fingerprints vector strings data in ValuesString format, type:
|
|
1273
|
|
1274 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1275 CompoundID -CompoundIDMode MolName -r SampleTPATFP -o Sample.sdf
|
|
1276
|
|
1277 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1278 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1279 inequality and create a SampleTPATFP.csv file containing sequential compound IDs using
|
|
1280 specified data field along with fingerprints vector strings data in ValuesString format, type:
|
|
1281
|
|
1282 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1283 CompoundID -CompoundIDMode DataField --CompoundID Mol_ID
|
|
1284 -r SampleTPATFP -o Sample.sdf
|
|
1285
|
|
1286 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1287 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1288 inequality and create a SampleTPATFP.csv file containing sequential compound IDs using
|
|
1289 combination of molecule name line and an explicit compound prefix along with fingerprints vector
|
|
1290 strings data, type:
|
|
1291
|
|
1292 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1293 CompoundID -CompoundIDMode MolnameOrLabelPrefix
|
|
1294 --CompoundID Cmpd --CompoundIDLabel MolID -r SampleSampleTPATFP
|
|
1295 -o Sample.sdf
|
|
1296
|
|
1297 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1298 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1299 inequality and create a SampleTPATFP.csv file containing specific data fields columns along
|
|
1300 with fingerprints vector strings data, type:
|
|
1301
|
|
1302 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1303 Specify --DataFields Mol_ID -r SampleTPATFP -o Sample.sdf
|
|
1304
|
|
1305 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1306 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1307 inequality and create a SampleTPATFP.csv file containing common data fields columns along
|
|
1308 with fingerprints vector strings data, type:
|
|
1309
|
|
1310 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1311 Common -r SampleTPATFP -o Sample.sdf
|
|
1312
|
|
1313 To generate topological pharmacophore atom triplets fingerprints of arbitrary size corresponding to 5
|
|
1314 distance bins spanning distances from 1 through 10 using default atoms with distances satisfying triangle
|
|
1315 inequality and create SampleTPATFP.sdf, SampleTPATFP.fpf and SampleTPATFP.csv files containing all
|
|
1316 data fields columns in CSV file along with fingerprints data, type:
|
|
1317
|
|
1318 % TopologicalPharmacophoreAtomTripletsFingerprints.pl --DataFieldsMode
|
|
1319 All --output all -r SampleTPATFP -o Sample.sdf
|
|
1320
|
|
1321 =head1 AUTHOR
|
|
1322
|
|
1323 Manish Sud <msud@san.rr.com>
|
|
1324
|
|
1325 =head1 SEE ALSO
|
|
1326
|
|
1327 InfoFingerprintsFiles.pl, SimilarityMatricesFingerprints.pl, AtomNeighborhoodsFingerprints.pl,
|
|
1328 ExtendedConnectivityFingerprints.pl, MACCSKeysFingerprints.pl, PathLengthFingerprints.pl,
|
|
1329 TopologicalAtomPairsFingerprints.pl, TopologicalAtomTorsionsFingerprints.pl,
|
|
1330 TopologicalPharmacophoreAtomPairsFingerprints.pl
|
|
1331
|
|
1332 =head1 COPYRIGHT
|
|
1333
|
|
1334 Copyright (C) 2015 Manish Sud. All rights reserved.
|
|
1335
|
|
1336 This file is part of MayaChemTools.
|
|
1337
|
|
1338 MayaChemTools is free software; you can redistribute it and/or modify it under
|
|
1339 the terms of the GNU Lesser General Public License as published by the Free
|
|
1340 Software Foundation; either version 3 of the License, or (at your option)
|
|
1341 any later version.
|
|
1342
|
|
1343 =cut
|