Repository 'rgrnastar'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/rgrnastar

Changeset 28:3e94726bfa9d (2024-02-11)
Previous changeset 27:79de45b5069b (2023-09-01) Next changeset 29:b0f2be869d6d (2024-02-14)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rgrnastar commit 452556bcdcc3fe4e9ace07201be2365cd6f99e2f
modified:
macros.xml
rg_rnaStar.xml
added:
test-data/rnastar_test_diploid.log
test-data/rnastar_test_mapped_reads.vcf
test-data/rnastar_test_mapped_reads_diploid.bam
test-data/rnastar_test_mapped_reads_test10.bam
test-data/rnastar_test_splicejunctions_diploid.bed
b
diff -r 79de45b5069b -r 3e94726bfa9d macros.xml
--- a/macros.xml Fri Sep 01 13:17:29 2023 +0000
+++ b/macros.xml Sun Feb 11 00:01:54 2024 +0000
b
@@ -4,8 +4,8 @@
     The data manager uses a symlink to this macro file to keep the STAR and
     the index versions in sync, but you should manually update @IDX_VERSION_SUFFIX@ -->
     <!-- STAR version to be used -->
-    <token name="@TOOL_VERSION@">2.7.10b</token>
-    <token name="@VERSION_SUFFIX@">4</token>
+    <token name="@TOOL_VERSION@">2.7.11a</token>
+    <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">21.01</token>
     <!-- STAR index version compatible with this version of STAR
     This is the STAR version that introduced the index structure expected
@@ -15,14 +15,14 @@
     or by looking for the versionGenome parameter in source/parametersDefault
     of STAR's source code -->
     <token name="@IDX_VERSION@">2.7.4a</token>
-    <token name="@IDX_VERSION_SUFFIX@">1</token>
+    <token name="@IDX_VERSION_SUFFIX@">0</token>
     <token name="@IDX_DATA_TABLE@">rnastar_index2x_versioned</token>
 
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">star</requirement>
-            <requirement type="package" version="1.16.1">samtools</requirement>
-            <requirement type="package" version="1.12">gzip</requirement>
+            <requirement type="package" version="1.18">samtools</requirement>
+            <requirement type="package" version="1.13">gzip</requirement>
             <yield />
         </requirements>
     </xml>
@@ -122,6 +122,13 @@
             #if str($refGenomeSource.genomeSAindexNbases):
                 --genomeSAindexNbases ${refGenomeSource.genomeSAindexNbases}
             #end if
+            ## Diploid mode
+            #if 'diploidconditional' in $refGenomeSource:
+                #if str($refGenomeSource.diploidconditional.diploid) == 'Yes':
+                    --genomeTransformVCF '${refGenomeSource.diploidconditional.genomeTransformVCF}'
+                    --genomeTransformType Diploid
+                #end if   
+            #end if
             --runThreadN \${GALAXY_SLOTS:-4}
             ## in bytes
             --limitGenomeGenerateRAM \$((\${GALAXY_MEMORY_MB:-31000} * 1000000))
