diff rg_rnaStarSolo.xml @ 10:a6fba3d92531 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rgrnastar commit d0c9fa48df667ffad1abd71164e6bb1d9cb16bd9"
author iuc
date Mon, 15 Mar 2021 13:46:45 +0000
parents ec9cbd6b9a49
children 79b885ce78d7
line wrap: on
line diff
--- a/rg_rnaStarSolo.xml	Fri Jan 15 17:39:11 2021 +0000
+++ b/rg_rnaStarSolo.xml	Mon Mar 15 13:46:45 2021 +0000
@@ -41,6 +41,17 @@
     --soloCBlen $sc.params.soloCBlen
     --soloUMIstart $sc.params.soloUMIstart
     --soloUMIlen $sc.params.soloUMIlen
+        #if $sc.params.bccdna_mate.bc_location == "same_mate":
+        --soloBarcodeMate $sc.params.bccdna_mate.soloBarcodeMate
+            #if $sc.params.bccdna_mate.soloBarcodeMate == "1":
+            --clip5pNbases $sc.params.bccdna_mate.clip_n_bases 0
+            #else if $sc.params.bccdna_mate.soloBarcodeMate == "2":
+            --clip3pNbases 0 $sc.params.bccdna_mate.clip_n_bases
+            #end if
+        #end if
+    --soloAdapterSequence '$sc.params.soloAdapterSequence'
+    --soloAdapterMismatchesNmax $sc.params.soloAdapterMismatchesNmax
+    --clipAdapterType $sc.params.clipAdapterType
     #end if
 
     #elif str($sc.solo_type) == "CB_UMI_Complex":
@@ -58,8 +69,9 @@
     --soloCBposition $cb_pos
     #set $umi_pos = '_'.join([str($sc.umi_start_anchor), str($sc.umi_start_anchor_pos), str($sc.umi_end_anchor), str($sc.umi_end_anchor_pos)])
     --soloUMIposition $umi_pos
-    --soloAdapterSequence $sc.soloAdapterSequence
+    --soloAdapterSequence '$sc.soloAdapterSequence'
     --soloAdapterMismatchesNmax $sc.soloAdapterMismatchesNmax
+    --clipAdapterType $sc.clipAdapterType
 
     #elif str($sc.solo_type) == "SmartSeq":
     ## Create a manifest file with fastq files and their corresponding cell-ids
@@ -87,6 +99,8 @@
 
     #if str($solo.filter.filter_type) == "cellranger2":
     --soloCellFilter CellRanger2.2 $solo.filter.n_expected $solo.filter.max_perc $solo.filter.max_min_ratio
+    #else if str($solo.filter.filter_type) == "emptydrops":
+    --soloCellFilter EmptyDrops_CR $solo.filter.nExpectedCells $solo.filter.maxPercentile $solo.filter.maxMinRatio $solo.filter.indMin $solo.filter.indMax $solo.filter.umiMin $solo.filter.umiMinFracMedian $solo.filter.candMaxN $solo.filter.FDR $solo.filter.simN
     #else if str($solo.filter.filter_type) == "topcells":
     --soloCellFilter TopCells $solo.filter.n_cells
     #else if str($solo.filter.filter_type) == "no_filter":
@@ -187,12 +201,28 @@
                         <param argument="--soloCBlen" type="integer" min="1" value="16" label="Cell Barcode Length" />
                         <param argument="--soloUMIstart" type="integer" min="1" value="17" label="UMI Start Base" />
                         <param argument="--soloUMIlen" type="integer" min="1" value="10" label="UMI Length" />
+                        <conditional name="bccdna_mate" >
+                            <param name="bc_location" type="select" label="Barcode and cDNA on the same mate\?" >
+                                <option value="other_mate" selected="true">BC and cDNA are on different mates of paired-end read</option>
+                                <option value="same_mate">BC and cDNA are on the same mate of paired-end read</option>
+                            </param>
+                            <when value="other_mate" />
+                            <when value="same_mate" >
+                                <param argument="--soloBarcodeMate" type="select" label="Barcode sequence is a part of">
+                                    <option value="1" selected="true">mate 1</option>
+                                    <option value="2">mate 2</option>
+                                </param>
+                                <param name="clip_n_bases" type="integer" value="39" label="Number of bases to clip (=CB+UMI+adapter)"/>
+                            </when>
+                        </conditional>
+                        <expand macro="solo_adapter_params" />
                     </when>
                 </conditional>
                 <param argument="--soloBarcodeReadLength" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Barcode Size is same size of the Read" help="Disable this if your R1 barcodes contain poly-T bases after the barcode sequence." />
                 <param argument="--soloUMIdedup" type="select" label="UMI deduplication (collapsing) algorithm" help="All has all UMIs with 1 mismatch distance to each other collapsed, Directional follows the 'directional' method given in UMI-tools, Exact collapses only exactly matching UMIs.">
                     <expand macro="umidedup_options" />
                     <option value="Exact" >Exact</option>
