0
|
1 <tool id="nanostat" name="NanoStat" version="0.1.0">
|
|
2 <description>
|
|
3 Calculate various statistics from a long read sequencing dataset in fastq, bam or albacore sequencing summary format
|
|
4 </description>
|
|
5 <requirements>
|
|
6 <requirement type="package" version="1.1.2">nanostat</requirement>
|
|
7 </requirements>
|
|
8 <command detect_errors="exit_code"><![CDATA[
|
|
9 #import re
|
|
10 ## Galaxy creates xyz.dat but nanostat relies on suffix to detect compressed fasta/fastq; otoh Galaxy provides 'element_identifier'
|
|
11 #if str($input_type.type) == "fastq" or str($input_type.type) == "fasta"
|
|
12 #set $named_input_files = ''
|
1
|
13 #for $counter, $i_file in enumerate($input_type.file):
|
|
14 #if $i_file.is_of_type('fastqsanger', 'fastq'):
|
|
15 #set $ext = 'fastq'
|
|
16 #elif $i_file.is_of_type('fastqsanger.gz', 'fastq.gz'):
|
|
17 #set $ext = 'fastq.gz'
|
|
18 #elif $i_file.is_of_type('fastqsanger.bz2', 'fastq.bz2'):
|
|
19 #set $ext = 'fastq.bz2'
|
|
20 #elif $i_file.is_of_type('fasta'):
|
|
21 #set $ext = 'fasta'
|
|
22 #elif $i_file.is_of_type('fasta.gz'):
|
|
23 #set $ext = 'fasta.gz'
|
|
24 #elif $i_file.is_of_type('fasta.bz2'):
|
|
25 #set $ext = 'fasta.bz2'
|
|
26 #end if
|
|
27 #set $_input_file = "./input_" + str($counter) + "." + $ext
|
0
|
28 #set $named_input_files = $named_input_files + ' ' + $_input_file
|
|
29 ln -s '${i_file}' ${_input_file} &&
|
|
30 #end for
|
|
31 #end if
|
|
32 #### alternative would be something like: x=`file o.xyz.gz; if [[ $x == *gzip* ]]; then echo "found gzip"; fi
|
|
33
|
|
34 NanoStat
|
|
35 --threads \${GALAXY_SLOTS:-4}
|
|
36 #if str($input_type.type) == "fastq"
|
|
37 --fastq ${named_input_files}
|
|
38 #else if str($input_type.type) == "fasta"
|
|
39 --fasta "${named_input_files}"
|
|
40 #else if str($input_type.type) == "bam"
|
|
41 --bam "${input_type.file}"
|
|
42 #else if str($input_type.type) == "summary"
|
|
43 --readtype "${input_type.readtype}"
|
|
44 --summary "${input_type.file}"
|
|
45 #if $input_type.barcoded
|
|
46 --barcoded
|
|
47 #end if
|
|
48 #end if
|
|
49 -n "$output1"
|
|
50 ]]></command>
|
|
51 <inputs>
|
|
52 <conditional name="input_type">
|
|
53 <param name="type" type="select" label="File type of input read files" help="It is not possible to mix distinct file types.">
|
|
54 <option value="fastq" selected="true">fastq (compressed or not)</option>
|
|
55 <option value="fasta">fasta (compressed or not)</option>
|
|
56 <option value="bam">sorted bam</option>
|
|
57 <option value="summary">Use albacore or guppy summary file for quality scores</option>
|
|
58 </param>
|
|
59 <when value="fastq">
|
1
|
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
|
61 </when>
|
|
62 <when value="fasta">
|
1
|
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
|
64 </when>
|
|
65 <when value="bam">
|
1
|
66 <param type="data" multiple="true" name="file" format="bam" label="One or more sorted bam file(s)." optional="true"/>
|
0
|
67 </when>
|
|
68 <when value="summary">
|
1
|
69 <param type="data" multiple="true" name="file" format="tabular" label="Summary file generated by albacore or guppy." optional="true"/>
|
0
|
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"/>
|
|
71 <param name="readtype" argument="--readtype" type="select" label="Which read type to extract information about from summary?">
|
|
72 <option value="1D" selected="true">1D</option>
|
|
73 <option value="2D">2D</option>
|
|
74 <option value="1D2">1D2</option>
|
|
75 </param>
|
|
76 </when>
|
|
77 </conditional>
|
|
78
|
|
79 </inputs>
|
|
80 <outputs>
|
|
81 <data name="output1" format="tabular" />
|
|
82 </outputs>
|
|
83 <tests>
|
|
84 <test>
|
|
85 <param name="type" value="fastq"/>
|
|
86 <param name="file" value="input_1.fq.gz,input_2.fq.bz2"/>
|
|
87 <output name="output1" file="out.txt"/>
|
|
88 </test>
|
|
89 </tests>
|
|
90 <help><![CDATA[
|
|
91 usage: NanoStat [-h] [-v] [-o OUTDIR] [-p PREFIX] [-n NAME] [-t N]
|
|
92 [--barcoded] [--readtype {1D,2D,1D2}]
|
|
93 (--fastq file [file ...] | --fasta file [file ...] | --summary file [file ...] | --bam file [file ...])
|
|
94
|
|
95 Calculate statistics of long read sequencing dataset.
|
|
96
|
|
97 EXAMPLE usage:
|
|
98 NanoStat --fastq reads.fastq.gz --outdir statreports
|
|
99
|
|
100 ]]> </help>
|
|
101 <citations>
|
|
102 <citation type="bibtex">
|
|
103 @misc{githubnanostat,
|
|
104 url = {https://github.com/wdecoster/nanostat}
|
|
105 }
|
|
106 @article{10.1093/bioinformatics/bty149,
|
|
107 author = {De Coster, Wouter and D’Hert, Svenn and Schultz, Darrin T and Cruts, Marc and Van Broeckhoven, Christine},
|
|
108 title = "{NanoPack: visualizing and processing long-read sequencing data}",
|
|
109 journal = {Bioinformatics},
|
|
110 volume = {34},
|
|
111 number = {15},
|
|
112 pages = {2666-2669},
|
|
113 year = {2018},
|
|
114 month = {03},
|
|
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.}",
|
|
116 issn = {1367-4803},
|
|
117 doi = {10.1093/bioinformatics/bty149},
|
|
118 url = {https://doi.org/10.1093/bioinformatics/bty149},
|
|
119 eprint = {http://oup.prod.sis.lan/bioinformatics/article-pdf/34/15/2666/25230836/bty149.pdf}
|
|
120 }
|
|
121 </citation>
|
|
122 </citations>
|
|
123 </tool>
|