view mayachemtools/docs/scripts/html/AnalyzeSDFilesData.html @ 0:73ae111cf86f draft

Uploaded
author deepakjadmin
date Wed, 20 Jan 2016 11:55:01 -0500
parents
children
line wrap: on
line source

<html>
<head>
<title>MayaChemTools:Documentation:AnalyzeSDFilesData.pl</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css">
</head>
<body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10">
<br/>
<center>
<a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a>
</center>
<br/>
<div class="DocNav">
<table width="100%" border=0 cellpadding=0 cellspacing=2>
<tr align="left" valign="top"><td width="33%" align="left"><a href="./README.html" title="README.html">Previous</a>&nbsp;&nbsp;<a href="./index.html" title="Table of Contents">TOC</a>&nbsp;&nbsp;<a href="./AnalyzeSequenceFilesData.html" title="AnalyzeSequenceFilesData.html">Next</a></td><td width="34%" align="middle"><strong>AnalyzeSDFilesData.pl</strong></td><td width="33%" align="right"><a href="././code/AnalyzeSDFilesData.html" title="View source code">Code</a>&nbsp;|&nbsp;<a href="./../pdf/AnalyzeSDFilesData.pdf" title="PDF US Letter Size">PDF</a>&nbsp;|&nbsp;<a href="./../pdfgreen/AnalyzeSDFilesData.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a>&nbsp;|&nbsp;<a href="./../pdfa4/AnalyzeSDFilesData.pdf" title="PDF A4 Size">PDFA4</a>&nbsp;|&nbsp;<a href="./../pdfa4green/AnalyzeSDFilesData.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr>
</table>
</div>
<p>
</p>
<h2>NAME</h2>
<p>AnalyzeSDFilesData.pl - Analyze numerical data field values in SDFile(s)</p>
<p>
</p>
<h2>SYNOPSIS</h2>
<p>AnalyzeSDFilesData.pl SDFile(s)...</p>
<p>AnalyzeSDFilesData.pl [<strong>--datafields</strong> &quot;fieldlabel,[fieldlabel,...]&quot; | All]
[<strong>--datafieldpairs</strong> &quot;fieldlabel,fieldlabel,[fieldlabel,fieldlabel,...]&quot; | AllPairs] [<strong>-d, --detail</strong> infolevel]
[<strong>-f, --fast</strong>] [<strong>--frequencybins</strong> number | &quot;number,number,[number,...]&quot;]
[<strong>-h, --help</strong>] [<strong>--klargest</strong> number] [<strong>--ksmallest</strong> number]
[<strong>-m, --mode</strong> DescriptiveStatisticsBasic | DescriptiveStatisticsAll | All | &quot;function1, [function2,...]&quot;]
[<strong>--trimfraction</strong> number] [<strong>-w, --workingdir</strong> dirname] SDFiles(s)...</p>
<p>
</p>
<h2>DESCRIPTION</h2>
<p>Analyze numerical data field values in <em>SDFile(s)</em> using a combination of various statistical
functions; Non-numerical values are simply ignored. For <em>Correlation, RSquare, and
Covariance</em> analysis, the count of valid values in specified data field pairs must be same;
otherwise, column data field pair is ignored. The file names are separated by space.The valid file
extensions are <em>.sdf</em> and <em>.sd</em>. All other file names are ignored. All the SD files in a
current directory can be specified either by <em>*.sdf</em> or the current directory name.</p>
<p>
</p>
<h2>OPTIONS</h2>
<dl>
<dt><strong><strong>--datafields</strong> <em>&quot;fieldlabel,[fieldlabel,...]&quot; | Common | All</em></strong></dt>
<dd>
<p>Data fields to use for analysis. Possible values: list of comma separated data field
labels, data fields common to all records, or all data fields. Default value: <em>Common</em>.
Examples:</p>
<div class="OptionsBox">
    ALogP,MolWeight,EC50
