Mercurial > repos > deepakjadmin > mayatool3_test2
comparison bin/InfoAminoAcids.pl @ 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 #!/usr/bin/perl -w | |
2 # | |
3 # $RCSfile: InfoAminoAcids.pl,v $ | |
4 # $Date: 2015/02/28 20:46:20 $ | |
5 # $Revision: 1.26 $ | |
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 AminoAcids; | |
38 | |
39 my($ScriptName, %Options, $StartTime, $EndTime, $TotalTime); | |
40 | |
41 # Autoflush STDOUT | |
42 $| = 1; | |
43 | |
44 # Starting message... | |
45 $ScriptName = basename($0); | |
46 print "\n$ScriptName: Starting...\n\n"; | |
47 $StartTime = new Benchmark; | |
48 | |
49 # Get the options and setup script... | |
50 SetupScriptUsage(); | |
51 if ($Options{help}) { | |
52 die GetUsageFromPod("$FindBin::Bin/$ScriptName"); | |
53 } | |
54 | |
55 print "Processing options...\n"; | |
56 my(%OptionsInfo); | |
57 ProcessOptions(); | |
58 | |
59 ListAminoAcidProperties(); | |
60 print "\n$ScriptName:Done...\n\n"; | |
61 | |
62 $EndTime = new Benchmark; | |
63 $TotalTime = timediff ($EndTime, $StartTime); | |
64 print "Total time: ", timestr($TotalTime), "\n"; | |
65 | |
66 ############################################################################### | |
67 | |
68 # List data for an amino acid... | |
69 sub ListAminoAcidData { | |
70 my($DataLabelRef, $DataValueRef) = @_; | |
71 my($Index, $Line, $Value); | |
72 | |
73 if ($OptionsInfo{AminoAcidRowsOutput}) { | |
74 $Line = ''; | |
75 # Format data... | |
76 if ($OptionsInfo{OutQuote} || $Options{outdelim} !~ /^comma$/i) { | |
77 $Line = JoinWords($DataValueRef, $OptionsInfo{OutDelim}, $OptionsInfo{OutQuote}); | |
78 } | |
79 else { | |
80 # Always quote values containing commas... | |
81 $Line = ($DataValueRef->[0] =~ /\,/) ? qq("$DataValueRef->[0]") : $DataValueRef->[0]; | |
82 for $Index (1 .. $#{$DataValueRef} ) { | |
83 $Value = $DataValueRef->[$Index]; | |
84 if ($Value =~ /\,/) { | |
85 $Value = qq("$Value"); | |
86 } | |
87 $Line .= $OptionsInfo{OutDelim} . $Value; | |
88 } | |
89 } | |
90 if ($OptionsInfo{FileOutput}) { | |
91 print OUTFILE "$Line\n"; | |
92 } | |
93 else { | |
94 print "$Line\n"; | |
95 } | |
96 } | |
97 else { | |
98 # Format and list data... | |
99 $Line = ''; | |
100 for $Index (0 .. $#{$DataLabelRef} ) { | |
101 $Line = $DataLabelRef->[$Index] . ' ' . $DataValueRef->[$Index]; | |
102 if ($OptionsInfo{FileOutput}) { | |
103 print OUTFILE "$Line\n"; | |
104 } | |
105 else { | |
106 print "$Line\n"; | |
107 } | |
108 } | |
109 } | |
110 } | |
111 | |
112 # List data for an amino acid... | |
113 sub ListHeaderRowData { | |
114 my($DataLabelRef) = @_; | |
115 my($Line); | |
116 | |
117 # Format data... | |
118 $Line = JoinWords($DataLabelRef, $OptionsInfo{OutDelim}, $OptionsInfo{OutQuote}); | |
119 $Line =~ s/\://g; | |
120 # List data... | |
121 if ($OptionsInfo{FileOutput}) { | |
122 print OUTFILE "$Line\n"; | |
123 } | |
124 else { | |
125 print "$Line\n"; | |
126 } | |
127 } | |
128 | |
129 # List properties for amino acids... | |
130 sub ListAminoAcidProperties { | |
131 my($AminoAcidID, $AminoAcidDataRef, $PropertyName, $PropertyValue, @PropertyLabels, @PropertyValues); | |
132 | |
133 print "Listing information for amino acid(s)...\n"; | |
134 | |
135 if ($OptionsInfo{FileOutput}) { | |
136 print "Generating file $OptionsInfo{OutFileName}...\n"; | |
137 open OUTFILE, ">$OptionsInfo{OutFileName}" or die "Couldn't open $OptionsInfo{OutFileName}: $!\n"; | |
138 } | |
139 | |
140 # Setup property labels... | |
141 @PropertyLabels = (); | |
142 for $PropertyName (@{$OptionsInfo{SpecifiedProperies}}) { | |
143 push @PropertyLabels, ("$PropertyName:"); | |
144 } | |
145 | |
146 if ($OptionsInfo{AminoAcidRowsOutput}) { | |
147 ListHeaderRowData(\@PropertyLabels); | |
148 } | |
149 | |
150 # Go over specified properties... | |
151 for $AminoAcidID (@{$OptionsInfo{SpecifiedAminoAcidIDs}}) { | |
152 $AminoAcidDataRef = AminoAcids::GetAminoAcidPropertiesData($AminoAcidID); | |
153 | |
154 if (!$OptionsInfo{AminoAcidRowsOutput}) { | |
155 if ($OptionsInfo{FileOutput}) { | |
156 print OUTFILE "\nListing properties for amino acid $AminoAcidID...\n\n"; | |
157 } | |
158 else { | |
159 print "\nListing properties for amino acid $AminoAcidID...\n\n"; | |
160 } | |
161 } | |
162 | |
163 # Collect data.. | |
164 @PropertyValues = (); | |
165 for $PropertyName (@{$OptionsInfo{SpecifiedProperies}}) { | |
166 $PropertyValue = $AminoAcidDataRef->{$PropertyName}; | |
167 if (IsFloat($PropertyValue)) { | |
168 $PropertyValue = sprintf("%.$OptionsInfo{Precision}f", $PropertyValue) + 0; | |
169 } | |
170 push @PropertyValues, $PropertyValue; | |
171 } | |
172 # List data... | |
173 ListAminoAcidData(\@PropertyLabels, \@PropertyValues); | |
174 } | |
175 if ($OptionsInfo{FileOutput}) { | |
176 close OUTFILE; | |
177 } | |
178 print "\n"; | |
179 } | |
180 | |
181 # Get propery names from categories... | |
182 sub GetPropertyNamesFromCategories { | |
183 my($CategoryName) = @_; | |
184 my(@PropertyNames); | |
185 | |
186 @PropertyNames = (); | |
187 if ($CategoryName =~ /^Basic$/i) { | |
188 @PropertyNames = ('ThreeLetterCode', 'OneLetterCode', 'AminoAcid', 'DNACodons', 'RNACodons', 'ChemicalFormula','MolecularWeight', 'LinearStructure', 'LinearStructureAtpH7.4'); | |
189 } elsif ($CategoryName =~ /^BasicPlus$/i) { | |
190 @PropertyNames = ('ThreeLetterCode', 'OneLetterCode', 'AminoAcid', 'DNACodons', 'RNACodons', 'AcidicBasic', 'PolarNonpolar', 'Charged', 'Aromatic', 'HydrophobicHydophilic', 'IsoelectricPoint', 'pKCOOH', 'pKNH3+', 'ChemicalFormula', 'MolecularWeight', 'ExactMass', 'ChemicalFormulaMinusH2O', 'MolecularWeightMinusH2O(18.01524)', 'ExactMassMinusH2O(18.01056)','LinearStructure', 'LinearStructureAtpH7.4'); | |
191 } elsif ($CategoryName =~ /^BasicAndHydrophobicity$/i) { | |
192 @PropertyNames = ('ThreeLetterCode', 'OneLetterCode', 'AminoAcid', 'DNACodons', 'RNACodons', 'ChemicalFormula', 'MolecularWeight', 'LinearStructure', 'LinearStructureAtpH7.4', 'HydrophobicityEisenbergAndOthers', 'HydrophobicityHoppAndWoods', 'HydrophobicityJanin', 'HydrophobicityKyteAndDoolittle', 'HydrophobicityRoseAndOthers', 'HydrophobicityWolfendenAndOthers'); | |
193 } elsif ($CategoryName =~ /^BasicAndHydrophobicityPlus$/i) { | |
194 @PropertyNames = ('ThreeLetterCode', 'OneLetterCode', 'AminoAcid', 'DNACodons', 'RNACodons', 'ChemicalFormula', 'MolecularWeight', 'LinearStructure', 'LinearStructureAtpH7.4', 'HydrophobicityAbrahamAndLeo', 'HydrophobicityBlack', 'HydrophobicityBullAndBreese', 'HydrophobicityChothia', 'HydrophobicityEisenbergAndOthers', 'HydrophobicityFauchereAndOthers', 'HydrophobicityGuy', 'HydrophobicityHPLCAtpH3.4Cowan', 'HydrophobicityHPLCAtpH7.5Cowan', 'HydrophobicityHPLCParkerAndOthers', 'HydrophobicityHPLCWilsonAndOthers', 'HydrophobicityHoppAndWoods', 'HydrophobicityJanin', 'HydrophobicityKyteAndDoolittle', 'HydrophobicityManavalanAndOthers', 'HydrophobicityMiyazawaAndOthers', 'HydrophobicityOMHSweetAndOthers', 'HydrophobicityRaoAndArgos', 'HydrophobicityRfMobility', 'HydrophobicityRoseAndOthers', 'HydrophobicityRoseman', 'HydrophobicityWellingAndOthers', 'HydrophobicityWolfendenAndOthers'); | |
195 } | |
196 | |
197 return @PropertyNames; | |
198 } | |
199 | |
200 # Process option values... | |
201 sub ProcessOptions { | |
202 %OptionsInfo = (); | |
203 | |
204 $OptionsInfo{OutDelim} = ($Options{outdelim} =~ /^tab$/i ) ? "\t" : (($Options{outdelim} =~ /^semicolon$/i) ? "\;" : "\,"); | |
205 $OptionsInfo{OutQuote} = ($Options{quote} =~ /^yes$/i) ? 1 : 0; | |
206 | |
207 $OptionsInfo{Overwrite} = defined $Options{overwrite} ? $Options{overwrite} : undef; | |
208 $OptionsInfo{OutFileRoot} = defined $Options{root} ? $Options{root} : undef; | |
209 | |
210 $OptionsInfo{OutputStyle} = $Options{outputstyle}; | |
211 | |
212 $OptionsInfo{AminoAcidRowsOutput} = ($Options{outputstyle} =~ /^AminoAcidRows$/i) ? 1 : 0; | |
213 $OptionsInfo{FileOutput} = ($Options{output} =~ /^File$/i) ? 1 : 0; | |
214 | |
215 $OptionsInfo{Precision} = $Options{precision}; | |
216 | |
217 my($AminoAcidID, @AminoAcidIDs); | |
218 | |
219 @{$OptionsInfo{SpecifiedAminoAcidIDs}} = (); | |
220 | |
221 # Set up Amino Acids IDs except for All mode... | |
222 @AminoAcidIDs = (); | |
223 | |
224 if (@ARGV >= 1) { | |
225 push @AminoAcidIDs, @ARGV; | |
226 } | |
227 else { | |
228 # Setup mode specified default values... | |
229 push @AminoAcidIDs, 'Ala'; | |
230 } | |
231 | |
232 # Generate list of amino acids... | |
233 if (@ARGV == 1 && $ARGV[0] =~ /^All$/i) { | |
234 push @{$OptionsInfo{SpecifiedAminoAcidIDs}}, AminoAcids::GetAminoAcids(); | |
235 } | |
236 else { | |
237 ID: for $AminoAcidID (@AminoAcidIDs) { | |
238 if (AminoAcids::IsAminoAcid($AminoAcidID)) { | |
239 push @{$OptionsInfo{SpecifiedAminoAcidIDs}}, $AminoAcidID; | |
240 } | |
241 else { | |
242 warn "Ignoring amino acid ID, $AminoAcidID, specified using command line parameter option: Unknown amino acid ID...\n"; | |
243 next ID; | |
244 } | |
245 } | |
246 } | |
247 SetupSpecifiedProperties(); | |
248 | |
249 # Setup output file name... | |
250 $OptionsInfo{OutFileName} = ''; | |
251 if ($OptionsInfo{FileOutput}) { | |
252 my($OutFileRoot, $OutFileExt); | |
253 | |
254 $OutFileRoot = ''; | |
255 $OutFileExt = "csv"; | |
256 if ($Options{outdelim} =~ /^tab$/i) { | |
257 $OutFileExt = "tsv"; | |
258 } | |
259 if ($Options{root}) { | |
260 my ($RootFileDir, $RootFileName, $RootFileExt) = ParseFileName($Options{root}); | |
261 if ($RootFileName && $RootFileExt) { | |
262 $OutFileRoot = $RootFileName; | |
263 } | |
264 else { | |
265 $OutFileRoot = $Options{root}; | |
266 } | |
267 } | |
268 else { | |
269 $OutFileRoot = 'AminoAcidsInfo'; | |
270 } | |
271 $OptionsInfo{OutFileName} = $OutFileRoot . '.' . $OutFileExt; | |
272 if (!$Options{overwrite}) { | |
273 if (-e $OptionsInfo{OutFileName}) { | |
274 die "Error: Output file, $OptionsInfo{OutFileName}, already exists.\nUse \-o --overwrite\ option or specify a different name using \"-r --root\" option.\n"; | |
275 } | |
276 } | |
277 } | |
278 } | |
279 | |
280 # Setup properties to list... | |
281 sub SetupSpecifiedProperties { | |
282 | |
283 $OptionsInfo{Properties} = defined $Options{properties} ? $Options{properties} : undef; | |
284 | |
285 $OptionsInfo{PropertiesMode} = $Options{propertiesmode}; | |
286 $OptionsInfo{PropertiesListing} = $Options{propertieslisting}; | |
287 | |
288 # Make sure appropriate properties/category names are specified... | |
289 @{$OptionsInfo{SpecifiedProperies}} = (); | |
290 if ($Options{properties} && ($Options{propertiesmode} =~ /^All$/i) ) { | |
291 warn "Warning: Ignoring values specifed by \"-p --properties\" option: Not valid for All value of \"--propertiesmode\" option...\n"; | |
292 } | |
293 if ($Options{propertiesmode} =~ /^All$/i) { | |
294 if ($Options{propertieslisting} =~ /^Alphabetical$/i) { | |
295 push @{$OptionsInfo{SpecifiedProperies}}, AminoAcids::GetAminoAcidPropertiesNames('Alphabetical'); | |
296 } | |
297 else { | |
298 push @{$OptionsInfo{SpecifiedProperies}}, AminoAcids::GetAminoAcidPropertiesNames(); | |
299 } | |
300 } | |
301 else { | |
302 if ($Options{properties}) { | |
303 if ($Options{propertiesmode} =~ /^Categories$/i) { | |
304 # Check category name... | |
305 if ($Options{properties} !~ /^(Basic|BasicPlus|BasicAndHydrophobicity|BasicAndHydrophobicityPlus)$/i) { | |
306 die "Error: The value specified, $Options{properties}, for option \"-p --properties\" in conjunction with \"Categories\" value for option \"--propertiesmode\" is not valid. Allowed values: Basic, BasicPlus, BasicAndHydrophobicity, and BasicAndHydrophobicityPlus\n"; | |
307 } | |
308 # Set propertynames... | |
309 push @{$OptionsInfo{SpecifiedProperies}}, GetPropertyNamesFromCategories($Options{properties}); | |
310 } | |
311 else { | |
312 # Check property names.. | |
313 my($Name, $PropertyName, @Names); | |
314 @Names = split /\,/, $Options{properties}; | |
315 NAME: for $Name (@Names) { | |
316 $PropertyName = RemoveLeadingAndTrailingWhiteSpaces($Name); | |
317 if (AminoAcids::IsAminoAcidProperty($PropertyName)) { | |
318 push @{$OptionsInfo{SpecifiedProperies}}, $PropertyName; | |
319 } | |
320 else { | |
321 warn "Warning: Ignoring value, $Name, specifed by \"-p --properties\" option: Unknown property name...\n"; | |
322 } | |
323 } | |
324 if ($Options{propertieslisting} =~ /^Alphabetical$/i) { | |
325 # ThreeLetterCode, OneLetterCode and AminoAcid are always listed first... | |
326 # NaturalIsotopeData in the end... | |
327 my($OneLetterCodePresent, $ThreeLetterCodePresent, $AminoAcidPresent, @AlphabeticalProperties, %PropertiesMap); | |
328 %PropertiesMap = (); | |
329 @AlphabeticalProperties = (); | |
330 $OneLetterCodePresent = 0; $ThreeLetterCodePresent = 0; $AminoAcidPresent = 0; | |
331 NAME: for $Name (@{$OptionsInfo{SpecifiedProperies}}) { | |
332 if ($Name =~ /^OneLetterCode$/i) { | |
333 $OneLetterCodePresent = 1; | |
334 next NAME; | |
335 } | |
336 if ($Name =~ /^ThreeLetterCode$/i) { | |
337 $ThreeLetterCodePresent = 1; | |
338 next NAME; | |
339 } | |
340 if ($Name =~ /^AminoAcid$/i) { | |
341 $AminoAcidPresent = 1; | |
342 next NAME; | |
343 } | |
344 $PropertiesMap{$Name} = $Name; | |
345 } | |
346 # Setup the alphabetical list... | |
347 if ($ThreeLetterCodePresent) { | |
348 push @AlphabeticalProperties, 'ThreeLetterCode'; | |
349 } | |
350 if ($OneLetterCodePresent) { | |
351 push @AlphabeticalProperties, 'OneLetterCode'; | |
352 } | |
353 if ($AminoAcidPresent) { | |
354 push @AlphabeticalProperties, 'AminoAcid'; | |
355 } | |
356 for $Name (sort keys %PropertiesMap) { | |
357 push @AlphabeticalProperties, $Name; | |
358 } | |
359 @{$OptionsInfo{SpecifiedProperies}} = (); | |
360 push @{$OptionsInfo{SpecifiedProperies}}, @AlphabeticalProperties; | |
361 } | |
362 } | |
363 } | |
364 else { | |
365 # Set default value... | |
366 push @{$OptionsInfo{SpecifiedProperies}}, GetPropertyNamesFromCategories('Basic'); | |
367 } | |
368 } | |
369 } | |
370 | |
371 # Setup script usage and retrieve command line arguments specified using various options... | |
372 sub SetupScriptUsage { | |
373 | |
374 # Retrieve all the options... | |
375 %Options = (); | |
376 $Options{outdelim} = "comma"; | |
377 $Options{output} = "STDOUT"; | |
378 $Options{outputstyle} = "AminoAcidBlock"; | |
379 $Options{precision} = 4; | |
380 $Options{propertiesmode} = "Categories"; | |
381 $Options{propertieslisting} = "ByGroup"; | |
382 $Options{quote} = "yes"; | |
383 | |
384 if (!GetOptions(\%Options, "help|h", "outdelim=s", "output=s", "outputstyle=s", "overwrite|o", "precision=i", "properties|p=s", "propertieslisting=s", "propertiesmode=s", "quote|q=s", "root|r=s", "workingdir|w=s")) { | |
385 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"; | |
386 } | |
387 if ($Options{workingdir}) { | |
388 if (! -d $Options{workingdir}) { | |
389 die "Error: The value specified, $Options{workingdir}, for option \"-w --workingdir\" is not a directory name.\n"; | |
390 } | |
391 chdir $Options{workingdir} or die "Error: Couldn't chdir $Options{workingdir}: $! \n"; | |
392 } | |
393 if ($Options{outdelim} !~ /^(comma|semicolon|tab)$/i) { | |
394 die "Error: The value specified, $Options{outdelim}, for option \"--outdelim\" is not valid. Allowed values: comma, tab, or semicolon\n"; | |
395 } | |
396 if ($Options{output} !~ /^(STDOUT|File)$/i) { | |
397 die "Error: The value specified, $Options{output}, for option \"--output\" is not valid. Allowed values: STDOUT or File\n"; | |
398 } | |
399 if ($Options{outputstyle} !~ /^(AminoAcidBlock|AminoAcidRows)$/i) { | |
400 die "Error: The value specified, $Options{outputstyle}, for option \"--outputstyle\" is not valid. Allowed values: AminoAcidBlock or AminoAcidRows\n"; | |
401 } | |
402 if (!IsPositiveInteger($Options{precision})) { | |
403 die "Error: The value specified, $Options{precision}, for option \"-p --precision\" is not valid. Allowed values: > 0 \n"; | |
404 } | |
405 if ($Options{propertiesmode} !~ /^(Categories|Names|All)$/i) { | |
406 die "Error: The value specified, $Options{propertiesmode}, for option \"--propertiesmode\" is not valid. Allowed values: Categories, Names, or All\n"; | |
407 } | |
408 if ($Options{propertieslisting} !~ /^(ByGroup|Alphabetical)$/i) { | |
409 die "Error: The value specified, $Options{propertieslisting}, for option \"--propertieslisting\" is not valid. Allowed values: ByGroup, or Alphabetical\n"; | |
410 } | |
411 if ($Options{quote} !~ /^(yes|no)$/i) { | |
412 die "Error: The value specified, $Options{quote}, for option \"-q --quote\" is not valid. Allowed values: yes or no\n"; | |
413 } | |
414 } | |
415 | |
416 __END__ | |
417 | |
418 =head1 NAME | |
419 | |
420 InfoAminoAcids.pl - List properties of amino acids | |
421 | |
422 =head1 SYNOPSIS | |
423 | |
424 InfoAminoAcids.pl AminoAcidIDs... | |
425 | |
426 InfoAminoAcids.pl [B<-h, --help>] [B<--outdelim> comma | tab | semicolon] | |
427 [B<--output> STDOUT | File] [B<--outputstyle> AminoAcidBlock | AminoAcidRows] | |
428 [B<-o, --overwrite>] [B<--precision> number] [B<--propertiesmode> Categories | Names | All] | |
429 [B<-p, --properties> CategoryName,[CategoryName,...] | PropertyName,[PropertyName,...]] | |
430 [B<--propertieslinting> ByGroup | Alphabetical] [B<-q, --quote> yes | no] [B<-r, --root> rootname] | |
431 [B<-w, --workingdir> dirname] AminoAcidIDs... | |
432 | |
433 =head1 DESCRIPTION | |
434 | |
435 List amino acid properties. Amino acids identification supports these three types of IDs: one letter | |
436 code, three letter code or name. Amino acid properties data, in addition to basic information about | |
437 amino acids - one and three letter codes, name, DNA and RNA codons, molecular weight - include | |
438 variety of other properties: polarity, acidity, hydrophobicity, and so on. | |
439 | |
440 =head1 PARAMETERS | |
441 | |
442 =over 4 | |
443 | |
444 =item B<AminoAcidIDs> I<ThreeLetterCode [OneLetterCode AminoAcidName...]> | |
445 | |
446 I<AminoAcidIDs> is a space delimited list of values to identify amino acids. | |
447 | |
448 Input value format is: I<ThreeLetterCode [OneLetterCode AminoAcidName...]>. Default: I<Ala>. | |
449 Examples: | |
450 | |
451 Ala | |
452 Glu A | |
453 Alanine Glu Y "Aspartic acid" | |
454 | |
455 =back | |
456 | |
457 =head1 OPTIONS | |
458 | |
459 =over 4 | |
460 | |
461 =item B<-h, --help> | |
462 | |
463 Print this help message. | |
464 | |
465 =item B<--outdelim> I<comma | tab | semicolon> | |
466 | |
467 Output text file delimiter. Possible values: I<comma, tab, or semicolon> | |
468 Default value: I<comma>. | |
469 | |
470 =item B<--output> I<STDOUT | File> | |
471 | |
472 List information at STDOUT or write it to a file. Possible values: I<STDOUT or File>. Default: | |
473 I<STDOUT>. B<-r, --root> option is used to generate output file name. | |
474 | |
475 =item B<--outputstyle> I<AminoAcidBlock | AminoAcidRows> | |
476 | |
477 Specify how to list amino acid information: add a new line for each property and present it as a block | |
478 for each amino acid; or include all properties in one line and show it as a single line. | |
479 | |
480 Possible values: I<AminoAcidBlock | AminoAcidRows>. Default: I<AminoAcidBlock> | |
481 | |
482 An example for I<AminoAcidBlock> output style: | |
483 | |
484 ThreeLetterCode: Ala | |
485 OneLetterCode: A | |
486 AminoAcid: Alanine | |
487 MolecularWeight: 89.0941 | |
488 ... ... | |
489 ... ... | |
490 ... ... | |
491 | |
492 ThreeLetterCode: Glu | |
493 OneLetterCode: E | |
494 AminoAcid: Glutamic acid | |
495 MolecularWeight: 147.1308 | |
496 ... ... | |
497 ... ... | |
498 ... ... | |
499 | |
500 An example for I<AminoAcidRows> output style: | |
501 | |
502 ThreeLetterCode,OneLetterCode,AminoAcid,MolecularWeight | |
503 Ala,A,Alanine,89.0941.. | |
504 Glu,E,Glutamic acid,147.1308.. | |
505 | |
506 =item B<-o, --overwrite> | |
507 | |
508 Overwrite existing files. | |
509 | |
510 =item B<--precision> I<number> | |
511 | |
512 Precision for listing numerical values. Default: up to I<4> decimal places. | |
513 Valid values: positive integers. | |
514 | |
515 =item B<--propertiesmode> I<Categories | Names | All> | |
516 | |
517 Specify how property names are specified: use category names; explicit list of property names; or | |
518 use all available properties. Possible values: I<Categories, Names, or All>. Default: I<Categories>. | |
519 | |
520 This option is used in conjunction with B<-p, --properties> option to specify properties of | |
521 interest. | |
522 | |
523 =item B<-p, --properties> I<CategoryName,[CategoryName,...] | PropertyName,[PropertyName,...]> | |
524 | |
525 This option is B<--propertiesmode> specific. In general, it's a list of comma separated category or | |
526 property names. | |
527 | |
528 Specify which amino acid properties information to list for the amino acid IDs specified using command: | |
529 line parameters: list basic and/or hydrophobicity information; list all available information; or specify a comma | |
530 separated list of amino acid property names. | |
531 | |
532 Possible values: I<Basic | BasicPlus | BasicAndHydrophobicity | BasicAndHydrophobicityPlus | PropertyName,[PropertyName,...]>. | |
533 Default: I<Basic>. | |
534 | |
535 I<Basic> includes: I<ThreeLetterCode, OneLetterCode, AminoAcid, DNACodons, RNACodons, ChemicalFormula, MolecularWeight, LinearStructure, LinearStructureAtpH7.4> | |
536 | |
537 I<BasicPlus> includes: I<ThreeLetterCode, OneLetterCode, AminoAcid, DNACodons, RNACodons, AcidicBasic, PolarNonpolar, Charged, Aromatic, HydrophobicHydophilic, IsoelectricPoint, pKCOOH, pKNH3+, ChemicalFormula, MolecularWeight, ExactMass, ChemicalFormulaMinusH2O, MolecularWeightMinusH2O(18.01524), ExactMassMinusH2O(18.01056), LinearStructure, LinearStructureAtpH7.4> | |
538 | |
539 I<BasicAndHydrophobicity> includes: I<ThreeLetterCode, OneLetterCode, AminoAcid, DNACodons, RNACodons, ChemicalFormula, MolecularWeight, LinearStructure, LinearStructureAtpH7.4, HydrophobicityEisenbergAndOthers, HydrophobicityHoppAndWoods, HydrophobicityJanin, HydrophobicityKyteAndDoolittle, HydrophobicityRoseAndOthers, HydrophobicityWolfendenAndOthers> | |
540 | |
541 I<BasicAndHydrophobicityPlus> includes: I<(ThreeLetterCode, OneLetterCode, AminoAcid, DNACodons, RNACodons, ChemicalFormula, MolecularWeight, LinearStructure, LinearStructureAtpH7.4, HydrophobicityAbrahamAndLeo, HydrophobicityBlack, HydrophobicityBullAndBreese, HydrophobicityChothia, HydrophobicityEisenbergAndOthers, HydrophobicityFauchereAndOthers, HydrophobicityGuy, HydrophobicityHPLCAtpH3.4Cowan, HydrophobicityHPLCAtpH7.5Cowan, HydrophobicityHPLCParkerAndOthers, HydrophobicityHPLCWilsonAndOthers, HydrophobicityHoppAndWoods, HydrophobicityJanin, HydrophobicityKyteAndDoolittle, HydrophobicityManavalanAndOthers, HydrophobicityMiyazawaAndOthers, HydrophobicityOMHSweetAndOthers, HydrophobicityRaoAndArgos, HydrophobicityRfMobility, HydrophobicityRoseAndOthers, HydrophobicityRoseman, HydrophobicityWellingAndOthers, HydrophobicityWolfendenAndOthers> | |
542 | |
543 Here is a complete list of available properties: ThreeLetterCode, OneLetterCode, AminoAcid, DNACodons, RNACodons, AcidicBasic, PolarNonpolar, Charged, Aromatic, HydrophobicHydophilic, IsoelectricPoint, pKCOOH, pKNH3+, ChemicalFormula, MolecularWeight, ExactMass, ChemicalFormulaMinusH2O, MolecularWeightMinusH2O(18.01524), ExactMassMinusH2O(18.01056), vanderWaalsVolume, %AccessibleResidues, %BuriedResidues, AlphaHelixChouAndFasman, AlphaHelixDeleageAndRoux, AlphaHelixLevitt, AminoAcidsComposition, AminoAcidsCompositionInSwissProt, AntiparallelBetaStrand, AverageAreaBuried, AverageFlexibility, BetaSheetChouAndFasman, BetaSheetDeleageAndRoux, BetaSheetLevitt, BetaTurnChouAndFasman, BetaTurnDeleageAndRoux, BetaTurnLevitt, Bulkiness, CoilDeleageAndRoux, HPLCHFBARetention, HPLCRetentionAtpH2.1, HPLCRetentionAtpH7.4, HPLCTFARetention, HydrophobicityAbrahamAndLeo, HydrophobicityBlack, HydrophobicityBullAndBreese, HydrophobicityChothia, HydrophobicityEisenbergAndOthers, HydrophobicityFauchereAndOthers, HydrophobicityGuy, HydrophobicityHPLCAtpH3.4Cowan, HydrophobicityHPLCAtpH7.5Cowan, HydrophobicityHPLCParkerAndOthers, HydrophobicityHPLCWilsonAndOthers, HydrophobicityHoppAndWoods, HydrophobicityJanin, HydrophobicityKyteAndDoolittle, HydrophobicityManavalanAndOthers, HydrophobicityMiyazawaAndOthers, HydrophobicityOMHSweetAndOthers, HydrophobicityRaoAndArgos, HydrophobicityRfMobility, HydrophobicityRoseAndOthers, HydrophobicityRoseman, HydrophobicityWellingAndOthers, HydrophobicityWolfendenAndOthers, ParallelBetaStrand, PolarityGrantham, PolarityZimmerman, RatioHeteroEndToSide, RecognitionFactors, Refractivity, RelativeMutability, TotalBetaStrand, LinearStructure, LinearStructureAtpH7.4 | |
544 | |
545 =item B<--propertieslisting> I<ByGroup | Alphabetical> | |
546 | |
547 Specify how to list properties for amino acids: group by category or an alphabetical by | |
548 property names. Possible values: I<ByGroup or Alphabetical>. Default: I<ByGroup>. | |
549 | |
550 =item B<-q, --quote> I<yes | no> | |
551 | |
552 Put quotes around column values in output text file. Possible values: I<yes or | |
553 no>. Default value: I<yes>. | |
554 | |
555 =item B<-r, --root> I<rootname> | |
556 | |
557 New text file name is generated using the root: <Root>.<Ext>. File name is only | |
558 used during I<File> value of B<-o, --output> option. | |
559 | |
560 Default file name: AminoAcidInfo<mode>.<Ext>. The csv, and tsv | |
561 <Ext> values are used for comma/semicolon, and tab delimited text files respectively. | |
562 | |
563 =item B<-w, --workingdir> I<dirname> | |
564 | |
565 Location of working directory. Default: current directory. | |
566 | |
567 =back | |
568 | |
569 =head1 EXAMPLES | |
570 | |
571 To list basic properties information for amino acid Ala, type: | |
572 | |
573 % InfoAminoAcids.pl | |
574 | |
575 To list all available properties information for amino acid Ala, type: | |
576 | |
577 % InfoAminoAcids.pl --propertiesmode all | |
578 | |
579 To list basic properties information for amino acids Ala, Arg, and Asp type: | |
580 | |
581 % InfoAminoAcids.pl Ala Arg Asp | |
582 % InfoAminoAcids.pl A Arg "Aspartic acid" | |
583 | |
584 To list all available properties information for amino acids Ala, Arg, and Asp type: | |
585 | |
586 % InfoAminoAcids.pl --propertiesmode all Ala Arg Asp | |
587 | |
588 To list basic and hydrophobicty properties information for amino acids Ala, Arg, and Asp type: | |
589 | |
590 % InfoAminoAcids.pl --propertiesmode Categories | |
591 --properties BasicAndHydrophobicity Ala Arg Asp | |
592 | |
593 To list OneLetterCode, ThreeLetterCode, DNACodons, and MolecularWeight for amino | |
594 acids Ala, Arg, and Asp type: | |
595 | |
596 % InfoAminoAcids.pl --propertiesmode Names | |
597 --properties OneLetterCode,ThreeLetterCode,DNACodons,MolecularWeight | |
598 Ala Arg Asp | |
599 | |
600 To alphabetically list basic and hydrophobicty properties information for amino acids Ala, Arg, and Asp | |
601 in rows insetad of amino acid blocks with quotes around the values, type: | |
602 | |
603 % InfoAminoAcids.pl --propertiesmode Categories | |
604 --properties BasicAndHydrophobicity --propertieslisting alphabetical | |
605 --outdelim comma --outputstyle AminoAcidRows --quote yes Ala Arg Asp | |
606 | |
607 To alphabetically list basic and hydrophobicty properties information for amino acids Ala, Arg, and Asp | |
608 in rows insetad of amino acid blocks with quotes around the values and write them into a file | |
609 AminoAcidProperties.csv, type: | |
610 | |
611 % InfoAminoAcids.pl --propertiesmode Categories | |
612 --properties BasicAndHydrophobicity --propertieslisting alphabetical | |
613 --outdelim comma --outputstyle AminoAcidRows --quote yes | |
614 --output File -r AminoAcidProperties -o Ala Arg Asp | |
615 | |
616 =head1 AUTHOR | |
617 | |
618 Manish Sud <msud@san.rr.com> | |
619 | |
620 =head1 SEE ALSO | |
621 | |
622 InfoNucleicAcids.pl InfoPeriodicTableElements.pl | |
623 | |
624 =head1 COPYRIGHT | |
625 | |
626 Copyright (C) 2015 Manish Sud. All rights reserved. | |
627 | |
628 This file is part of MayaChemTools. | |
629 | |
630 MayaChemTools is free software; you can redistribute it and/or modify it under | |
631 the terms of the GNU Lesser General Public License as published by the Free | |
632 Software Foundation; either version 3 of the License, or (at your option) | |
633 any later version. | |
634 | |
635 =cut |