comparison sr_bowtie_dataset_annotation.xml @ 3:008de522b3ea draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sr_bowtie_dataset_annotation commit 53e9bab2c20411f34ac09688de2f2cc8ae8c46a4
author artbio
date Sun, 10 Feb 2019 18:31:51 -0500
parents 243ed53cbc0d
children e11f91575af6
comparison
equal deleted inserted replaced
2:243ed53cbc0d 3:008de522b3ea
1 <tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.0.2"> 1 <tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.1.0">
2 <description>by iterative alignments with sRbowtie</description> 2 <description>by iterative alignments with sRbowtie</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="1.1.2">bowtie</requirement> 4 <requirement type="package" version="1.1.2">bowtie</requirement>
5 <requirement type="package" version="1.3.2">r-optparse</requirement>
6 <requirement type="package" version="2.2.1">r-ggplot2</requirement>
7 <requirement type="package" version="0.4.1">r-scales</requirement>
5 </requirements> 8 </requirements>
6 <command detect_errors="exit_code"><![CDATA[ 9 <command detect_errors="exit_code"><![CDATA[
7 #if $refGenomeSource1.genomeSource == "history": 10 #if $refGenomeSource1.genomeSource == "history":
8 bowtie-build -f $refGenomeSource1.ownFile genome 1>/dev/null && 11 bowtie-build -f $refGenomeSource1.ownFile genome 1>/dev/null &&
9 ln -s -f '$refGenomeSource1.ownFile' genome.fa && 12 ln -s -f '$refGenomeSource1.ownFile' genome.fa &&
10 #set index_path = 'genome' 13 #set index_path = 'genome'
11 #else: 14 #else:
12 #set index_path = $refGenomeSource1.index.fields.path 15 #set index_path = $refGenomeSource1.index.fields.path
13 #end if 16 #end if
14 #if $input.extension == "fasta": 17 #if $input.is_of_type('fasta'):
15 #set format = "-f" 18 #set format = "-f"
16 #elif $input.extension == "fastq": 19 #elif $input.is_of_type('fastq'):
17 #set format = "-q" 20 #set format = "-q"
18 #end if 21 #end if
19 #if $format == '-f': 22 #if $format == '-f':
20 input_nbr_read=\$(( \$(wc -l < $input)/2)) && 23 input_nbr_read=\$(( \$(wc -l < $input)/2)) &&
21 #elif $format == '-q': 24 #elif $format == '-q':
58 class_unaligned=\$(( \$(wc -l < temp_class_unmatched.fa)/2)) && 61 class_unaligned=\$(( \$(wc -l < temp_class_unmatched.fa)/2)) &&
59 mv temp_class_unmatched.fa class_unmatched.fa && 62 mv temp_class_unmatched.fa class_unmatched.fa &&
60 echo -e "$i.ownFile.name\t\${class_aligned}\n" >> $output && 63 echo -e "$i.ownFile.name\t\${class_aligned}\n" >> $output &&
61 #end for 64 #end for
62 remaining=\$(( \$(wc -l < class_unmatched.fa)/2)) && 65 remaining=\$(( \$(wc -l < class_unmatched.fa)/2)) &&
63 echo -e "Unmatched to previous indexes\t\${remaining}\n" >> $output 66 echo -e "Not classified\t\${remaining}\n" >> $output &&
67 Rscript $__tool_directory__/barplot.r --input $output --barplot $barplot
64 ]]></command> 68 ]]></command>
65 <inputs> 69 <inputs>
66 <param name="input" type="data" format="fasta,fastq" label="Input file: reads clipped from their adapter" help="Only with clipped, raw fasta or fastq files"/> 70 <param name="input" type="data" format="fasta,fastq" label="Input file: reads clipped from their adapter" help="Only with clipped, raw fasta or fastq files"/>
67 <param name="mismatches" type="select" label="Number of mismatches allowed" help="specify the number of mismatches allowed during alignments"> 71 <param name="mismatches" type="select" label="Number of mismatches allowed" help="specify the number of mismatches allowed during alignments">
68 <option value="0">0</option> 72 <option value="0">0</option>
91 <param name="ownFile" type="data" format="fasta" label="Select a fasta file, to serve as index reference" /> 95 <param name="ownFile" type="data" format="fasta" label="Select a fasta file, to serve as index reference" />
92 </repeat> 96 </repeat>
93 <!-- End of other bowtie index selections --> 97 <!-- End of other bowtie index selections -->
94 </inputs> 98 </inputs>
95 <outputs> 99 <outputs>
96 <data format="tabular" name="output" label="Cascade Annotation Analysis"> 100 <data format="tabular" name="output" label="Cascade Annotation Analysis">
97 <actions> 101 <actions>
98 <action name="column_names" type="metadata" default="Reference Index,Number of reads" /> 102 <action name="column_names" type="metadata" default="Reference Index,Number of reads" />
99 </actions> 103 </actions>
100 </data> 104 </data>
101 </outputs> 105 <data name="barplot" format="pdf" label="barplot from ${on_string}" />
106 </outputs>
102 <tests> 107 <tests>
103 <test> 108 <test>
104 <param name="input" value ="sample1.fa" ftype="fasta" /> 109 <param name="input" value ="sample1.fa" ftype="fasta" />
105 <param name="genomeSource" value="history" /> 110 <param name="genomeSource" value="history" />
106 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> 111 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" />
107 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> 112 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" />
108 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> 113 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" />
109 <output name="output" ftype="tabular" file="sample1_output.tab" /> 114 <output name="output" ftype="tabular" file="sample1_output.tab" />
115 <output name="barplot" ftype="pdf" file="sample1_output.pdf" />
110 </test> 116 </test>
111 <test> 117 <test>
112 <param name="input" value ="sample.fastq" ftype="fastq" /> 118 <param name="input" value ="sample.fastq" ftype="fastq" />
113 <param name="genomeSource" value="history" /> 119 <param name="genomeSource" value="history" />
114 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> 120 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" />
115 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> 121 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" />
116 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> 122 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" />
117 <output name="output" ftype="tabular" file="sample_output.tab" /> 123 <output name="output" ftype="tabular" file="sample_output.tab" />
124 <output name="barplot" ftype="pdf" file="sample_output.pdf" />
118 </test> 125 </test>
119 </tests> 126 </tests>
120 <help> 127 <help>
121 128
122 **Introduction** 129 **Introduction**