<br/>    &quot;MolWeight,PSA&quot;</div>
</dd>
<dt><strong><strong>--datafieldpairs</strong> <em>&quot;fieldlabel,fieldlabel,[fieldlabel,fieldlabel,...]&quot; | CommonPairs | AllPairs</em></strong></dt>
<dd>
<p>This value is mode specific and is only used for <em>Correlation, PearsonCorrelation, or
Covariance</em> value of <strong>-m, --mode</strong> option. It specifies data field label pairs to use
for data analysis during <em>Correlation</em> and <em>Covariance</em> calculations. Possible values:
comma delimited list of data field label pairs, data field label pairs common to all records,
or all data field pairs. Default value:<em>CommonPairs</em>. Example:</p>
<div class="OptionsBox">
    MolWeight,EC50,NumN+O,PSA</div>
<p>For <em>AllPairs</em> value of <strong>--datafieldpairs</strong> option, all data field label pairs are used for
<em>Correlation</em> and <em>Covariance</em> calculations.</p>
</dd>
<dt><strong><strong>-d, --detail</strong> <em>infolevel</em></strong></dt>
<dd>
<p>Level of information to print about column values being ignored. Default: <em>0</em>. Possible values:
0, 1, 2, 3, or 4.</p>
</dd>
<dt><strong><strong>-f, --fast</strong></strong></dt>
<dd>
<p>In this mode, all the data field values specified for analysis are assumed to contain numerical
data and no checking is performed before analysis. By default, only numerical data is
used for analysis; other types of column data is ignored.</p>
</dd>
<dt><strong><strong>--frequencybins</strong> <em>number | &quot;number,number,[number,...]&quot;</em></strong></dt>
<dd>
<p>Specify number of bins or bin range to use for frequency analysis. Default value: <em>10</em></p>
<p>Number of bins value along with the smallest and largest value for a column is used to
group the column values into different groups.</p>
<p>The bin range list is used to group values for a column into different groups; It must contain
values in ascending order. Examples:</p>
<div class="OptionsBox">
    10,20,30
