annotate confindr.xml @ 0:619d56f369af

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