Mercurial > repos > nml > quasitools
diff hydra.xml @ 5:b69e898b8109 draft
planemo upload for repository https://github.com/phac-nml/quasitools commit e30c0687f755a46c5b3bd265a1478a1abf5dc9f1
author | nml |
---|---|
date | Fri, 24 Aug 2018 16:50:28 -0400 |
parents | 8cdffc02d2e2 |
children | dcd43b402eb3 |
line wrap: on
line diff
--- a/hydra.xml Wed Apr 25 10:38:00 2018 -0400 +++ b/hydra.xml Fri Aug 24 16:50:28 2018 -0400 @@ -1,88 +1,102 @@ -<tool id="hydra" name="Hydra pipeline" version="0.2.0"> +<tool id="hydra" name="Hydra pipeline" version="0.4.2"> <description>Identifies drug resistance within an NGS dataset</description> <requirements> - <requirement type="package" version="0.3.1">quasitools</requirement> + <requirement type="package" version="0.4.2">quasitools</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ - quasitools hydra + quasitools hydra ## Preparing file input. #if $data_type.type == "paired": - '$data_type.fastq_input1' - '$data_type.fastq_input2' + '$data_type.fastq_input1' + '$data_type.fastq_input2' #elif $data_type.type == "collection": - '$data_type.fastq_input1.forward' - '$data_type.fastq_input1.reverse' + '$data_type.fastq_input1.forward' + '$data_type.fastq_input1.reverse' #elif $data_type.type == "single": - '$data_type.fastq_input1' + '$data_type.fastq_input1' #end if #if $mutation_db: - -m '$mutation_db' + -m '$mutation_db' #end if #if $reporting_threshold: - -rt '$reporting_threshold' + -rt '$reporting_threshold' #end if #if $consensus_pct: - -cp '$consensus_pct' + -cp '$consensus_pct' #end if #if $length_cutoff: - -lc '$length_cutoff' + -lc '$length_cutoff' #end if #if $score_cutoff: - -sc '$score_cutoff' + -sc '$score_cutoff' #end if #if $error_rate: - -e '$error_rate' + -e '$error_rate' #end if - #if $min_qual: - -mq '$min_qual' + #if $min_read_qual: + -rq '$min_read_qual' + #end if + + #if $min_variant_qual: + -vq '$min_variant_qual' #end if #if $min_depth: - -md '$min_depth' + -md '$min_depth' #end if #if $min_ac: - -ma '$min_ac' + -ma '$min_ac' #end if #if $min_freq: - -mf '$min_freq' + -mf '$min_freq' #end if #if $consensus.consensus_bool == "true_consensus": - --generate_consensus + --generate_consensus #if $consensus.fasta_id.type == "default": - --id + --id #if $data_type.type == "paired": '${fastq_input1.element_identifier}'_'${fastq_input2.element_identifier}' #elif $data_type.type == "single": '${fastq_input1.element_identifier}' #end if #elif $consensus.fasta_id.type == "custom": - --id '$consensus.fasta_id.custom_id' + --id '$consensus.fasta_id.custom_id' #end if #end if - #if $filter_ns: - --ns + #if $low_quality.qual_selector == "filter_ns": + --ns + #elif $low_quality.qual_selector == "mask_reads": + --mask_reads #end if + #if $score_type.score_selector == "median": + --median + #elif $score_type.score_selector == "mean": + --mean + #end if + + $trim_reads + -o output ]]></command> @@ -107,19 +121,21 @@ <param name="mutation_db" type="data" format="tsv" optional="true" label="Mutation DB" help="Defaults to HIV mutation database." /> <param name="reporting_threshold" type="integer" optional="true" min="1" max="100" value="1" label="Reporting threshold. Defaults to 1." help="Minimum mutation frequency to report." /> <param name="consensus_pct" type="integer" optional="true" min="1" max="20" value="20" label="Consensus percentage" help="Minimum mutation frequency to report. Defaults to 20." /> - <param name="length_cutoff" type="integer" optional="true" min="0" max="1000" label="Length cutoff" value="100" help="Reads which fall short of the specified length will be filtered out. Defaults to 100." /> - <param name="score_cutoff" type="integer" optional="true" min="0" max="40" label="Score cutoff" value="30" help="Reads whose average quality score is less than the specified score will be filtered out. Defaults to 30." /> + <param name="length_cutoff" type="integer" optional="true" min="1" max="1000" label="Length cutoff" value="100" help="Reads which fall short of the specified length will be filtered out. Defaults to 100." /> + <param name="score_cutoff" type="integer" optional="true" min="0" max="40" label="Score cutoff" value="30" help="Reads whose median or mean quality score (depending on the score type specified) is less than the specified score cutoff value will be filtered out. Defaults to 30." /> <param name="error_rate" type="float" optional="true" min="0" max="1" label="Error rate" value="0.0021" help="Estimated sequencing error rate. Defaults to 0.0021."/> - <param name="min_qual" type="integer" optional="true" min="1" max="100" label="Minimum quality" value="30" help="Minimum required quality for variant to be considered later on in the pipeline. Defaults to 30." /> + <param name="min_variant_qual" type="integer" optional="true" min="1" max="100" label="Minimum quality" value="30" help="Minimum required quality for variant to be considered later on in the pipeline. Defaults to 30." /> + <param name="min_read_qual" type="integer" optional="true" min="1" max="100" label="Minimum quality" value="30" help="Minimum required quality for a position in a read not to be masked, is masking is enabled. Defaults to 30." /> <param name="min_depth" type="integer" optional="true" min="0" max="5000" label="Minimum depth" value="100" help="Minimum required depth for variant to be considered later on in the pipeline. Defaults to 100." /> <param name="min_ac" type="integer" optional="true" min="0" max="5000" label="Minimum allele count" value="5" help="Minimum required allele count for variant to be considered later on in the pipeline. Defaults to 5." /> <param name="min_freq" type="float" optional="true" min="0" max="1" label="Minimum frequency" value="0.01" help="Minimum required frequency for variant to be considered later on in the pipeline. Defaults to 0.01." /> + <param name="trim_reads" type="boolean" optional="true" checked="false" truevalue="-tr" falsevalue="" label="Trim reads" help="Iteratively trim reads based on filter values if enabled." /> <conditional name="consensus"> <param name="consensus_bool" type="select" label="Generate consensus sequence." multiple="false" display="radio"> <option value="true_consensus">True</option> <option selected="true" value="false_consensus">False</option> </param> - <when value="true_consensus"> + <when value="true_consensus"> <conditional name="fasta_id"> <param name="type" type="select" label="Specify consensus fasta identifier" multiple="false" display="radio"> <option value="default" >Use fasta dataset name</option> @@ -130,16 +146,37 @@ <when value="custom"> <param name="custom_id" type="text" optional="false" value="custom_id" label="Fasta identifier" help="Type in a fasta identifier."/> </when> - </conditional> + </conditional> </when> - <when value="false_consensus"> + <when value="false_consensus"> </when> </conditional> - <param name="filter_ns" type="boolean" truevalue="--ns" falsevalue="" checked="False" label="Filter out n's" /> + <conditional name="low_quality"> + <param name="qual_selector" type="select" label="Filter out regions masked, or mask low coverage regions with n's." multiple="false" display="radio"> + <option value="filter_ns">Filter out regions with n's</option> + <option value="mask_reads">Mask low coverage regions with n's</option> + <option value="neither" selected="true">Do not filter or mask low coverage regions.</option> + </param> + <when value="filter_ns"> + </when> + <when value="mask_reads"> + </when> + <when value="neither"> + </when> + </conditional> + <conditional name="score_type"> + <param name="score_selector" type="select" label="Use either median score (default) or mean score for the score cutoff value." multiple="false" display="radio"> + <option value="median" selected="true">Use median score</option> + <option value="mean">Use mean score</option> + </param> + <when value="median"> + </when> + <when value="mean"> + </when> + </conditional> </inputs> <outputs> <data format="bam" label="HyDRA: alignment bam output" name="output_bam" from_work_dir="output/align.bam" /> - <data format="bam" label="HyDRA: bam.bai output" name="output_bam_bai" from_work_dir="output/align.bam.bai" /> <data format="csv" label="HyDRA: coverage output" name="output_coverage" from_work_dir="output/coverage_file.csv" /> <data format="csv" label="HyDRA: drug resistance output" name="output_dr" from_work_dir="output/dr_report.csv" /> <data format="fastq" label="HyDRA: filtered reads output" name="output_filtered" from_work_dir="output/filtered.fastq" /> @@ -154,6 +191,7 @@ <test> <param name="type" value="single"/> <param name="fastq_input1" value="forward.fastq" /> + <param name="score_selector" value="mean" /> <output name="output_coverage"> <assert_contents> <has_text text="frame: 0" /> @@ -237,7 +275,6 @@ /tmp/hydra_out/ * align.bam - * align.bam.bai * coverage_file.csv * dr_report.csv * filtered.fastq @@ -250,7 +287,6 @@ * __run.conf__: The configuration used when this output was produced. * __reads_w_K103N/__: The results directory for the input file reads_w_K103N.fastq * __align.bam__: The alignment file in bam format. - * __align.bam.bai__: The index to the alignment file. * __coverage_file.csv__: A file with one entry per line with the AA position and the coverage at the position. * __dr_report.csv__: A report detailing the drug resistant mutations found, above the reporting threshold (default: 1%). * __filtered.fastq__: The reads remaining after the filtering stage.