+                    <option value="1MM_CR" >CellRanger2-4 algorithm</option>
                 </param>
                 <param argument="--soloCBmatchWLtype" type="select" label="Matching the Cell Barcodes to the WhiteList" help="Exact: only exact matches allowed; 1MM: only one match in whitelist with 1 mismatched base allowed. Allowed
     CBs have to have at least one read with exact match; 1MM_multi: multiple matches in whitelist with 1 mismatched base allowed, posterior probability calculation is used choose one of the matches; 1MM_multi_pseudocounts: same as 1MM_Multi, but pseudocounts of 1 are added to all whitelist barcodes.">
@@ -221,11 +251,11 @@
                     <expand macro="anchor_types" />
                 </param>
                 <param name="umi_end_anchor_pos" type="integer" value="0" label="0-based position of the UMI end with respect to the anchor base" />
-                <param argument="--soloAdapterSequence" type="text" value="-" label="Adapter sequence to anchor barcodes." />
-                <param argument="--soloAdapterMismatchesNmax" type="integer" min="1" value="1" label="Maximum number of mismatches allowed in adapter sequence" />
+                <expand macro="solo_adapter_params" />
                 <param argument="--soloUMIdedup" type="select" label="UMI deduplication (collapsing) algorithm" help="All has all UMIs with 1 mismatch distance to each other collapsed, Directional follows the 'directional' method given in UMI-tools, Exact collapses only exactly matching UMIs.">
                     <expand macro="umidedup_options" />
                     <option value="Exact" >Exact</option>
+                    <option value="1MM_CR" >CellRanger2-4 algorithm</option>
                 </param>
                 <param argument="--soloCBmatchWLtype" type="select" label="Matching the Cell Barcodes to the WhiteList" help="Exact: only exact matches allowed; 1MM: only one match in whitelist with 1 mismatched base allowed. Allowed
     CBs have to have at least one read with exact match; 1MM_multi: multiple matches in whitelist with 1 mismatched base allowed, posterior probability calculation is used choose one of the matches; 1MM_multi_pseudocounts: same as 1MM_Multi, but pseudocounts of 1 are added to all whitelist barcodes.">
@@ -234,7 +264,7 @@
             </when>
             <when value="SmartSeq">
                 <expand macro="input_selection_smart_seq" />
-                <param name="cell_ids" type="data" label="File containing cell IDs of the samples. One ID per line in order of samples in the above collection."/>
+                <param name="cell_ids" format="txt,tsv" type="data" label="File containing cell IDs of the samples. One ID per line in order of samples in the above collection."/>
                 <param argument="--soloUMIdedup" type="select" label="UMI deduplication (collapsing) algorithm" help="All has all UMIs with 1 mismatch distance to each other collapsed, Directional follows the 'directional' method given in UMI-tools, Exact collapses only exactly matching UMIs.">
                     <option value="Exact" >Exact</option>
                     <option value="NoDedup">Do not deduplicate UMIs</option>
@@ -254,11 +284,13 @@
             </param>
             <param argument="--soloUMIfiltering" type="select" label="Type of UMI filtering" >
                 <option value="-" selected="true">Remove UMIs with N and homopolymers (similar to CellRanger 2.2.0)</option>
