comparison confil.xml @ 4:eaf51f9aff10 draft

planemo upload for repository https://github.com/COMBAT-TB/confil commit 9e5284a2616de5d869319f9c4436716a3f6656f8-dirty
author sanbi-uwc
date Mon, 04 Mar 2019 03:28:57 -0500
parents 53a61865e86e
children a7b05dd0087d
comparison
equal deleted inserted replaced
3:53a61865e86e 4:eaf51f9aff10
1 <tool id="confil" name="Contamination Filter (confil)" version="0.1.0"> 1 <tool id="confil" name="Contamination Filter (confil)" version="0.1.2">
2 <requirements> 2 <requirements>
3 <requirement type="package" version="7.0">click</requirement> 3 <requirement type="package" version="7.0">click</requirement>
4 </requirements> 4 </requirements>
5 <command detect_errors="exit_code"><![CDATA[ 5 <command detect_errors="exit_code"><![CDATA[
6 #set $input_type = $input_type_conditional.input_type 6 #set $input_type = $input_type_conditional.input_type
12 #set report_name = os.path.splitext(os.path.basename($input_type_conditional.single_input.element_identifier))[0] 12 #set report_name = os.path.splitext(os.path.basename($input_type_conditional.single_input.element_identifier))[0]
13 #set report_name = re.sub('_[0-9]+$', '', str(report_name)) + '.tab' 13 #set report_name = re.sub('_[0-9]+$', '', str(report_name)) + '.tab'
14 14
15 python $__tool_directory__/confil/confil.py --threads $threads --cutoff $cutoff 15 python $__tool_directory__/confil/confil.py --threads $threads --cutoff $cutoff
16 $input_type_conditional.single_input.element_identifier 16 $input_type_conditional.single_input.element_identifier
17 && mv $report_name '$output' 17 && mv $report_name '$output_report'
18 && ln -sf "${input_type_conditional.single_input}" '$output_file1'
18 19
19 ####### Paired Collection 20 ####### Paired Collection
20 #elif $input_type == "paired_collection" 21 #elif $input_type == "paired_collection"
21 ln -s "${input_type_conditional.collection_input.forward}" $input_type_conditional.collection_input.forward.element_identifier && 22 ln -s "${input_type_conditional.collection_input.forward}" $input_type_conditional.collection_input.forward.element_identifier &&
22 ln -s "${input_type_conditional.collection_input.reverse}" $input_type_conditional.collection_input.reverse.element_identifier && 23 ln -s "${input_type_conditional.collection_input.reverse}" $input_type_conditional.collection_input.reverse.element_identifier &&
23 #set report_name = os.path.splitext(os.path.basename($input_type_conditional.collection_input.forward.element_identifier))[0] 24 #set report_name = os.path.splitext(os.path.basename($input_type_conditional.collection_input.forward.element_identifier))[0]
24 #set report_name = re.sub('_[0-9]+$', '', str(report_name)) + '.tab' 25 #set report_name = re.sub('_[0-9]+$', '', str(report_name)) + '.tab'
25 26
26 python $__tool_directory__/confil/confil.py --threads $threads --cutoff $cutoff --paired 27 python $__tool_directory__/confil/confil.py --threads $threads --cutoff $cutoff --paired
27 $input_type_conditional.collection_input.forward.element_identifier $input_type_conditional.collection_input.reverse.element_identifier 28 $input_type_conditional.collection_input.forward.element_identifier $input_type_conditional.collection_input.reverse.element_identifier
28 && mv $report_name '$output' 29 && mv $report_name '$output_report'
30 && ln -sf "${input_type_conditional.collection_input.forward}" '$output_file1'
31 && ln -sf "${input_type_conditional.collection_input.reverse}" '$output_file2'
29 #end if 32 #end if
30 ]]> 33 ]]>
31 </command> 34 </command>
32 <inputs> 35 <inputs>
33 <conditional name="input_type_conditional"> 36 <conditional name="input_type_conditional">
44 </conditional> 47 </conditional>
45 <param name="cutoff" type="integer" label="Cutoff percentage" value="50" min="50" max="99" /> 48 <param name="cutoff" type="integer" label="Cutoff percentage" value="50" min="50" max="99" />
46 <param name="threads" type="integer" label="Number of threads" value="1" min="1" max="4" /> 49 <param name="threads" type="integer" label="Number of threads" value="1" min="1" max="4" />
47 </inputs> 50 </inputs>
48 <outputs> 51 <outputs>
49 <data name="output" format="tabular" label="${tool.name} report" /> 52 <data name="output_report" format="tabular" label="${tool.name} report" />
53 <data name="output_file1" format="fastq" label="${tool.name} report">
54 </data>
55 <data name="output_file2" format="fastq" label="${tool.name} report">
56 <filter>input_type_conditional['input_type'] == "paired_collection"</filter>
57 </data>
50 </outputs> 58 </outputs>
51 <tests> 59 <tests>
52 <test> 60 <test>
53 <param name="single_input" value="seq_1.fastq" /> 61 <param name="single_input" value="seq_1.fastq" />
54 <param name="input_type" value="single" /> 62 <param name="input_type" value="single" />
55 <output name="output" ftype="tabular" file="seq.tab" /> 63 <output name="output_report" ftype="tabular" file="seq.tab" />
64 <output name="output_file1" ftype="fastq" file="seq_1.fastq" />
56 </test> 65 </test>
57 <test> 66 <test>
58 <param name="collection_input"> 67 <param name="collection_input">
59 <collection type="paired"> 68 <collection type="paired">
60 <element name="forward" value="seq_1.fastq" /> 69 <element name="forward" value="seq_1.fastq" />
61 <element name="reverse" value="seq_2.fastq" /> 70 <element name="reverse" value="seq_2.fastq" />
62 </collection> 71 </collection>
63 </param> 72 </param>
64 <param name="input_type" value="paired_collection" /> 73 <param name="input_type" value="paired_collection" />
65 <output name="output" ftype='tabular' file="seq.tab" /> 74 <output name="output_report" ftype='tabular' file="seq.tab" />
75 <output name="output_file1" ftype='fastq' file="seq_1.fastq" />
76 <output name="output_file2" ftype='fastq' file="seq_2.fastq" />
66 </test> 77 </test>
67 </tests> 78 </tests>
68 <help><![CDATA[ 79 <help><![CDATA[
69 Usage: confil [OPTIONS] SEQFILES... 80 confil parses a kraken2 report and determines contamination based on a specified cutoff.
70
71 Options:
72 --db PATH Name for Kraken 2 DB [default:
73 /tools/databases/kraken2/04092018/standard/; required]
74 --threads INTEGER Number of threads [default: 1]
75 --cutoff INTEGER Percentage of fragments covered [default: 90]
76 --paired The filenames provided have paired-end reads
77 --help Show this message and exit.
78
79 ]]> </help> 81 ]]> </help>
80 <citations> 82 <citations>
81 <citation type="bibtex"> 83 <citation type="bibtex">
82 @misc{githubconfil, 84 @misc{githubconfil,
83 author = {SANBI-SA}, 85 author = {SANBI-SA},