diff mircounts.xml @ 10:de227b7307cf draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit af0f70b8156c078cc0d832c54ebb678af10c42a0
author artbio
date Sun, 29 Apr 2018 18:57:13 -0400
parents 2a08a6eb471c
children 7d50d8d0c8c4
line wrap: on
line diff
--- a/mircounts.xml	Wed Apr 25 12:48:27 2018 -0400
+++ b/mircounts.xml	Sun Apr 29 18:57:13 2018 -0400
@@ -1,18 +1,24 @@
-<tool id="mircounts" name="miRcounts" version="1.2.6">
+<tool id="mircounts" name="miRcounts" version="1.3.0">
     <description> Counts miRNA alignments from small RNA sequence data</description>
     <requirements>
-        <requirement type="package" version="1.18">gnu-wget</requirement>
         <requirement type="package" version="1.2.0">bowtie</requirement>
         <requirement type="package" version="1.6.0">samtools</requirement>
         <requirement type="package" version="0.11.2.2">pysam</requirement>
         <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement>
         <requirement type="package" version="0.20_34=r3.3.2_0">r-lattice</requirement>
     </requirements>
+    <stdio>
+        <exit_code range="1:" level="warning" description="Tool exception" />
+    </stdio>
     <command detect_errors="exit_code"><![CDATA[
-        wget --quiet ftp://mirbase.org/pub/mirbase/${mirbase_version}/genomes/${genomeKey}.gff3 && ## download the gff3 file specified by the variable genomeKey
-        python '$__tool_directory__'/mature_mir_gff_translation.py --input ${genomeKey}.gff3 --output $gff3 && ## transcode the mature miR genome coordinates into coordinates relative to the corresponding "miRNA_primary_transcript".
-        wget --quiet ftp://mirbase.org/pub/mirbase/${mirbase_version}/hairpin.fa.gz &&
-        sh '$__tool_directory__'/format_fasta_hairpins.sh $genomeKey &&
+        tar -xvzf  '$__tool_directory__'/mirbase.tar.gz &&
+        python '$__tool_directory__'/mature_mir_gff_translation.py
+                                                --gff_path mirbase/${mirbase_version}/genomes/${genomeKey}.gff3
+                                                --output $gff3 && ## transcode the mature miR genome coordinates into coordinates relative to the corresponding "miRNA_primary_transcript".
+        python '$__tool_directory__'/format_fasta_hairpins.py
+                                                --hairpins_path mirbase/${mirbase_version}/hairpin.fa.gz
+                                                --basename ${genomeKey}
+                                                --output hairpin.fa &&
         #if $cutadapt.cutoption == "yes":
             python '$__tool_directory__'/yac.py --input $cutadapt.input
                                                 --output clipped_input.fastq
@@ -21,15 +27,15 @@
                                                 --min $cutadapt.min
                                                 --max $cutadapt.max
                                                 --Nmode $cutadapt.Nmode &&
-        #else
+        #else:
             ln -f -s '$cutadapt.clipped_input' clipped_input.fastq &&
         #end if
-        bowtie-build hairpin.fa hairpin >/dev/null &&
-        bowtie -v $v -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq | samtools sort -O bam -o '$output' 2>&1 &&
+        bowtie-build hairpin.fa hairpin &&
+        bowtie -v $v -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq | samtools sort -O bam -o '$output' &&
         samtools index $output &&
-        python '$__tool_directory__'/mircounts.py -pm --alignment $output --gff $gff3 --quality_threshold 10 --pre_mirs $pre_mir_count_file --mirs $mir_count_file --lattice $coverage_dataframe;
+        python '$__tool_directory__'/mircounts.py --alignment $output --gff $gff3 --quality_threshold 10 --pre_mirs $pre_mir_count_file --mirs $mir_count_file --lattice $coverage_dataframe
         #if $plotting.plottingOption == 'yes':
-            Rscript '$__tool_directory__'/coverage_plotting.R --dataframe $coverage_dataframe --type $plotting.display --output $latticePDF
+            && Rscript '$__tool_directory__'/coverage_plotting.R --dataframe $coverage_dataframe --type $plotting.display --output $latticePDF
         #end if
     ]]></command>
     <inputs>
@@ -141,8 +147,8 @@
             <param name="plottingOption" value="no"/>
             <param name="output_premir_counts" value="True"/>
             <param name="output_mir_counts" value="True"/>
-            <output name="output" file="unclipped.out.22.bam" ftype="bam"/>
-            <output name="gff3" file="translated_dme.22.gff3" ftype="gff3" lines_diff="22"/>
+            <output name="output" file="unclipped.out.22.bam"/>
+            <output name="gff3" file="translated_dme.22.gff3" lines_diff="22"/>
             <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.22.tab"/>
             <output name="mir_count_file" file="mirs_unclipped_count.22.tab"/>
         </test>
@@ -159,8 +165,8 @@
             <param name="plottingOption" value="no"/>
             <param name="output_premir_counts" value="True"/>
             <param name="output_mir_counts" value="True"/>
-            <output name="output" file="unclipped.out.bam" ftype="bam"/>
-            <output name="gff3" file="translated_dme.gff3" ftype="gff3" lines_diff="22"/>
+            <output name="output" file="unclipped.out.bam" />
+            <output name="gff3" file="translated_dme.gff3" lines_diff="22"/>
             <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab"/>
             <output name="mir_count_file" file="mirs_unclipped_count.tab"/>
         </test>
@@ -178,11 +184,11 @@
             <param name="display" value="relative"/>
             <param name="output_premir_counts" value="True"/>
             <param name="output_mir_counts" value="True"/>
-            <output name="output" file="unclipped.out.bam" ftype="bam"/>
-            <output name="gff3" file="translated_dme.gff3" ftype="gff3"  lines_diff="22"/>
+            <output name="output" file="unclipped.out.bam"/>
+            <output name="gff3" file="translated_dme.gff3"  lines_diff="22"/>
             <output name="pre_mir_count_file" file="pre_mirs_unclipped_count.tab"/>
             <output name="mir_count_file" file="mirs_unclipped_count.tab"/>
-            <output name="latticePDF" file="mir_unclipped_coverage.pdf" ftype="pdf"/>
+            <output name="latticePDF" file="mir_unclipped_coverage.pdf"/>
             <output name="coverage_dataframe" file="lattice_unclipped_dataframe.tab"/>
         </test>
         <test>
@@ -195,11 +201,11 @@
             <param name="display" value="absolute"/>
             <param name="output_premir_counts" value="True"/>
             <param name="output_mir_counts" value="True"/>
-            <output name="output" file="clipped.out.bam" ftype="bam"/>
-            <output name="gff3" file="translated_dme.gff3" ftype="gff3"  lines_diff="22"/>
+            <output name="output" file="clipped.out.bam"/>
+            <output name="gff3" file="translated_dme.gff3" lines_diff="22"/>
             <output name="pre_mir_count_file" file="pre_mirs_clipped_count.tab"/>
             <output name="mir_count_file" file="mirs_clipped_count.tab"/>
-            <output name="latticePDF" file="mir_clipped_coverage.pdf" ftype="pdf"/>
+            <output name="latticePDF" file="mir_clipped_coverage.pdf"/>
             <output name="coverage_dataframe" file="lattice_clipped_dataframe.tab"/>
         </test>
     </tests>