-                <option value="MultiGeneUMI" >Remove lower-count UMIs that map to more than one gene ((introduced in CellRanger 3.x.x)</option>
+                <option value="MultiGeneUMI" >Remove lower-count UMIs that map to more than one gene</option>
+                <option value="MultiGeneUMI_CR" >Remove lower-count UMIs that map to more than one gene, matching CellRanger > 3.0.0</option>
             </param>
             <conditional name="filter" >
                 <param name="filter_type" type="select" label="Cell filtering type and parameters" >
                     <option value="cellranger2" selected="true" >Simple filtering of CellRanger v2</option>
+                    <option value="emptydrops" >EmptyDrops filtering in CellRanger flavor</option>
                     <option value="topcells" >Filter top N cells</option>
                     <option value="no_filter" >Do not filter</option>
                 </param>
@@ -267,6 +299,18 @@
                     <param name="max_perc" type="float" min="0" max="1" value="0.99" label="Robust maximum percentile for UMI count" />
                     <param name="max_min_ratio" type="float" min="1" value="10" label="Maximum to minimum ratio for UMI count" />
                 </when>
+                <when value="emptydrops" >
+                    <param name="nExpectedCells" type="integer" min="1" value="3000" label="Number of expected cells" />
+                    <param name="maxPercentile" type="float" min="0" max="1" value="0.99" label="Robust maximum percentile for UMI count" />
+                    <param name="maxMinRatio" type="float" min="1" value="10" label="Maximum to minimum ratio for UMI count" />
+                    <param name="indMin" type="integer" value="45000" label="Minimum number of barcodes (used as partition parameter for ambient estimation)" />
+                    <param name="indMax" type="integer" value="90000" label="Maximum number of barcodes (used as partition parameter for ambient estimation)" />
+                    <param name="umiMin" type="integer" value="500" label="Consider at least these many UMIs per barcode after initial cell calling" />
+                    <param name="umiMinFracMedian" type="float" value="0.01" label="Minimum UMI:median ratio after initial cell calling" />
+                    <param name="candMaxN" type="integer" value="20000" label="Number of extra barcodes after initial cell calling" />
+                    <param name="FDR" type="float" value="0.01" label="Maximum adjusted p-value for determining a barcode as non-ambient" />
+                    <param name="simN" type="integer" value="10000" label="Number of log likelihood simulations" />
+                </when>
                 <when value="topcells" >
                     <param name="n_cells" type="integer" min="1" value="3000" label="Number of top cells to report sorted by UMI count" />
                 </when>
@@ -420,7 +464,6 @@
                     <param name="soloUMIstart" value="17" />
                     <param name="soloUMIlen" value="12" />
                 </conditional>
-                <param name="soloUMIdedup" value="1MM_All" />
             </conditional>
             <section name="solo" >
                 <param name="soloStrand" value="Forward" />
@@ -577,6 +620,72 @@
             </output>
         </test>
         <test expect_num_outputs="6">
+            <!-- Emptydrops filtering -->
+            <conditional name="refGenomeSource">
+                <param name="geneSource" value="history" />
+                <param name="genomeFastaFiles" value="filtered3.Homo_sapiens.GRCh38.dna.chromosome.21.fa.gz" />
+                <param name="genomeSAindexNbases" value="4" />
+                <param name="sjdbOverhang" value="100" />
+                <param name="sjdbGTFfile" value="filtered3.Homo_sapiens.GRCh38.100.chr21.gtf" ftype="gtf"/>
+            </conditional>
+            <conditional name="sc" >
+                <param name="solo_type" value="CB_UMI_Simple" />
+                <conditional name="input_types">
+                    <param name="use" value="repeat" />
+                    <param name="input1" value="pbmc_1k_v2_L001.R1.10k.fastq.gz" ftype="fastqsanger.gz" />
+                    <param name="input2" value="pbmc_1k_v2_L001.R2.10k.fastq.gz" ftype="fastqsanger.gz" />
+                </conditional>
+                <param name="soloCBwhitelist" value="filtered.barcodes.txt" />
+                <conditional name="params">
+                    <param name="chemistry" value="CR3" />
+                </conditional>
+                <param name="soloUMIdedup" value="1MM_All" />
+            </conditional>
+            <section name="solo" >
+                <conditional name="filter">
+                    <param name="filter_type" value="emptydrops" />
+                    <param name="nExpectedCells" value="5" />
+                    <param name="maxPercentile" value="0.99" />
+                    <param name="maxMinRatio" value="10" />
+                    <param name="indMin" value="45000" />
+                    <param name="indMax" value="90000" />
+                    <param name="umiMin" value="500" />
+                    <param name="umiMinFracMedian" value="0.01" />
+                    <param name="candMaxN" value="20000" />
+                    <param name="FDR" value="0.01" />
+                    <param name="simN" value="10000" />
+                </conditional>
+                <param name="soloStrand" value="Forward" />
+                <param name="soloFeatures" value="Gene" />
+            </section>
+            <output name="output_barcodes_filtered">
+                <assert_contents>
+                    <!-- first and last line -->
+                    <has_line line="ACACCGGTCTAACGGT" />
+                    <has_line line="TTCTCAATCCACGTTC" />
+                </assert_contents>
+            </output>
+            <output name="output_genes_filtered">
+                <assert_contents>
+                    <has_line_matching expression="ENSG00000279493\s+FP565260\.4\s+Gene\s+Expression" />
+                    <has_line_matching expression="ENSG00000279064\s+FP236315\.1\s+Gene\s+Expression" />
+                </assert_contents>
+            </output>
+            <output name="output_matrix_filtered" >
+                <assert_contents>
+                    <has_line_matching expression="14\s+7\s+7" />
+                    <has_line_matching expression="4\s+7\s+1" />
+                </assert_contents>
+            </output>
+            <output name="output_stats" >
+                <assert_contents>
+                    <has_line_matching expression="\s+nUnmapped\s+5823" />
+                    <has_line_matching expression="\s+nUMIs\s+8" />
+                </assert_contents>
+            </output>
+            <output name="output_BAM" value="filtered3.bam" compare="sim_size" delta="600" />
+        </test>
+        <test expect_num_outputs="6">
             <!-- Test soloType CB_UMI_Complex -->
             <conditional name="refGenomeSource">
                 <param name="geneSource" value="history" />
@@ -612,6 +721,7 @@
                 <param name="umi_end_anchor_pos" value="14" />
                 <param name="soloAdapterSequence" value="GAGTGATTGCTTGTGACGCCTT"  />
                 <param name="soloAdapterMismatchesNmax" value="1" />
+                <param name="clipAdapterType" value="CellRanger4" />
                 <param name="soloUMIdedup" value="1MM_All" />
                 <param name="soloCBmatchWLtype" value="1MM" />
             </conditional>