Mercurial > repos > iuc > gatk2
view variant_recalibrator.xml @ 1:f760c0de8e3a draft
Uploaded
author | bgruening |
---|---|
date | Mon, 02 Dec 2013 10:36:02 -0500 |
parents | 340633249b3d |
children | f244b8209eb8 |
line wrap: on
line source
<tool id="gatk2_variant_recalibrator" name="Variant Recalibrator" version="0.0.7"> <description></description> <expand macro="requirements" /> <macros> <import>gatk2_macros.xml</import> </macros> <command interpreter="python"> gatk2_wrapper.py --stdout "${output_log}" #for $var_count, $variant in enumerate( $reference_source.variants ): -d "--input:input_${var_count},%(file_type)s" "${variant.input_variants}" "${variant.input_variants.ext}" "input_variants_${var_count}" #end for -p ' @JAR_PATH@ -T "VariantRecalibrator" \$GATK2_SITE_OPTIONS @THREADS@ #if $reference_source.reference_source_selector != "history": -R "${reference_source.ref_file.fields.path}" #end if --recal_file "${output_recal}" --tranches_file "${output_tranches}" --rscript_file "${output_rscript}" ' #set $rod_binding_names = dict() #for $rod_binding in $rod_bind: #if str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'custom': #set $rod_bind_name = $rod_binding.rod_bind_type.custom_rod_name #elif str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'comp': #set $rod_bind_name = "comp" + $rod_binding.rod_bind_type.custom_rod_name #else #set $rod_bind_name = $rod_binding.rod_bind_type.rod_bind_type_selector #end if #set $rod_binding_names[$rod_bind_name] = $rod_binding_names.get( $rod_bind_name, -1 ) + 1 #if $rod_binding.rod_bind_type.rod_training_type.rod_training_type_selector == "not_training_truth_known": -d "--resource:${rod_bind_name},%(file_type)s" "${rod_binding.rod_bind_type.input_rod}" "${rod_binding.rod_bind_type.input_rod.ext}" "input_${rod_bind_name}_${rod_binding_names[$rod_bind_name]}" #else: -d "--resource:${rod_bind_name},%(file_type)s,known=${rod_binding.rod_bind_type.rod_training_type.known},training=${rod_binding.rod_bind_type.rod_training_type.training},truth=${rod_binding.rod_bind_type.rod_training_type.truth},bad=${rod_binding.rod_bind_type.rod_training_type.bad},prior=${rod_binding.rod_bind_type.rod_training_type.prior}" "${rod_binding.rod_bind_type.input_rod}" "${rod_binding.rod_bind_type.input_rod.ext}" "input_${rod_bind_name}_${rod_binding_names[$rod_bind_name]}" #end if #end for #include source=$standard_gatk_options# ##start analysis specific options -p ' #if str( $annotations ) != "None": #for $annotation in str( $annotations.fields.gatk_value ).split( ',' ): --use_annotation "${annotation}" #end for #end if #for $additional_annotation in $additional_annotations: --use_annotation "${additional_annotation.additional_annotation_name}" #end for --mode "${mode}" ' #if $analysis_param_type.analysis_param_type_selector == "advanced": -p ' --maxGaussians "${analysis_param_type.max_gaussians}" --maxIterations "${analysis_param_type.max_iterations}" --numKMeans "${analysis_param_type.num_k_means}" --stdThreshold "${analysis_param_type.std_threshold}" --qualThreshold "${analysis_param_type.qual_threshold}" --shrinkage "${analysis_param_type.shrinkage}" --dirichlet "${analysis_param_type.dirichlet}" --priorCounts "${analysis_param_type.prior_counts}" #if str( $analysis_param_type.bad_variant_selector.bad_variant_selector_type ) == 'percent': --percentBadVariants "${analysis_param_type.bad_variant_selector.percent_bad_variants}" #else: --minNumBadVariants "${analysis_param_type.bad_variant_selector.min_num_bad_variants}" #end if --target_titv "${analysis_param_type.target_titv}" #for $tranche in [ $tranche.strip() for $tranche in str( $analysis_param_type.ts_tranche ).split( ',' ) if $tranche.strip() ] --TStranche "${tranche}" #end for #for $ignore_filter in $analysis_param_type.ignore_filters: #set $ignore_filter_name = str( $ignore_filter.ignore_filter_type.ignore_filter_type_selector ) #if $ignore_filter_name == "custom": #set $ignore_filter_name = str( $ignore_filter.ignore_filter_type.filter_name ) #end if --ignore_filter "${ignore_filter_name}" #end for --ts_filter_level "${analysis_param_type.ts_filter_level}" ' #end if && mv "${output_rscript}.pdf" "${output_tranches_pdf}" </command> <inputs> <conditional name="reference_source"> <expand macro="reference_source_selector_param" /> <when value="cached"> <repeat name="variants" title="Variant" min="1" help="-input,--input &lt;input&gt;"> <param name="input_variants" type="data" format="vcf" label="Variant file to recalibrate" /> </repeat> <param name="ref_file" type="select" label="Using reference genome" help="-R,--reference_sequence &lt;reference_sequence&gt;"> <options from_data_table="gatk_picard_indexes"> <!-- <filter type="data_meta" key="dbkey" ref="variants[0].input_variants" column="dbkey"/> --> </options> <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> </param> </when> <when value="history"> <!-- FIX ME!!!! --> <repeat name="variants" title="Variant" min="1" help="-input,--input &lt;input&gt;"> <param name="input_variants" type="data" format="vcf" label="Variant file to recalibrate" /> </repeat> <param name="ref_file" type="data" format="fasta" label="Using reference file" help="-R,--reference_sequence &lt;reference_sequence&gt;" /> </when> </conditional> <repeat name="rod_bind" title="Binding for reference-ordered data" help="-resource,--resource &lt;resource&gt;"> <conditional name="rod_bind_type"> <param name="rod_bind_type_selector" type="select" label="Binding Type"> <option value="dbsnp" selected="True">dbSNP</option> <option value="variant">Variants</option> <option value="snps">SNPs</option> <option value="indels">INDELs</option> <option value="hapmap">HapMap</option> <option value="omni">OMNI</option> <option value="mask">Mask</option> <option value="custom">Custom</option> <option value="comp">Comp</option> </param> <when value="variant"> <param name="input_rod" type="data" format="vcf" label="Variant ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="comp"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <param name="custom_rod_name" type="text" value="Unnamed" label="ROD Name"/> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="mask"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="dbsnp"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="snps"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="hapmap"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="omni"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="indels"> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> <when value="custom"> <param name="custom_rod_name" type="text" value="Unknown" label="ROD Name"/> <param name="input_rod" type="data" format="vcf" label="ROD file" /> <conditional name="rod_training_type"> <param name="rod_training_type_selector" type="select" label="Use as training/truth/known sites"> <option value="is_training_truth_known">Set training/truth/known sites</option> <option value="not_training_truth_known" selected="True">Don't Set options</option> </param> <when value="not_training_truth_known"> <!-- do nothing here --> </when> <when value="is_training_truth_known"> <param name="known" type="boolean" label="Is Known Site" truevalue="true" falsevalue="false"/> <param name="training" type="boolean" label="Is Training Site" truevalue="true" falsevalue="false"/> <param name="truth" type="boolean" label="Is Truth Site" truevalue="true" falsevalue="false"/> <param name="bad" type="boolean" label="Is Bad Site" truevalue="true" falsevalue="false"/> <param name="prior" type="float" label="prior probability of being true" value="12.0"/> </when> </conditional> </when> </conditional> </repeat> <param name="annotations" type="select" multiple="True" display="checkboxes" label="annotations which should used for calculations" help="-an,--use_annotation &lt;use_annotation&gt;"> <!-- load the available annotations from an external configuration file, since additional ones can be added to local installs --> <options from_data_table="gatk2_annotations"> <filter type="multiple_splitter" column="tools_valid_for" separator=","/> <filter type="static_value" value="VariantRecalibrator" column="tools_valid_for"/> </options> </param> <repeat name="additional_annotations" title="Additional annotation" help="-an,--use_annotation &lt;use_annotation&gt;"> <param name="additional_annotation_name" type="text" value="" label="Annotation name" /> </repeat> <param name="mode" type="select" label="Recalibration mode" help="-mode,--mode &lt;mode&gt;"> <option value="SNP" selected="True">SNP</option> <option value="INDEL">INDEL</option> <option value="BOTH">BOTH</option> </param> <expand macro="gatk_param_type_conditional" /> <expand macro="analysis_type_conditional"> <param name="max_gaussians" type="integer" label="maximum number of Gaussians to try during variational Bayes Algorithm" value="10" help="-mG,--maxGaussians &lt;maxGaussians&gt;"/> <param name="max_iterations" type="integer" label="maximum number of maximum number of VBEM iterations to be performed in variational Bayes Algorithm" value="100" help="-mI,--maxIterations &lt;maxIterations&gt;"/> <param name="num_k_means" type="integer" label="number of k-means iterations to perform in order to initialize the means of the Gaussians in the Gaussian mixture model" value="30" help="-nKM,--numKMeans &lt;numKMeans&gt;"/> <param name="std_threshold" type="float" label="If a variant has annotations more than -std standard deviations away from mean then don't use it for building the Gaussian mixture model." value="8.0" help="-std,--stdThreshold &lt;stdThreshold&gt;"/> <param name="qual_threshold" type="float" label="If a known variant has raw QUAL value less than -qual then don't use it for building the Gaussian mixture model." value="80.0" help="-qual,--qualThreshold &lt;qualThreshold&gt;"/> <param name="shrinkage" type="float" label="shrinkage parameter in variational Bayes algorithm" value="1.0" help="-shrinkage,--shrinkage &lt;shrinkage&gt;"/> <param name="dirichlet" type="float" label="dirichlet parameter in variational Bayes algorithm" value="0.001" help="-dirichlet,--dirichlet &lt;dirichlet&gt;"/> <param name="prior_counts" type="float" label="number of prior counts to use in variational Bayes algorithm" value="20.0" help="-priorCounts,--priorCounts &lt;priorCounts&gt;"/> <conditional name="bad_variant_selector"> <param name="bad_variant_selector_type" type="select" label="How to specify bad variants"> <option value="percent" selected="True">Percent</option> <option value="min_num">Number</option> </param> <when value="percent"> <param name="percent_bad_variants" type="float" label="percentage of the worst scoring variants to use when building the Gaussian mixture model of bad variants. 0.07 means bottom 7 percent." value="0.03" help="-percentBad,--percentBadVariants &lt;percentBadVariants&gt;"/> </when> <when value="min_num"> <param name="min_num_bad_variants" type="integer" label="minimum amount of worst scoring variants to use when building the Gaussian mixture model of bad variants. Will override -percentBad arugment if necessary" value="2000" help="-minNumBad,--minNumBadVariants &lt;minNumBadVariants&gt;"/> </when> </conditional> <param name="target_titv" type="float" label="expected novel Ti/Tv ratio to use when calculating FDR tranches and for display on optimization curve output figures. (approx 2.15 for whole genome experiments). ONLY USED FOR PLOTTING PURPOSES!" value="2.15" help="-titv,--target_titv &lt;target_titv&gt;"/> <param name="ts_tranche" type="text" label="levels of novel false discovery rate (FDR, implied by ti/tv) at which to slice the data. (in percent, that is 1.0 for 1 percent)" value="100.0, 99.9, 99.0, 90.0" help="-tranche,--TStranche &lt;TStranche&gt;"/> <repeat name="ignore_filters" title="Ignore Filter" help="-ignoreFilter,--ignore_filter &lt;ignore_filter&gt;"> <conditional name="ignore_filter_type"> <param name="ignore_filter_type_selector" type="select" label="Filter Type"> <option value="HARD_TO_VALIDATE">HARD_TO_VALIDATE</option> <option value="LowQual" >LowQual</option> <option value="custom" selected="True">Other</option> </param> <when value="custom"> <param name="filter_name" type="text" value="" label="Filter name"/> </when> <when value="HARD_TO_VALIDATE" /> <when value="LowQual" /> </conditional> </repeat> <param name="ts_filter_level" type="float" label="truth sensitivity level at which to start filtering, used here to indicate filtered variants in plots" value="99.0" help="-ts_filter_level,--ts_filter_level &lt;ts_filter_level&gt;"/> </expand> </inputs> <outputs> <data format="gatk_recal" name="output_recal" label="${tool.name} on ${on_string} (Recalibration File)" /> <data format="gatk_tranche" name="output_tranches" label="${tool.name} on ${on_string} (Tranches File)" /> <data format="txt" name="output_rscript" label="${tool.name} on ${on_string} (RScript File)" /> <data format="pdf" name="output_tranches_pdf" label="${tool.name} on ${on_string} (PDF File)" /> <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" /> </outputs> <tests> <!-- ADD TESTS --> </tests> <help> **What it does** Takes variant calls as .vcf files, learns a Gaussian mixture model over the variant annotations and evaluates the variant -- assigning an informative lod score For more information on using the VariantRecalibrator module, see this `tool specific page <http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_variantrecalibration_VariantRecalibrator.html>`_. To learn about best practices for variant detection using GATK, see this `overview <http://www.broadinstitute.org/gatk/guide/topic?name=best-practices>`_. If you encounter errors, please view the `GATK FAQ <http://www.broadinstitute.org/gatk/guide/topic?name=faqs>`_. ------ **Inputs** GenomeAnalysisTK: VariantRecalibrator accepts a variant input file. **Outputs** The output is in VCF format. Go `here <http://www.broadinstitute.org/gatk/guide/topic?name=intro>`_ for details on GATK file formats. ------- **Settings**:: tranches_file The output tranches file used by ApplyRecalibration use_annotation The names of the annotations which should used for calculations mode Recalibration mode to employ: 1.) SNP for recalibrating only snps (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both snps and indels simultaneously. (SNP|INDEL|BOTH) maxGaussians The maximum number of Gaussians to try during variational Bayes algorithm maxIterations The maximum number of VBEM iterations to be performed in variational Bayes algorithm. Procedure will normally end when convergence is detected. numKMeans The number of k-means iterations to perform in order to initialize the means of the Gaussians in the Gaussian mixture model. stdThreshold If a variant has annotations more than -std standard deviations away from mean then don't use it for building the Gaussian mixture model. qualThreshold If a known variant has raw QUAL value less than -qual then don't use it for building the Gaussian mixture model. shrinkage The shrinkage parameter in variational Bayes algorithm. dirichlet The dirichlet parameter in variational Bayes algorithm. priorCounts The number of prior counts to use in variational Bayes algorithm. percentBadVariants What percentage of the worst scoring variants to use when building the Gaussian mixture model of bad variants. 0.07 means bottom 7 percent. minNumBadVariants The minimum amount of worst scoring variants to use when building the Gaussian mixture model of bad variants. Will override -percentBad arugment if necessary. recal_file The output recal file used by ApplyRecalibration target_titv The expected novel Ti/Tv ratio to use when calculating FDR tranches and for display on optimization curve output figures. (approx 2.15 for whole genome experiments). ONLY USED FOR PLOTTING PURPOSES! TStranche The levels of novel false discovery rate (FDR, implied by ti/tv) at which to slice the data. (in percent, that is 1.0 for 1 percent) ignore_filter If specified the optimizer will use variants even if the specified filter name is marked in the input VCF file path_to_Rscript The path to your implementation of Rscript. For Broad users this is maybe /broad/tools/apps/R-2.6.0/bin/Rscript rscript_file The output rscript file generated by the VQSR to aid in visualization of the input data and learned model path_to_resources Path to resources folder holding the Sting R scripts. ts_filter_level The truth sensitivity level at which to start filtering, used here to indicate filtered variants in plots @CITATION_SECTION@ </help> </tool>