annotate nanostat.xml @ 1:845458a694e0 draft default tip

planemo upload
author leomrtns
date Fri, 17 May 2019 09:23:59 -0400
parents e86d1c122ee7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
1 <tool id="nanostat" name="NanoStat" version="0.1.0">
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
2 <description>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
3 Calculate various statistics from a long read sequencing dataset in fastq, bam or albacore sequencing summary format
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
4 </description>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
5 <requirements>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
6 <requirement type="package" version="1.1.2">nanostat</requirement>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
7 </requirements>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
8 <command detect_errors="exit_code"><![CDATA[
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
9 #import re
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
10 ## Galaxy creates xyz.dat but nanostat relies on suffix to detect compressed fasta/fastq; otoh Galaxy provides 'element_identifier'
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
11 #if str($input_type.type) == "fastq" or str($input_type.type) == "fasta"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
12 #set $named_input_files = ''
1
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
13 #for $counter, $i_file in enumerate($input_type.file):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
14 #if $i_file.is_of_type('fastqsanger', 'fastq'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
15 #set $ext = 'fastq'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
16 #elif $i_file.is_of_type('fastqsanger.gz', 'fastq.gz'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
17 #set $ext = 'fastq.gz'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
18 #elif $i_file.is_of_type('fastqsanger.bz2', 'fastq.bz2'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
19 #set $ext = 'fastq.bz2'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
20 #elif $i_file.is_of_type('fasta'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
21 #set $ext = 'fasta'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
22 #elif $i_file.is_of_type('fasta.gz'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
23 #set $ext = 'fasta.gz'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
24 #elif $i_file.is_of_type('fasta.bz2'):
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
25 #set $ext = 'fasta.bz2'
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
26 #end if
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
27 #set $_input_file = "./input_" + str($counter) + "." + $ext
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
28 #set $named_input_files = $named_input_files + ' ' + $_input_file
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
29 ln -s '${i_file}' ${_input_file} &&
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
30 #end for
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
31 #end if
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
32 #### alternative would be something like: x=`file o.xyz.gz; if [[ $x == *gzip* ]]; then echo "found gzip"; fi
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
33
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
34 NanoStat
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
35 --threads \${GALAXY_SLOTS:-4}
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
36 #if str($input_type.type) == "fastq"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
37 --fastq ${named_input_files}
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
38 #else if str($input_type.type) == "fasta"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
39 --fasta "${named_input_files}"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
40 #else if str($input_type.type) == "bam"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
41 --bam "${input_type.file}"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
42 #else if str($input_type.type) == "summary"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
43 --readtype "${input_type.readtype}"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
44 --summary "${input_type.file}"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
45 #if $input_type.barcoded
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
46 --barcoded
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
47 #end if
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
48 #end if
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
49 -n "$output1"
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
50 ]]></command>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
51 <inputs>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
52 <conditional name="input_type">
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
53 <param name="type" type="select" label="File type of input read files" help="It is not possible to mix distinct file types.">
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
54 <option value="fastq" selected="true">fastq (compressed or not)</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
55 <option value="fasta">fasta (compressed or not)</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
56 <option value="bam">sorted bam</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
57 <option value="summary">Use albacore or guppy summary file for quality scores</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
58 </param>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
59 <when value="fastq">
1
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
60 <param type="data" multiple="true" name="file" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2, fastqsanger.bgz" label="One or more (compressed) fastq file(s)." optional="true"/>
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
61 </when>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
62 <when value="fasta">
1
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
63 <param type="data" multiple="true" name="file" format="fasta, fasta.gz, fasta.bz2, fasta.bgz" label="One or more (compressed) fasta file(s)." optional="true"/>
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
64 </when>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
65 <when value="bam">
1
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
66 <param type="data" multiple="true" name="file" format="bam" label="One or more sorted bam file(s)." optional="true"/>
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
67 </when>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
68 <when value="summary">
1
845458a694e0 planemo upload
leomrtns
parents: 0
diff changeset
69 <param type="data" multiple="true" name="file" format="tabular" label="Summary file generated by albacore or guppy." optional="true"/>
0
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
70 <param name="barcoded" argument="--barcoded" type="boolean" truevalue="--barcode" falsevalue="" checked="false" label="Do you want to split the summary file by barcode?" help="Default:No"/>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
71 <param name="readtype" argument="--readtype" type="select" label="Which read type to extract information about from summary?">
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
72 <option value="1D" selected="true">1D</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
73 <option value="2D">2D</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
74 <option value="1D2">1D2</option>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
75 </param>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
76 </when>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
77 </conditional>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
78
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
79 </inputs>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
80 <outputs>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
81 <data name="output1" format="tabular" />
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
82 </outputs>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
83 <tests>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
84 <test>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
85 <param name="type" value="fastq"/>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
86 <param name="file" value="input_1.fq.gz,input_2.fq.bz2"/>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
87 <output name="output1" file="out.txt"/>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
88 </test>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
89 </tests>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
90 <help><![CDATA[
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
91 usage: NanoStat [-h] [-v] [-o OUTDIR] [-p PREFIX] [-n NAME] [-t N]
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
92 [--barcoded] [--readtype {1D,2D,1D2}]
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
93 (--fastq file [file ...] | --fasta file [file ...] | --summary file [file ...] | --bam file [file ...])
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
94
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
95 Calculate statistics of long read sequencing dataset.
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
96
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
97 EXAMPLE usage:
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
98 NanoStat --fastq reads.fastq.gz --outdir statreports
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
99
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
100 ]]> </help>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
101 <citations>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
102 <citation type="bibtex">
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
103 @misc{githubnanostat,
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
104 url = {https://github.com/wdecoster/nanostat}
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
105 }
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
106 @article{10.1093/bioinformatics/bty149,
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
107 author = {De Coster, Wouter and D’Hert, Svenn and Schultz, Darrin T and Cruts, Marc and Van Broeckhoven, Christine},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
108 title = "{NanoPack: visualizing and processing long-read sequencing data}",
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
109 journal = {Bioinformatics},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
110 volume = {34},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
111 number = {15},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
112 pages = {2666-2669},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
113 year = {2018},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
114 month = {03},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
115 abstract = "{Here we describe NanoPack, a set of tools developed for visualization and processing of long-read sequencing data from Oxford Nanopore Technologies and Pacific Biosciences.The NanoPack tools are written in Python3 and released under the GNU GPL3.0 License. The source code can be found at https://github.com/wdecoster/nanopack, together with links to separate scripts and their documentation. The scripts are compatible with Linux, Mac OS and the MS Windows 10 subsystem for Linux and are available as a graphical user interface, a web service at http://nanoplot.bioinf.be and command line tools.Supplementary data are available at Bioinformatics online.}",
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
116 issn = {1367-4803},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
117 doi = {10.1093/bioinformatics/bty149},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
118 url = {https://doi.org/10.1093/bioinformatics/bty149},
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
119 eprint = {http://oup.prod.sis.lan/bioinformatics/article-pdf/34/15/2666/25230836/bty149.pdf}
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
120 }
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
121 </citation>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
122 </citations>
e86d1c122ee7 initial upload
leomrtns
parents:
diff changeset
123 </tool>