<br/>    0.1,0.2,0.3,0.4,0.5</div>
<p>The frequency value calculated for a specific bin corresponds to all the column values
which are greater than the previous bin value and less than or equal to the current bin value.</p>
</dd>
<dt><strong><strong>-h, --help</strong></strong></dt>
<dd>
<p>Print this help message.</p>
</dd>
<dt><strong><strong>--klargest</strong> <em>number</em></strong></dt>
<dd>
<p>Kth largest value to find by <em>KLargest</em> function. Default value: <em>2</em>. Valid values: positive
integers.</p>
</dd>
<dt><strong><strong>--ksmallest</strong> <em>number</em></strong></dt>
<dd>
<p>Kth smallest value to find by <em>KSmallest</em> function. Default values: <em>2</em>. Valid values: positive
integers.</p>
</dd>
<dt><strong><strong>-m, --mode</strong> <em>DescriptiveStatisticsBasic | DescriptiveStatisticsAll | All | &quot;function1, [function2,...]&quot;</em></strong></dt>
<dd>
<p>Specify how to analyze data in SDFile(s): calculate basic or all descriptive statistics; or
use a comma delimited list of supported statistical functions. Possible values:
<em>DescriptiveStatisticsBasic | DescriptiveStatisticsAll | &quot;function1,[function2]...&quot;</em>. Default
value: <em>DescriptiveStatisticsBasic</em></p>
<p><em>DescriptiveStatisticsBasic</em> includes these functions: <em>Count, Maximum, Minimum, Mean,
Median, Sum, StandardDeviation, StandardError, Variance</em>.</p>
<p><em>DescriptiveStatisticsAll</em>, in addition to  <em>DescriptiveStatisticsBasic</em> functions, includes:
<em>GeometricMean, Frequency, HarmonicMean, KLargest, KSmallest, Kurtosis, Mode, RSquare,
Skewness, TrimMean</em>.</p>
<p><em>All</em> uses complete list of supported functions: <em>Average, AverageDeviation, Correlation,
Count, Covariance, GeometricMean, Frequency, HarmonicMean, KLargest, KSmallest, Kurtosis,
Maximum, Minimum, Mean, Median, Mode, RSquare, Skewness, Sum,
SumOfSquares, StandardDeviation, StandardDeviationN, StandardError, StandardScores,
StandardScoresN, TrimMean, Variance, VarianceN</em>. The function names ending with N
calculate corresponding values assuming an entire population instead of a population sample.
Here are the formulas for these functions:</p>
<p>Average: See Mean</p>
<p>AverageDeviation: SUM( ABS(x[i] - Xmean) ) / n</p>
<p>Correlation: See Pearson Correlation</p>
<p>Covariance: SUM( (x[i] - Xmean)(y[i] - Ymean) ) / n</p>
<p>GeometricMean: NthROOT( PRODUCT(x[i]) )</p>
<p>HarmonicMean: 1 / ( SUM(1/x[i]) / n )</p>
<p>Mean: SUM( x[i] ) / n</p>
<p>Median: Xsorted[(n - 1)/2 + 1] for even values of n; (Xsorted[n/2] + Xsorted[n/2 + 1])/2
for odd values of n.</p>
<p>Kurtosis: [ {n(n + 1)/(n - 1)(n - 2)(n - 3)}  SUM{ ((x[i] - Xmean)/STDDEV)^4 } ] -
{3((n - 1)^2)}/{(n - 2)(n-3)}</p>
<p>PearsonCorrelation: SUM( (x[i] - Xmean)(y[i] - Ymean) ) / SQRT( SUM( (x[i] - Xmean)^2 )
(SUM( (y[i] - Ymean)^2 ))   )</p>
<p>RSquare: PearsonCorrelation^2</p>
<p>Skewness: {n/(n - 1)(n - 2)} SUM{ ((x[i] - Xmean)/STDDEV)^3 }</p>
<p>StandardDeviation: SQRT ( SUM( (x[i] - Mean)^2 ) / (n - 1) )</p>
<p>StandardDeviationN: SQRT ( SUM( (x[i] - Mean)^2 ) / n )</p>
<p>StandardError: StandardDeviation / SQRT( n )</p>
<p>StandardScore: (x[i] - Mean) / (n - 1)</p>
<p>StandardScoreN: (x[i] - Mean) / n</p>
<p>Variance: SUM( (x[i] - Xmean)^2  / (n - 1) )</p>
<p>VarianceN: SUM( (x[i] - Xmean)^2  / n )</p>
</dd>
<dt><strong><strong>-o, --overwrite</strong></strong></dt>
<dd>
<p>Overwrite existing files.</p>
</dd>
<dt><strong><strong>--outdelim</strong> <em>comma | tab | semicolon</em></strong></dt>
<dd>
<p>Output text file delimiter. Possible values: <em>comma, tab, or semicolon</em>
Default value: <em>comma</em>.</p>
</dd>
<dt><strong><strong>-p, --precision</strong> <em>number</em></strong></dt>
<dd>
<p>Precision of calculated values in the output file. Default: up to <em>2</em> decimal places.
Valid values: positive integers.</p>
</dd>
<dt><strong><strong>-q, --quote</strong> <em>yes | no</em></strong></dt>
<dd>
<p>Put quotes around column values in output text file. Possible values: <em>yes or
no</em>. Default value: <em>yes</em>.</p>
</dd>
<dt><strong><strong>-r, --root</strong> <em>rootname</em></strong></dt>
<dd>
<p>New text file name is generated using the root: &lt;Root&gt;.&lt;Ext&gt;. Default new file
name: &lt;InitialSDFileName&gt;&lt;Mode&gt;.&lt;Ext&gt;. Based on the specified analysis,
&lt;Mode&gt; corresponds to one of these values: DescriptiveStatisticsBasic,
DescriptiveStatisticsAll, AllStatistics, SpecifiedStatistics, Covariance, Correlation,
Frequency, or StandardScores. The csv, and tsv &lt;Ext&gt; values are used for
comma/semicolon, and tab delimited text files respectively. This option is ignored for
multiple input files.</p>
</dd>
<dt><strong><strong>--trimfraction</strong> <em>number</em></strong></dt>
<dd>
<p>Fraction of data to exclude from the top and bottom of the data set during
<em>TrimMean</em> calculation. Default value: <em>0.1</em> Valid values: &gt; 0 and &lt; 1.</p>
</dd>
<dt><strong><strong>-w --workingdir</strong> <em>text</em></strong></dt>
<dd>
<p>Location of working directory. Default: current directory.</p>
</dd>
</dl>
<p>
</p>
<h2>EXAMPLES</h2>
<p>To calculate basic statistics for data in all common data fields and generate a
NewSample1DescriptiveStatisticsBasic.csv file, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl -o -r NewSample1 Sample1.sdf</div>
<p>To calculate basic statistics for MolWeight data field and generate a
NewSample1DescriptiveStatisticsBasic.csv file, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl --datafields MolWeight -o -r NewSample1
    Sample1.sdf</div>
