Mercurial > repos > artbio > mircounts
comparison mircounts.xml.back @ 0:10f0e4c00b13 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit 3a6181bd181729f642b75c4e689f063fc2821cf1
author | artbio |
---|---|
date | Tue, 18 Jul 2017 06:30:40 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:10f0e4c00b13 |
---|---|
1 <tool id="miRCounts" name="miRCounts" version="0.1"> | |
2 <description> Counts miRNA alignments from small RNA sequence data</description> | |
3 <requirements> | |
4 <requirement type="package" version="1.2">bowtie</requirement> | |
5 <requirement type="package" version="1.4.1">samtools</requirement> | |
6 <requirement type="package" version="0.11.2.1=py27_0">pysam</requirement> | |
7 </requirements> | |
8 <command detect_errors="exit_code"><![CDATA[ | |
9 ## To be refactored with guidelines in https://github.com/ARTbio/tools-artbio/issues/140 | |
10 wget ftp://mirbase.org/pub/mirbase/CURRENT/genomes/${genomeKey}.gff3 && ## download gff3 specified by the variable genomeKey | |
11 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". | |
12 wget ftp://mirbase.org/pub/mirbase/CURRENT/hairpin.fa.gz && | |
13 sh '$__tool_directory__'/format_fasta_hairpins.sh $genomeKey && | |
14 #if $cutadapt.cutoption == "yes": | |
15 python '$__tool_directory__'/yac.py --input $cutadapt.input | |
16 --output clipped_input.fastq | |
17 --output_format fastq | |
18 --adapter_to_clip $cutadapt.clip_source.clip_sequence | |
19 --min $cutadapt.min | |
20 --max $cutadapt.max | |
21 --Nmode $cutadapt.Nmode && | |
22 #else | |
23 ln -f -s '$cutadapt.clipped_input' clipped_input.fastq && | |
24 #end if | |
25 bowtie-build hairpin.fa hairpin && | |
26 bowtie -v $v -M 1 --best --strata --norc -p \${GALAXY_SLOTS:-4} --sam hairpin -q clipped_input.fastq 2>/dev/null | samtools sort -O bam -o '$output' | |
27 ##samtools view -bS output.sam -o output.bam && | |
28 ##samtools sort output.bam output.sorted && | |
29 ##samtools index output.sorted && | |
30 ## mv output.sorted.bam $output | |
31 ## bowtie parse : | |
32 ## Be careful: | |
33 ## Bam: 0-based; SAM: 1-based; GFF: 1-based | |
34 ## end refactoring | |
35 ]]></command> | |
36 <inputs> | |
37 <conditional name="cutadapt"> | |
38 <param label="Remove adapter sequence before aligning" name="cutoption" type="select"> | |
39 <option value="no">no</option> | |
40 <option selected="True" value="yes">yes</option> | |
41 </param> | |
42 <when value="yes"> | |
43 <param format="fastq" label="Source file" name="input" type="data" /> | |
44 <param label="min size" name="min" size="4" type="integer" value="15" /> | |
45 <param label="max size" name="max" size="4" type="integer" value="36" /> | |
46 <param label="Accept reads containing N?" name="Nmode" type="select"> | |
47 <option selected="True" value="accept">accept</option> | |
48 <option value="reject">reject</option> | |
49 </param> | |
50 <conditional name="clip_source"> | |
51 <param help="Built-in adapters or User-provided" label="Source" name="clip_source_list" type="select"> | |
52 <option selected="True" value="prebuilt">Use a built-in adapter (select from the list below)</option> | |
53 <option value="user">Use custom sequence</option> | |
54 </param> | |
55 <when value="prebuilt"> | |
56 <param help="if your adapter is not listed, input your own sequence" label="Select Adapter to clip" name="clip_sequence" type="select"> | |
57 <option value="TCGTATGCCGTCTTCTGCTTG">Solexa TCGTATGCCGTCTTCTGCTTG</option> | |
58 <option value="ATCTCGTATGCCGTCTTCTGCTT">Illumina ATCTCGTATGCCGTCTTCTGCTT</option> | |
59 <option selected="True" value="TGGAATTCTCGGGTGCCAAG">Illumina TruSeq TGGAATTCTCGGGTGCCAAG</option> | |
60 <option value="CTGTAGGCACCATCAATCGT">IdT CTGTAGGCACCATCAATCGT</option> | |
61 </param> | |
62 </when> | |
63 <when value="user"> | |
64 <param label="Enter your Sequence" name="clip_sequence" size="35" type="text" value="GAATCC" /> | |
65 </when> | |
66 </conditional> | |
67 </when> | |
68 <when value="no"> | |
69 <param label="Select fastq files to align" name="clipped_input" type="data" format="fastq,fastqsanger" help="Note that sequences reads must be clipped from their adapter" /> | |
70 </when> | |
71 </conditional> | |
72 <param name="genomeKey" type="select" label="Choose Organism"> | |
73 <options from_data_table="miRbase_GenomeKeys"> | |
74 <column name="name" index="1"/> | |
75 <column name="value" index="0"/> | |
76 </options> | |
77 </param> | |
78 <param help="command [ bowtie -v 0,1,2,3 -M 1 --best --strata --norc ] will be used. Specify a value for -v (number of mismatches allowed)" label="Number of mismatches allowed" name="v" type="select"> | |
79 <option value="0">0</option> | |
80 <option selected="true" value="1">1</option> | |
81 <option value="2">2</option> | |
82 <option value="3">3</option> | |
83 </param> | |
84 </inputs> | |
85 <outputs> | |
86 <data format="bam" label="bam alignment" name="output" /> | |
87 <data format="gff3" label="GFF3 generated by miRCounts" name="gff3"/> | |
88 <!-- | |
89 <data format="tabular" label="Premirs Count Lists" name="output1" /> | |
90 <data format="tabular" label="Mature Mirs Count Lists" name="output2" /> | |
91 <data format="tabular" label="Lattice Dataframe" name="lattice_dataframe"> | |
92 <filter>plotting['plottingOption'] == "yes"</filter> | |
93 </data> | |
94 <data format="pdf" label="Mir coverage" name="latticePDF"> | |
95 <filter>plotting['plottingOption'] == "yes"</filter> | |
96 </data> | |
97 --> | |
98 </outputs> | |
99 <tests> | |
100 <test> | |
101 <param name="cutoption" value="yes" /> | |
102 <param name="min" value="15"/> | |
103 <param name="max" value="25"/> | |
104 <param name="Nmode" value="reject"/> | |
105 <param name="clip_sequence" value="TCGTATGCCGTCTTCTGCTTG"/> | |
106 <param name="v" value="0"/> | |
107 <param name="genomeKey" value="dme"/> | |
108 <param name="input" value="input.unclipped.fastqsanger" ftype="fastqsanger"/> | |
109 <output name="output" file="unclipped.out.bam" ftype="bam"/> | |
110 <output name="gff3" file="translated_dme.gff3" ftype="gff3"/> | |
111 </test> | |
112 <test> | |
113 <param name="cutoption" value="no" /> | |
114 <param name="v" value="1"/> | |
115 <param name="genomeKey" value="dme"/> | |
116 <param name="clipped_input" value="input.clipped.fastqsanger" ftype="fastqsanger"/> | |
117 <output name="output" file="clipped.out.bam" ftype="bam"/> | |
118 <output name="gff3" file="translated_dme.gff3" ftype="gff3"/> | |
119 </test> | |
120 </tests> | |
121 <!-- | |
122 <configfiles> | |
123 <configfile name="plotCode"> | |
124 #if $plotting.plottingOption == "yes": | |
125 graph_type = "${plotting.display}" ## "relative" or "absolute" | |
126 ## Setup R error handling to go to stderr | |
127 options( show.error.messages=F, | |
128 error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) | |
129 library(lattice) | |
130 coverage = read.delim("${lattice_dataframe}", header=T) | |
131 Numb_of_biosamples = length(levels(coverage\$sample)) | |
132 if (graph_type=="relative") { | |
133 graph = xyplot(countsNorm~offsetNorm | mir, data=coverage, groups=polarity, col=c("red", "blue"), type="l", lwd=1, | |
134 scales=list(x=list(cex=.5), y=list(cex=.5)), par.strip.text=list(cex=.5), strip=strip.custom(which.given=1, bg="lightblue"), layout=c(Numb_of_biosamples,15), as.table=TRUE, main="miRNA coverage maps") | |
135 } else { | |
136 graph = xyplot(counts~offset | mir, data=coverage, groups=polarity, col=c("red", "blue"), type="l", lwd=1, | |
137 scales=list(x=list(cex=.5), y=list(cex=.5)), par.strip.text=list(cex=.5), strip=strip.custom(which.given=1, bg="lightblue"), layout=c(Numb_of_biosamples,15), as.table=TRUE, main="miRNA coverage maps") | |
138 } | |
139 ## pdf output | |
140 pdf(file="${latticePDF}", paper="special", height=11.69, width=8.2677) | |
141 plot(graph, newpage = T) | |
142 dev.off() | |
143 #end if | |
144 </configfile> | |
145 </configfiles> | |
146 --> | |
147 <help> | |
148 | |
149 **What it does** | |
150 | |
151 This tool uses a species-specific GFF3 file from mirBase_ to guide the parsing of an alignment file produced with the sRbowtie tool. | |
152 | |
153 .. _mirBase: ftp://mirbase.org/pub/mirbase/CURRENT/genomes/ | |
154 | |
155 ------ | |
156 | |
157 .. class:: warningmark | |
158 | |
159 the Guide GFF3 file must be in the following format: | |
160 | |
161 2L . miRNA_primary_transcript 243035 243141 . - . ID=MI0005821;Alias=MI0005821;Name=dme-mir-965 | |
162 | |
163 2L . miRNA 243055 243076 . - . ID=MIMAT0005480;Alias=MIMAT0005480;Name=dme-miR-965-3p;Derives_from=MI0005821 | |
164 | |
165 2L . miRNA 243096 243118 . - . ID=MIMAT0020861;Alias=MIMAT0020861;Name=dme-miR-965-5p;Derives_from=MI0005821 | |
166 | |
167 2L . miRNA_primary_transcript 857542 857632 . + . ID=MI0005813;Alias=MI0005813;Name=dme-mir-375 | |
168 | |
169 2L . miRNA 857596 857617 . + . ID=MIMAT0005472;Alias=MIMAT0005472;Name=dme-miR-375-3p;Derives_from=MI0005813 | |
170 | |
171 2L . miRNA 857556 857579 . + . ID=MIMAT0020853;Alias=MIMAT0020853;Name=dme-miR-375-5p;Derives_from=MI0005813 | |
172 | |
173 2L . miRNA_primary_transcript 1831685 1831799 . - . ID=MI0011290;Alias=MI0011290;Name=dme-mir-2280 | |
174 | |
175 With name for mature miRNA (3rd column = miRNA) containing either the -3p or -5p string in the attribute Name (Name=dme-miR-965-3p, for instance) | |
176 | |
177 ------ | |
178 | |
179 **Input formats** | |
180 | |
181 1. One or sereral alignment files generated with sRbowtie tool and **renamed** according to the name of the biosample (avoid spaces in biosample labels) | |
182 | |
183 .. class:: warningmark | |
184 | |
185 Alignment datasets generated with sRbowtie must be renamed according to a biosample name | |
186 | |
187 2. A GFF3 file retrieved from mirBase_ | |
188 | |
189 ------ | |
190 | |
191 **Outputs** | |
192 | |
193 Two count list files for counts of reads aligned to pre-mir or mature miRNA | |
194 | |
195 A pdf of pre-mir coverages. Red coverages indicate that the mir gene is in the genomic up strand, blue coverages indicate that the mir gene is in the genomic down strand. | |
196 | |
197 </help> | |
198 </tool> |