Mercurial > repos > blankenberg > naive_variant_detector
comparison tools/naive_variant_detector.xml @ 1:55b4460cd0ce
Add naive variant detector tool.
| author | Daniel Blankenberg <dan@bx.psu.edu> |
|---|---|
| date | Tue, 14 May 2013 10:14:52 -0400 |
| parents | |
| children | 1c23da12b768 |
comparison
equal
deleted
inserted
replaced
| 0:4f99c0ee5d2c | 1:55b4460cd0ce |
|---|---|
| 1 <tool id="naive_variant_detector" name="Naive Variant Detector" version="0.0.1"> | |
| 2 <description>on BAM files</description> | |
| 3 <requirements> | |
| 4 <requirement type="package" version="1.7.1">numpy</requirement> | |
| 5 <requirement type="package" version="0.0.1">pyBamParser</requirement> | |
| 6 <requirement type="package" version="0.0.1">pyBamTools</requirement> | |
| 7 </requirements> | |
| 8 <stdio> | |
| 9 <exit_code range="1:" err_level="fatal" /> | |
| 10 <exit_code range=":-1" err_level="fatal" /> | |
| 11 </stdio> | |
| 12 <command interpreter="python">naive_variant_detector.py | |
| 13 -o "${output_vcf}" | |
| 14 | |
| 15 #for $input_bam in $reference_source.input_bams: | |
| 16 -b "${input_bam.input_bam}" | |
| 17 -i "${input_bam.input_bam.metadata.bam_index}" | |
| 18 #end for | |
| 19 | |
| 20 #if $reference_source.reference_source_selector != "history": | |
| 21 -r "${reference_source.ref_file.fields.path}" | |
| 22 #elif $reference_source.ref_file: | |
| 23 -r "${reference_source.ref_file}" | |
| 24 #end if | |
| 25 | |
| 26 #for $region in $regions: | |
| 27 --region "${region.chromosome}:${region.start}-${region.end}" | |
| 28 #end for | |
| 29 | |
| 30 ${variants_only} | |
| 31 | |
| 32 ${use_strand} | |
| 33 | |
| 34 --ploidy "${$ploidy}" | |
| 35 | |
| 36 --min_support_depth "${min_support_depth}" | |
| 37 | |
| 38 #if str($min_base_quality): | |
| 39 --min_base_quality "${min_base_quality}" | |
| 40 #end if | |
| 41 | |
| 42 #if str($min_mapping_quality): | |
| 43 --min_mapping_quality "${min_mapping_quality}" | |
| 44 #end if | |
| 45 | |
| 46 --coverage_dtype "${coverage_dtype}" | |
| 47 | |
| 48 </command> | |
| 49 <inputs> | |
| 50 <conditional name="reference_source"> | |
| 51 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> | |
| 52 <option value="cached">Locally cached</option> | |
| 53 <option value="history">History</option> | |
| 54 </param> | |
| 55 <when value="cached"> | |
| 56 <repeat name="input_bams" title="BAM file" min="1" > | |
| 57 <param name="input_bam" type="data" format="bam" label="BAM file"> | |
| 58 <validator type="unspecified_build" /> | |
| 59 <validator type="dataset_metadata_in_data_table" table_name="sam_fa_indexes" metadata_name="dbkey" metadata_column="value" message="Sequences are not currently available for the specified build." /> <!-- fixme!!! this needs to be a select --> | |
| 60 </param> | |
| 61 </repeat> | |
| 62 <param name="ref_file" type="select" label="Using reference genome" > | |
| 63 <options from_data_table="sam_fa_indexes"> | |
| 64 <!-- <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/> does not yet work in a repeat...--> | |
| 65 </options> | |
| 66 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
| 67 </param> | |
| 68 </when> | |
| 69 <when value="history"> <!-- FIX ME!!!! --> | |
| 70 <repeat name="input_bams" title="BAM file" min="1" > | |
| 71 <param name="input_bam" type="data" format="bam" label="BAM file" > | |
| 72 </param> | |
| 73 </repeat> | |
| 74 <param name="ref_file" type="data" format="fasta" label="Using reference file" optional="True" /> | |
| 75 </when> | |
| 76 </conditional> | |
| 77 | |
| 78 <repeat name="regions" title="Restrict to regions" min="0" > | |
| 79 <param name="chromosome" type="text" value="" optional="False" label="Chromosome" /> | |
| 80 <param name="start" type="integer" value="" optional="True" label="Start" /> | |
| 81 <param name="end" type="integer" value="" optional="True" label="End" /> | |
| 82 </repeat> | |
| 83 | |
| 84 <!-- TODO: enhance filtering --> | |
| 85 <param name="min_support_depth" type="integer" value="0" min="0" label="Minimum number of reads needed to consider a REF/ALT" /> | |
| 86 <param name="min_base_quality" type="integer" value="" label="Minimum base quality" optional="True" /> | |
| 87 <param name="min_mapping_quality" type="integer" value="" label="Minimum mapping quality" optional="True" /> | |
| 88 | |
| 89 | |
| 90 <param name="ploidy" type="integer" value="2" min="1" label="Ploidy" /> | |
| 91 <param name="variants_only" type="boolean" truevalue="--variants_only" falsevalue="" checked="False" label="Only write out positions with with possible alternate alleles"/> | |
| 92 | |
| 93 <param name="use_strand" type="boolean" truevalue="--use_strand" falsevalue="" checked="False" label="Report counts by strand"/> | |
| 94 | |
| 95 <param name="coverage_dtype" type="select" label="Choose the dtype to use for storing coverage information" help="This affects the maximum recorded value for a position, e.g. uint8 would be 255 coverage, but will require the least amount of RAM"> | |
| 96 <option value="uint8" selected="True">uint8</option> | |
| 97 <option value="uint16">uint16</option> | |
| 98 <option value="uint32">uint32</option> | |
| 99 <option value="uint64">uint64</option> | |
| 100 </param> | |
| 101 | |
| 102 </inputs> | |
| 103 <outputs> | |
| 104 <data format="vcf" name="output_vcf" /> | |
| 105 </outputs> | |
| 106 <help> | |
| 107 **What it does** | |
| 108 | |
| 109 This tool is a naive variant detector. | |
| 110 | |
| 111 ------ | |
| 112 | |
| 113 **Inputs** | |
| 114 | |
| 115 Accepts one or more BAM input files. | |
| 116 | |
| 117 | |
| 118 **Outputs** | |
| 119 | |
| 120 The output is in VCF format. | |
| 121 | |
| 122 ------ | |
| 123 | |
| 124 **Citation** | |
| 125 | |
| 126 If you use this tool, please cite Blankenberg D, et al. *In preparation.* | |
| 127 | |
| 128 </help> | |
| 129 <tests> | |
| 130 <test> | |
| 131 <param name="reference_source_selector" value="history" /> | |
| 132 <param name="input_bam" value="test-data/fake_phiX174_reads_1.bam" ftype="bam" /> | |
| 133 <param name="ref_file" value="test-data/phiX174.fasta" ftype="fasta" /> | |
| 134 <param name="min_support_depth" value="0" /> | |
| 135 <param name="min_base_quality" value="" /> | |
| 136 <param name="min_mapping_quality" value="" /> | |
| 137 <param name="ploidy" value="2" /> | |
| 138 <param name="variants_only" value="False" /> | |
| 139 <param name="use_strand" value="False" /> | |
| 140 <param name="coverage_dtype" value="uint8" /> | |
| 141 <output name="output_vcf" file="test-data/fake_phiX174_reads_1_test_out_1.vcf" compare="contains" /> | |
| 142 </test> | |
| 143 </tests> | |
| 144 | |
| 145 </tool> |