<p>To calculate all available statistics for MolWeight data field and all data field pairs,
and generate NewSample1DescriptiveStatisticsAll.csv, NewSample1CorrelationMatrix.csv,
NewSample1CorrelationMatrix.csv, and NewSample1MolWeightFrequencyAnalysis.csv
files, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl -m DescriptiveStatisticsAll --datafields
    MolWeight -o --datafieldpairs AllPairs -r NewSample1 Sample1.sdf</div>
<p>To compute frequency distribution of MolWeight data field into five bins and
generate NewSample1MolWeightFrequencyAnalysis.csv, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl -m Frequency --frequencybins 5 --datafields
    MolWeight -o -r NewSample1 Sample1.sdf</div>
<p>To compute frequency distribution of data in MolWeight data field into specified bin range
values, and generate NewSample1MolWeightFrequencyAnalysis.csv, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl -m Frequency --frequencybins &quot;100,200,400&quot;
    --datafields MolWeight -o -r NewSample1 Sample1.sdf</div>
<p>To calculate all available statistics for data in all data fields and pairs, type:</p>
<div class="ExampleBox">
    % AnalyzeSDFilesData.pl -m All --datafields  All --datafieldpairs
    AllPairs -o -r NewSample1 Sample1.sdf</div>
<p>
</p>
<h2>AUTHOR</h2>
<p><a href="mailto:msud@san.rr.com">Manish Sud</a></p>
<p>
</p>
<h2>SEE ALSO</h2>
<p><a href="./FilterSDFiles.html">FilterSDFiles.pl</a>,&nbsp<a href="./InfoSDFiles.html">InfoSDFiles.pl</a>,&nbsp<a href="./SplitSDFiles.html">SplitSDFiles.pl</a>,&nbsp<a href="./MergeTextFilesWithSD.html">MergeTextFilesWithSD.pl</a>
</p>
<p>
</p>
<h2>COPYRIGHT</h2>
<p>Copyright (C) 2015 Manish Sud. All rights reserved.</p>
<p>This file is part of MayaChemTools.</p>
<p>MayaChemTools is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.</p>
<p>&nbsp</p><p>&nbsp</p><div class="DocNav">
<table width="100%" border=0 cellpadding=0 cellspacing=2>
<tr align="left" valign="top"><td width="33%" align="left"><a href="./README.html" title="README.html">Previous</a>&nbsp;&nbsp;<a href="./index.html" title="Table of Contents">TOC</a>&nbsp;&nbsp;<a href="./AnalyzeSequenceFilesData.html" title="AnalyzeSequenceFilesData.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>AnalyzeSDFilesData.pl</strong></td></tr>
</table>
</div>
<br />
<center>
<img src="../../images/h2o2.png">
</center>
</body>
</html>