comparison confindr.xml @ 0:619d56f369af

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