Mercurial > repos > artbio > sr_bowtie_dataset_annotation
comparison sr_bowtie_dataset_annotation.xml @ 4:e11f91575af6 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sr_bowtie_dataset_annotation commit 618a7892f6af26278364a75ab23b3c6d8cdc73db
author | artbio |
---|---|
date | Wed, 20 Mar 2019 07:12:53 -0400 |
parents | 008de522b3ea |
children | 279fdd92a615 |
comparison
equal
deleted
inserted
replaced
3:008de522b3ea | 4:e11f91575af6 |
---|---|
1 <tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.1.0"> | 1 <tool id="sr_bowtie_dataset_annotation" name="Annotate smRNA dataset" version="2.2.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> | 5 <requirement type="package" version="1.6.0">r-optparse</requirement> |
6 <requirement type="package" version="2.2.1">r-ggplot2</requirement> | 6 <requirement type="package" version="3.1.0">r-ggplot2</requirement> |
7 <requirement type="package" version="0.4.1">r-scales</requirement> | 7 <requirement type="package" version="0.8.0">r-ggrepel</requirement> |
8 </requirements> | 8 </requirements> |
9 <command detect_errors="exit_code"><![CDATA[ | 9 <command detect_errors="exit_code"><![CDATA[ |
10 #if $refGenomeSource1.genomeSource == "history": | 10 #if $refGenomeSource1.genomeSource == "history": |
11 bowtie-build -f $refGenomeSource1.ownFile genome 1>/dev/null && | 11 bowtie-build -f $refGenomeSource1.ownFile genome 1>/dev/null && |
12 ln -s -f '$refGenomeSource1.ownFile' genome.fa && | |
13 #set index_path = 'genome' | 12 #set index_path = 'genome' |
14 #else: | 13 #else: |
15 #set index_path = $refGenomeSource1.index.fields.path | 14 #set index_path = $refGenomeSource1.index.fields.path |
16 #end if | 15 #end if |
17 #if $input.is_of_type('fasta'): | 16 #set method_prefix = "-v %s -k 1 --best" % str($mismatches) |
17 #if $input[0].is_of_type('fasta'): | |
18 #set format = "-f" | 18 #set format = "-f" |
19 #elif $input.is_of_type('fastq'): | 19 #elif $input[0].is_of_type('fastq'): |
20 #set format = "-q" | 20 #set format = "-q" |
21 #end if | 21 #end if |
22 #if $format == '-f': | 22 |
23 input_nbr_read=\$(( \$(wc -l < $input)/2)) && | 23 #for $file in $input: |
24 #elif $format == '-q': | 24 #set sample=$file.element_identifier |
25 input_nbr_read=\$(( \$(wc -l < $input)/4)) && | |
26 #end if | |
27 #set method_prefix = "-v %s -k 1 --best" % str($mismatches) | |
28 bowtie -p \${GALAXY_SLOTS:-4} | |
29 $method_prefix | |
30 --al matched.fa | |
31 --un unmatched.fa | |
32 --suppress 6,7,8 | |
33 $index_path $format '$input' > tabular_bowtie_output.tab && | |
34 genome_aligned=\$(wc -l < matched.fa) && | |
35 genome_aligned=\$(( \$genome_aligned/2)) && | |
36 #if $refGenomeSource1.genomeSource == "history": | |
37 echo -e "$refGenomeSource1.ownFile.name\t\${genome_aligned}\n" > $output && | |
38 #else: | |
39 echo -e "$refGenomeSource1.index.fields.dbkey\t\${genome_aligned}\n" > $output && | |
40 #end if | |
41 #set counter = 0 | |
42 #for $i in $AdditionalQueries: | |
43 rm -f genome.fa && | |
44 #set $counter += 1 | |
45 #if $counter != 1: | |
46 #set input = "class_unmatched.fa" | |
47 #else: | |
48 #set input = "matched.fa" | |
49 #end if | |
50 touch temp_class_matched.fa temp_class_unmatched.fa && | |
51 bowtie-build -f $i.ownFile genome 1>/dev/null && | |
52 ln -s -f '$i.ownFile' genome.fa && | |
53 #set index_path = 'genome' | |
54 bowtie -p \${GALAXY_SLOTS:-4} | 25 bowtie -p \${GALAXY_SLOTS:-4} |
55 $method_prefix | 26 $method_prefix |
56 --al temp_class_matched.fa | 27 --al matched.fa |
57 --un temp_class_unmatched.fa | 28 --un unmatched.fa |
58 --suppress 6,7,8 | 29 --suppress 6,7,8 |
59 $index_path $format '$input' > tabular_bowtie_output.tab && | 30 $index_path $format $file > tabular_bowtie_output.tab && |
60 class_aligned=\$(( \$(wc -l < temp_class_matched.fa)/2)) && | 31 genome_aligned=\$(wc -l < matched.fa) && |
61 class_unaligned=\$(( \$(wc -l < temp_class_unmatched.fa)/2)) && | 32 genome_aligned=\$(( \$genome_aligned/2)) && |
62 mv temp_class_unmatched.fa class_unmatched.fa && | 33 #set counter = 0 |
63 echo -e "$i.ownFile.name\t\${class_aligned}\n" >> $output && | 34 #for $i in $AdditionalQueries: |
35 #set $counter += 1 | |
36 #if $counter != 1: | |
37 #set to_align = "class_unmatched.fa" | |
38 #else: | |
39 #set to_align = "matched.fa" | |
40 #end if | |
41 bowtie-build -f $i.ownFile subgenome 1>/dev/null && | |
42 touch tmp_class_matched.fa tmp_class_unmatched.fa && | |
43 bowtie -p \${GALAXY_SLOTS:-4} | |
44 $method_prefix | |
45 --al tmp_class_matched.fa | |
46 --un tmp_class_unmatched.fa | |
47 --suppress 6,7,8 | |
48 subgenome $format '$to_align' > tabular_bowtie_output.tab && | |
49 class_aligned=\$(( \$(wc -l < tmp_class_matched.fa)/2)) && | |
50 class_unaligned=\$(( \$(wc -l < tmp_class_unmatched.fa)/2)) && | |
51 echo -e "$sample\t$i.ownFile.name\t\$class_aligned\t\${genome_aligned}" >> $output && | |
52 mv tmp_class_unmatched.fa class_unmatched.fa && | |
53 rm tmp_class_matched.fa && | |
54 #end for | |
55 remaining=\$(( \$(wc -l < class_unmatched.fa)/2)) && | |
56 echo -e "$sample\tNot classified\t\${remaining}\t\${genome_aligned}" >> $output && | |
64 #end for | 57 #end for |
65 remaining=\$(( \$(wc -l < class_unmatched.fa)/2)) && | 58 |
66 echo -e "Not classified\t\${remaining}\n" >> $output && | 59 |
67 Rscript $__tool_directory__/barplot.r --input $output --barplot $barplot | 60 Rscript $__tool_directory__/barplot.r --input $output --barplot $barplot |
68 ]]></command> | 61 ]]></command> |
69 <inputs> | 62 <inputs> |
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"/> | 63 <param name="input" type="data" multiple="True" format="fasta,fastq" label="Input file: reads clipped from their adapter" help="Only with clipped, raw fasta or fastq files"/> |
71 <param name="mismatches" type="select" label="Number of mismatches allowed" help="specify the number of mismatches allowed during alignments"> | 64 <param name="mismatches" type="select" label="Number of mismatches allowed" help="specify the number of mismatches allowed during alignments"> |
72 <option value="0">0</option> | 65 <option value="0">0</option> |
73 <option value="1" selected="true">1</option> | 66 <option value="1" selected="true">1</option> |
74 <option value="2">2</option> | 67 <option value="2">2</option> |
75 <option value="3">3</option> | 68 <option value="3">3</option> |
97 <!-- End of other bowtie index selections --> | 90 <!-- End of other bowtie index selections --> |
98 </inputs> | 91 </inputs> |
99 <outputs> | 92 <outputs> |
100 <data format="tabular" name="output" label="Cascade Annotation Analysis"> | 93 <data format="tabular" name="output" label="Cascade Annotation Analysis"> |
101 <actions> | 94 <actions> |
102 <action name="column_names" type="metadata" default="Reference Index,Number of reads" /> | 95 <action name="column_names" type="metadata" default="Sample,Reference Index,Number of reads, Total reads" /> |
103 </actions> | 96 </actions> |
104 </data> | 97 </data> |
105 <data name="barplot" format="pdf" label="barplot from ${on_string}" /> | 98 <data name="barplot" format="pdf" label="barplot from ${on_string}" /> |
106 </outputs> | 99 </outputs> |
107 <tests> | 100 <tests> |
110 <param name="genomeSource" value="history" /> | 103 <param name="genomeSource" value="history" /> |
111 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> | 104 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> |
112 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> | 105 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> |
113 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> | 106 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> |
114 <output name="output" ftype="tabular" file="sample1_output.tab" /> | 107 <output name="output" ftype="tabular" file="sample1_output.tab" /> |
115 <output name="barplot" ftype="pdf" file="sample1_output.pdf" /> | 108 <output name="barplot" ftype="pdf" file="sample1_output.pdf" compare="sim_size" delta="500"/> |
116 </test> | 109 </test> |
117 <test> | 110 <test> |
118 <param name="input" value ="sample.fastq" ftype="fastq" /> | 111 <param name="input" value ="sample.fastq" ftype="fastq" /> |
119 <param name="genomeSource" value="history" /> | 112 <param name="genomeSource" value="history" /> |
120 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> | 113 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> |
121 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> | 114 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> |
122 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> | 115 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> |
123 <output name="output" ftype="tabular" file="sample_output.tab" /> | 116 <output name="output" ftype="tabular" file="sample_output.tab" /> |
124 <output name="barplot" ftype="pdf" file="sample_output.pdf" /> | 117 <output name="barplot" ftype="pdf" file="sample_output.pdf" compare="sim_size" delta="500"/> |
118 </test> | |
119 <test> | |
120 <param name="input" value ="sample5.fa,sample4.fa,sample3.fa,sample2.fa,sample1.fa" ftype="fasta" /> | |
121 <param name="genomeSource" value="history" /> | |
122 <param name="ownFile" value ="2L-tail.fa" ftype="fasta" /> | |
123 <param name="AdditionalQueries_0|ownFile" value="dme_miR21_hairpin.fa" ftype="fasta" /> | |
124 <param name="AdditionalQueries_1|ownFile" value="Ensembl_transposon_set.fa" ftype="fasta" /> | |
125 <output name="output" ftype="tabular" file="multisample5_output.tab" /> | |
126 <output name="barplot" ftype="pdf" file="multisample5_output.pdf" compare="sim_size" delta="500" /> | |
125 </test> | 127 </test> |
126 </tests> | 128 </tests> |
127 <help> | 129 <help> |
128 | 130 |
129 **Introduction** | 131 **Introduction** |