b
diff -r 79de45b5069b -r 3e94726bfa9d rg_rnaStar.xml
--- a/rg_rnaStar.xml Fri Sep 01 13:17:29 2023 +0000
+++ b/rg_rnaStar.xml Sun Feb 11 00:01:54 2024 +0000
[
@@ -91,6 +91,15 @@
         ## Read MAPQ
         --outSAMmapqUnique ${oformat.outSAMmapqUnique}
 
+        ## Transform diploid mode output to reference coordinates
+        #if str($refGenomeSource.geneSource) == 'history':
+            #if 'diploidconditional' in $refGenomeSource:
+                #if str($refGenomeSource.diploidconditional.diploid) == 'Yes':
+                    '${refGenomeSource.diploidconditional.genomeTransformOutput}'
+                #end if   
+            #end if
+        #end if
+
         ## Output filter parameters
 
         ## Basic Filters
@@ -318,6 +327,18 @@
                         <expand macro="quantModeNoGTF" />
                     </when>
                 </conditional>
+                <conditional name="diploidconditional">
+                    <param name="diploid" type="select" label="Diploid mode" help="Map RNA-seq reads to a diploid genome">
+                        <option value="No" selected="True">No</option>
+                        <option value="Yes">Yes</option>
+                    </param>
+                    <when value="Yes">
+                        <param argument="--genomeTransformVCF" type="data" format="vcf" label="VCF file with diploid SNVs and InDels" help="The homozygous and heterozygous alleles from this VCF will be inserted into the reference genome to create a transformed genome with two haplotypes"/>
+                        <param argument="--genomeTransformOutput" type="boolean" checked="false" truevalue="--genomeTransformOutput SAM SJ Quant" falsevalue="--genomeTransformOutput None" label="Transform alignments, spliced junctions and quantifications back to                         the reference coordinates" help="Use this if downstream processing relies on reference coordinates"/>
+                    </when>
+                    <when value="No">
+                    </when>
+                </conditional>
             </when>
         </conditional>
 
@@ -810,6 +831,7 @@
 
             <output name="chimeric_junctions" file="test3.chimjunc.tabular" compare="diff" lines_diff="2"/>
         </test>
+        <!-- test 10 -->
         <test expect_num_outputs="3">
             <conditional name="singlePaired">
                 <param name="sPaired" value="single" />
@@ -837,7 +859,7 @@
 
             <output name="output_log" file="rnastar_test.log" compare="re_match_multiline" />
             <output name="splice_junctions" file="rnastar_test_splicejunctions.bed"/>
-            <output name="mapped_reads" file="rnastar_test_mapped_reads.bam" compare="sim_size" delta="634" />
+            <output name="mapped_reads" file="rnastar_test_mapped_reads_test10.bam" compare="sim_size" delta="634" />
         </test>
         <!-- twopass mode tests -->
         <!-- test Basic twopass -->
@@ -1117,6 +1139,28 @@
             <output name="signal_unique_str2" file="tophat_rev_Signal.Unique.str2.out.bg" ftype="bedgraph" />
             <output name="signal_uniquemultiple_str2" file="tophat_rev_Signal.Unique.str2.out.bg" ftype="bedgraph" />
         </test>
+        <!-- test diploid mode -->
+        <test expect_num_outputs="3">
+            <conditional name="singlePaired">
+                <param name="sPaired" value="single" />
+                <param name="input1" value="tophat_in2.fastqsanger" ftype="fastqsanger" />
+            </conditional>
+            <conditional name="refGenomeSource">
+                <param name="geneSource" value="history" />
+                <param name="genomeFastaFiles" value="tophat_test.fa.gz" />
+                <param name="genomeSAindexNbases" value="5" />
+            </conditional>
+            <conditional name="diploidconditional">
+                <param name="diploid" value="Yes" />
+                <!-- generated from rnastar_test_mapped_reads.bam with
+                bcftools mpileup and bcftools call -->
+                <param name="genomeTransformVCF" value="rnastar_test_mapped_reads.vcf" ftype="vcf" />
+                <param name="genomeTransformOutput" value="true" />
+            </conditional>
+            <output name="output_log" file="rnastar_test_diploid.log" compare="re_match_multiline" />
+            <output name="splice_junctions" file="rnastar_test_splicejunctions_diploid.bed"/>
+            <output name="mapped_reads" file="rnastar_test_mapped_reads_diploid.bam" compare="sim_size" delta="634" />
+        </test>
       </tests>
     <help><![CDATA[
 **What it does**
b
diff -r 79de45b5069b -r 3e94726bfa9d test-data/rnastar_test_diploid.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnastar_test_diploid.log Sun Feb 11 00:01:54 2024 +0000
b
@@ -0,0 +1,37 @@
+                                 Started job on | .*
+                             Started mapping on | .*
+                                    Finished on | .*
+       Mapping speed, Million of reads per hour | inf
+
+                          Number of input reads | 100
+                      Average input read length | 75
+                                    UNIQUE READS:
+                   Uniquely mapped reads number | 100
+                        Uniquely mapped reads % | 100.00%
+                          Average mapped length | 74.65
+                       Number of splices: Total | 53
+            Number of splices: Annotated (sjdb) | 0
+                       Number of splices: GT/AG | 53
+                       Number of splices: GC/AG | 0
+                       Number of splices: AT/AC | 0
+               Number of splices: Non-canonical | 0
+                      Mismatch rate per base, % | 1.63%
+                         Deletion rate per base | 0.00%
+                        Deletion average length | 0.00
+                        Insertion rate per base | 0.00%
+                       Insertion average length | 0.00
+                             MULTI-MAPPING READS:
+        Number of reads mapped to multiple loci | 0
+             % of reads mapped to multiple loci | 0.00%
+        Number of reads mapped to too many loci | 0
+             % of reads mapped to too many loci | 0.00%
+                                  UNMAPPED READS:
+  Number of reads unmapped: too many mismatches | 0
+       % of reads unmapped: too many mismatches | 0.00%
+            Number of reads unmapped: too short | 0
+                 % of reads unmapped: too short | 0.00%
+                Number of reads unmapped: other | 0
+                     % of reads unmapped: other | 0.00%
+                                  CHIMERIC READS:
+                       Number of chimeric reads | 0
+                            % of chimeric reads | 0.00%
b
diff -r 79de45b5069b -r 3e94726bfa9d test-data/rnastar_test_mapped_reads.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnastar_test_mapped_reads.vcf Sun Feb 11 00:01:54 2024 +0000
b
@@ -0,0 +1,30 @@
+##fileformat=VCFv4.2
+##FILTER=<ID=PASS,Description="All filters passed">
+##bcftoolsVersion=1.13+htslib-1.13+ds
+##bcftoolsCommand=mpileup -Ob -o rnastar_test_mapped_reads.bcf -f tophat_test.fa rnastar_test_mapped_reads.bam
+##reference=file://tophat_test.fa
+##contig=<ID=test_chromosome,length=650>
+##ALT=<ID=*,Description="Represents allele(s) other than observed.">
+##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
+##INFO=<ID=IDV,Number=1,Type=Integer,Description="Maximum number of raw reads supporting an indel">
+##INFO=<ID=IMF,Number=1,Type=Float,Description="Maximum fraction of raw reads supporting an indel">
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw read depth">
+##INFO=<ID=VDB,Number=1,Type=Float,Description="Variant Distance Bias for filtering splice-site artefacts in RNA-seq data (bigger is better)",Version="3">
+##INFO=<ID=RPBZ,Number=1,Type=Float,Description="Mann-Whitney U-z test of Read Position Bias (closer to 0 is better)">
+##INFO=<ID=MQBZ,Number=1,Type=Float,Description="Mann-Whitney U-z test of Mapping Quality Bias (closer to 0 is better)">
+##INFO=<ID=BQBZ,Number=1,Type=Float,Description="Mann-Whitney U-z test of Base Quality Bias (closer to 0 is better)">
+##INFO=<ID=MQSBZ,Number=1,Type=Float,Description="Mann-Whitney U-z test of Mapping Quality vs Strand Bias (closer to 0 is better)">
+##INFO=<ID=SCBZ,Number=1,Type=Float,Description="Mann-Whitney U-z test of Soft-Clip Length Bias (closer to 0 is better)">
+##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">
+##INFO=<ID=SGB,Number=1,Type=Float,Description="Segregation based metric.">
+##INFO=<ID=MQ0F,Number=1,Type=Float,Description="Fraction of MQ0 reads (smaller is better)">
+##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes for each ALT allele, in the same order as listed">
+##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
+##INFO=<ID=DP4,Number=4,Type=Integer,Description="Number of high-quality ref-forward , ref-reverse, alt-forward and alt-reverse bases">
+##INFO=<ID=MQ,Number=1,Type=Integer,Description="Average mapping quality">
+##bcftools_callVersion=1.13+htslib-1.13+ds
+##bcftools_callCommand=call -vmO z -o rnastar_test_mapped_reads.vcf.gz rnastar_test_mapped_reads.bcf; Date=Tue Jan  2 11:53:57 2024
+#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT rnastar_test_mapped_reads.bam
+test_chromosome 219 . G C 170.416 . DP=27;VDB=0.505999;SGB=-0.693021;FS=0;MQ0F=0;AC=2;AN=2;DP4=0,0,7,20;MQ=20 GT:PL 1/1:200,81,0
b
diff -r 79de45b5069b -r 3e94726bfa9d test-data/rnastar_test_mapped_reads_diploid.bam
b
Binary file test-data/rnastar_test_mapped_reads_diploid.bam has changed
b
diff -r 79de45b5069b -r 3e94726bfa9d test-data/rnastar_test_mapped_reads_test10.bam
b
Binary file test-data/rnastar_test_mapped_reads_test10.bam has changed
b
diff -r 79de45b5069b -r 3e94726bfa9d test-data/rnastar_test_splicejunctions_diploid.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rnastar_test_splicejunctions_diploid.bed Sun Feb 11 00:01:54 2024 +0000
b
@@ -0,0 +1,2 @@
+test_chromosome 251 350 1 1 0 27 0 37
+test_chromosome 401 500 1 1 0 25 0 36