comparison confindr.xml @ 0:4576b4dc9344 tip

"ConFindr initial commit"
author jpayne
date Thu, 24 Sep 2020 13:39:12 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4576b4dc9344
1 <tool id="confindr" name="ConFindr" version="0.1.0">
2 <requirements>
3 <requirement type="package" version="0.7.4">confindr</requirement>
4 </requirements>
5 <command detect_errors="exit_code"><![CDATA[
6 ## Copy and optionally uncompress reads ##
7 #if $reads.reads_select == 'collection'
8 #set forward=$reads.coll.forward
9 #set reverse=$reads.coll.reverse
10 #set name=$reads.coll.name.replace(' ', '_')
11 #else
12 #set name=$forward.name.split('_')[0]
13 #end if
14 mkdir ./${name}
15 #if $forward.is_of_type("fastq.gz","fastqsanger.gz")
16 && cp $forward ./${name}/${name}_R1.fastq.gz
17 #else if $forward.is_of_type("fastq.bz2", "fastqsanger.bz2")
18 && tar -vxjOf $forward > ./${name}/${name}_R1.fastq
19 #else
20 && cp $forward ./${name}/${name}_R1.fastq
21 #end if
22 #if $reverse.is_of_type("fastq.gz","fastqsanger.gz")
23 && cp $reverse ./${name}/${name}_R2.fastq.gz
24 #else if $reverse.is_of_type("fastq.bz2", "fastqsanger.bz2")
25 && tar -vxjOf $reverse > ./${name}/${name}_R2.fastq
26 #else
27 && cp $reverse ./${name}/${name}_R2.fastq
28 #end if
29 ## !!! confindr in single-threaded mode; race condition bugs in multiple threads !!! ##
30 && confindr.py -i ./${name} -o ./output -t 1
31 && cat ./output/confindr_log.txt
32 && ls -lah ./output/confindr_report.csv
33
34 ]]></command>
35 <inputs>
36 <conditional name="reads">
37 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
38 <option value="collection">Paired collection from your history</option>
39 <option value="history">Two FASTQ datasets from your history</option>
40 </param>
41 <when value="collection">
42 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="paired" />
43 </when>
44 <when value="history">
45 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
46 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
47 </when>
48 </conditional>
49 </inputs>
50 <outputs>
51 <data format="csv" name="contam_report" label="Contamination Report" from_work_dir="./output/confindr_report.csv" />
52 </outputs>
53 <tests>
54 <test>
55 <param name="reads_select" value="collection" />
56 <param name="coll">
57 <collection type="paired">
58 <element name="forward" value="example_R1.fastq.gz" ftype="fastqsanger.gz" />
59 <element name="reverse" value="example_R2.fastq.gz" ftype="fastqsanger.gz" />
60 </collection>
61 </param>
62 <output name="contam_report" value="confindr_report.csv" />
63 </test>
64 <test>
65 <param name="reads_select" value="history" />
66 <param name="forward" value="example_R1.fastq.gz" ftype="fastqsanger.gz"/>
67 <param name="reverse" value="example_R2.fastq.gz" ftype="fastqsanger.gz"/>
68 <output name="contam_report" value="confindr_report_2.csv" />
69 </test>
70 <test>
71 <param name="reads_select" value="history" />
72 <param name="forward" value="example_R1.fastq.bz2" ftype="fastqsanger.bz2"/>
73 <param name="reverse" value="example_R2.fastq.bz2" ftype="fastqsanger.bz2"/>
74 <output name="contam_report" value="confindr_report_2.csv" />
75 </test>
76 </tests>
77 <help><![CDATA[
78 ConFindr, a contamination screen for Illumina sequencing
79 ]]></help>
80 <citations>
81 <citation type="doi">10.7717/peerj.6995</citation>
82 <citation type="bibtex">
83 @misc{githubConFindr,
84 author = {LastTODO, FirstTODO},
85 year = {TODO},
86 title = {ConFindr},
87 publisher = {GitHub},
88 journal = {GitHub repository},
89 url = {https://github.com/OLC-Bioinformatics/ConFindr},
90 }</citation>
91 </citations>
92 </tool>