diff plotPCA.xml @ 17:f2f1ca0f032f draft

planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit b1f975422b307927bbbe245d57609e9464d5d5c8-dirty
author bgruening
date Thu, 15 Feb 2018 07:39:05 -0500
parents dfe535b75616
children d9376d223fad
line wrap: on
line diff
--- a/plotPCA.xml	Mon Feb 05 11:42:35 2018 -0500
+++ b/plotPCA.xml	Thu Feb 15 07:39:05 2018 -0500
@@ -14,8 +14,15 @@
             --plotFileFormat "$outFileFormat"
             #if str($advancedOpt.showAdvancedOpt) == 'yes':
                 @PLOTWIDTHHEIGHT@
+                $advancedOpt.log2
+                --PCs $advancedOpt.PCs
+                --ntop $advancedOpt.ntop
+                $advancedOpt.transpose
+                $advancedOpt.rowCenter
+                #if $advancedOpt.colors:
+                    --colors $advancedOpt.colors
+                #end if
             #end if
-            $rowCenter
             #if $outFileNameData
                 --outFileNameData "$output_outFileNameData"
             #end if
@@ -26,7 +33,6 @@
         <expand macro="input_image_file_format" />
         <expand macro="plotTitle" />
         <param argument="--outFileNameData" type="boolean" label="Save the matrix of PCA and eigenvalues underlying the plot."/>
-        <param argument="--rowCenter" type="boolean" label="Center Rows?" help="When specified, each row (bin, gene, etc.) in the matrix is centered at 0 before the PCA is computed. This is useful only if you have a strong bin/gene/etc. correlation and the resulting principal component has samples stacked vertically." truevalue="--rowCenter" falsevalue="" />
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -35,6 +41,15 @@
             <when value="no" />
             <when value="yes">
                 <expand macro="plotWidthHeight" PLOTWIDTH="5.0" PLOTHEIGHT="10.0" />
+                <param name="PCs" argument="--PCs" label="Principal components to plot" value="1 2" type="text"
+                    help="The principal components to plot. If specified, you must provide two different integers, greater than zero, separated by a space. An example (and the default) is '1 2'." />
+                <param name="ntop" argument="--ntop" label="Number of rows to use" value="1000" type="integer"
+                    help="Use only the top N most variable rows in the original matrix. Specifying 0 will result in all rows being used. If the matrix is to be transposed, rows with 0 variance are always excluded, even if a values of 0 is specified. The default is 1000." />
+                <param name="log2" argument="--log2" type="boolean" truevalue="--log2" falsevalue="" label="log2 transform data" help="log2 transform the datapoints prior to computing the PCA. Note that 0.01 is added to all values to prevent 0 values from becoming -infinity. Using this option with input that contains negative values will result in an error." />
+                <param argument="--transpose" type="boolean" label="Transpose Matrix?" help="Perform the PCA on the transpose of the matrix, (i.e., with samples as rows and features/genes as columns). This then matches what is typically done in R for RNAseq data." truevalue="--transpose" falsevalue="" />
+                <param argument="--rowCenter" type="boolean" label="Center Rows?" help="When specified, each row (bin, gene, etc.) in the matrix is centered at 0 before the PCA is computed. This is useful only if you have a strong bin/gene/etc. correlation and the resulting principal component has samples stacked vertically. This option is not applicable if the PCA is performed on the transposed matrix." truevalue="--rowCenter" falsevalue="" />
+                <param argument="--colors" type="text" name="colors" label="Symbol colors" value="" optional="True"
+                    help="A list of colors for the symbols. Color names and html hex string (e.g., #eeff22) are accepted. The color names should be space separated. For example, --colors 'red blue green'. If not specified, the symbols will be given automatic colors." />
             </when>
         </conditional>
     </inputs>
@@ -49,14 +64,15 @@
             <param name="corData" value="multiBamSummary_result2b.npz" ftype="deeptools_coverage_matrix" />
             <param name="plotTitle" value="Test Plot" />
             <param name="outFileFormat" value="png" />
-            <output name="outFileName" file="plotPCA_result1.png" ftype="png" compare="sim_size" delta="4000" />
+            <param name="showAdvancedOpt" value="yes" />
+            <output name="outFileName" file="plotPCA_result1.png" ftype="png" compare="sim_size" delta="12000" />
         </test>
         <test>
             <param name="corData" value="multiBamSummary_result2b.npz" ftype="deeptools_coverage_matrix" />
             <param name="plotTitle" value="Test Plot" />
             <param name="outFileFormat" value="png" />
             <param name="outFileNameData" value="True" />
-            <output name="outFileName" file="plotPCA_result2.png" ftype="png" compare="sim_size" delta="4000" />
+            <output name="outFileName" file="plotPCA_result2.png" ftype="png" compare="sim_size" delta="12000" />
             <output name="output_outFileNameData" file="plotPCA_result2.tabular" ftype="tabular" />
         </test>
     </tests>
@@ -73,8 +89,8 @@
 
 The result is a panel of two plots:
 
-1. The eigenvalues of the **top two principal components**.
-2. The **Scree plot** for the top five principal components where the bars represent the amount of variability explained by the individual factors and the red line traces the amount of variability is explained by the individual components in a cumulative manner
+1. Either the loadings (default) or the projections (``--transpose``) of the samples on the desired **two principal components**.
+2. The **Scree plot** for principal components where the bars represent the eigenvalues the red line traces the amount of variability is explained by the individual components in a cumulative manner.
 
 Example plot
 ------------