# HG changeset patch
# User david-hoover
# Date 1347487834 14400
# Node ID d5e8dbe8072ea94654c84253bb00bb8664cd0aa5
# Parent 0a895e7c6d8e5c6412c520e7c14a28403ff2e0cd
Uploaded
diff -r 0a895e7c6d8e -r d5e8dbe8072e README
--- a/README Wed Sep 12 18:09:15 2012 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-The gatk2_sorted_picard_index.loc and gatk2_annotations.txt files must be
-copied into the tool-data directory. The file tool_data_table_conf.xml must
-be edited to include references to these two new files.
-
-Additionally, copies of or links to the GenomeAnalysisTK.jar and key file
-must be made within the directory tool-data/shared/jars/gatk2.
-
- cd ${GALAXY_DATA_INDEX_DIR}/shared/jars
- mkdir gatk2
- cd gatk2
- ln -s /path/to/wherever/GenomeAnalysisTK.jar .
- ln -s /path/to/wherever/key.file gatk2_key_file
diff -r 0a895e7c6d8e -r d5e8dbe8072e gatk2_wrapper.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gatk2_wrapper.py Wed Sep 12 18:10:34 2012 -0400
@@ -0,0 +1,126 @@
+#!/usr/bin/env python
+#David Hoover, based on gatk by Dan Blankenberg
+
+"""
+A wrapper script for running the GenomeAnalysisTK.jar commands.
+"""
+
+import sys, optparse, os, tempfile, subprocess, shutil
+from binascii import unhexlify
+from string import Template
+
+GALAXY_EXT_TO_GATK_EXT = { 'gatk_interval':'intervals', 'bam_index':'bam.bai', 'gatk_dbsnp':'dbSNP', 'picard_interval_list':'interval_list' } #items not listed here will use the galaxy extension as-is
+GALAXY_EXT_TO_GATK_FILE_TYPE = GALAXY_EXT_TO_GATK_EXT #for now, these are the same, but could be different if needed
+DEFAULT_GATK_PREFIX = "gatk_file"
+CHUNK_SIZE = 2**20 #1mb
+
+
+def cleanup_before_exit( tmp_dir ):
+ if tmp_dir and os.path.exists( tmp_dir ):
+ shutil.rmtree( tmp_dir )
+
+def gatk_filename_from_galaxy( galaxy_filename, galaxy_ext, target_dir = None, prefix = None ):
+ suffix = GALAXY_EXT_TO_GATK_EXT.get( galaxy_ext, galaxy_ext )
+ if prefix is None:
+ prefix = DEFAULT_GATK_PREFIX
+ if target_dir is None:
+ target_dir = os.getcwd()
+ gatk_filename = os.path.join( target_dir, "%s.%s" % ( prefix, suffix ) )
+ os.symlink( galaxy_filename, gatk_filename )
+ return gatk_filename
+
+def gatk_filetype_argument_substitution( argument, galaxy_ext ):
+ return argument % dict( file_type = GALAXY_EXT_TO_GATK_FILE_TYPE.get( galaxy_ext, galaxy_ext ) )
+
+def open_file_from_option( filename, mode = 'rb' ):
+ if filename:
+ return open( filename, mode = mode )
+ return None
+
+def html_report_from_directory( html_out, dir ):
+ html_out.write( '\n
\nGalaxy - GATK Output\n\n\n\n\n' )
+ for fname in sorted( os.listdir( dir ) ):
+ html_out.write( '- %s
\n' % ( fname, fname ) )
+ html_out.write( '
\n\n\n' )
+
+def index_bam_files( bam_filenames, tmp_dir ):
+ for bam_filename in bam_filenames:
+ bam_index_filename = "%s.bai" % bam_filename
+ if not os.path.exists( bam_index_filename ):
+ #need to index this bam file
+ stderr_name = tempfile.NamedTemporaryFile( prefix = "bam_index_stderr" ).name
+ command = 'samtools index %s %s' % ( bam_filename, bam_index_filename )
+ proc = subprocess.Popen( args=command, shell=True, stderr=open( stderr_name, 'wb' ) )
+ return_code = proc.wait()
+ if return_code:
+ for line in open( stderr_name ):
+ print >> sys.stderr, line
+ os.unlink( stderr_name ) #clean up
+ cleanup_before_exit( tmp_dir )
+ raise Exception( "Error indexing BAM file" )
+ os.unlink( stderr_name ) #clean up
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ parser.add_option( '-p', '--pass_through', dest='pass_through_options', action='append', type="string", help='These options are passed through directly to GATK, without any modification.' )
+ parser.add_option( '-o', '--pass_through_options', dest='pass_through_options_encoded', action='append', type="string", help='These options are passed through directly to GATK, with decoding from binascii.unhexlify.' )
+ parser.add_option( '-d', '--dataset', dest='datasets', action='append', type="string", nargs=4, help='"-argument" "original_filename" "galaxy_filetype" "name_prefix"' )
+ parser.add_option( '', '--max_jvm_heap', dest='max_jvm_heap', action='store', type="string", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value.' )
+ parser.add_option( '', '--max_jvm_heap_fraction', dest='max_jvm_heap_fraction', action='store', type="int", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value as a fraction of total physical memory.' )
+ parser.add_option( '', '--stdout', dest='stdout', action='store', type="string", default=None, help='If specified, the output of stdout will be written to this file.' )
+ parser.add_option( '', '--stderr', dest='stderr', action='store', type="string", default=None, help='If specified, the output of stderr will be written to this file.' )
+ parser.add_option( '', '--html_report_from_directory', dest='html_report_from_directory', action='append', type="string", nargs=2, help='"Target HTML File" "Directory"')
+ (options, args) = parser.parse_args()
+
+ tmp_dir = tempfile.mkdtemp( prefix='tmp-gatk-' )
+ if options.pass_through_options:
+ cmd = ' '.join( options.pass_through_options )
+ else:
+ cmd = ''
+ if options.pass_through_options_encoded:
+ cmd = '%s %s' % ( cmd, ' '.join( map( unhexlify, options.pass_through_options_encoded ) ) )
+ if options.max_jvm_heap is not None:
+ cmd = cmd.replace( 'java ', 'java -Xmx%s ' % ( options.max_jvm_heap ), 1 )
+ elif options.max_jvm_heap_fraction is not None:
+ cmd = cmd.replace( 'java ', 'java -XX:DefaultMaxRAMFraction=%s -XX:+UseParallelGC ' % ( options.max_jvm_heap_fraction ), 1 )
+ bam_filenames = []
+ if options.datasets:
+ for ( dataset_arg, filename, galaxy_ext, prefix ) in options.datasets:
+ gatk_filename = gatk_filename_from_galaxy( filename, galaxy_ext, target_dir = tmp_dir, prefix = prefix )
+ if dataset_arg:
+ cmd = '%s %s "%s"' % ( cmd, gatk_filetype_argument_substitution( dataset_arg, galaxy_ext ), gatk_filename )
+ if galaxy_ext == "bam":
+ bam_filenames.append( gatk_filename )
+ index_bam_files( bam_filenames, tmp_dir )
+ #set up stdout and stderr output options
+ stdout = open_file_from_option( options.stdout, mode = 'wb' )
+ stderr = open_file_from_option( options.stderr, mode = 'wb' )
+ #if no stderr file is specified, we'll use our own
+ if stderr is None:
+ stderr = tempfile.NamedTemporaryFile( prefix="gatk-stderr-", dir=tmp_dir )
+
+ proc = subprocess.Popen( args=cmd, stdout=stdout, stderr=stderr, shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr.flush()
+ stderr.seek(0)
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+ #generate html reports
+ if options.html_report_from_directory:
+ for ( html_filename, html_dir ) in options.html_report_from_directory:
+ html_report_from_directory( open( html_filename, 'wb' ), html_dir )
+
+ cleanup_before_exit( tmp_dir )
+
+if __name__=="__main__": __main__()
diff -r 0a895e7c6d8e -r d5e8dbe8072e indel_realigner.xml
--- a/indel_realigner.xml Wed Sep 12 18:09:15 2012 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,492 +0,0 @@
-
- - perform local realignment
-
- gatk
- samtools
-
- gatk2_wrapper.py
- --max_jvm_heap_fraction "1"
- --stdout "${output_log}"
- -d "-I" "${reference_source.input_bam}" "${reference_source.input_bam.ext}" "gatk_input"
- #if str( $reference_source.input_bam.metadata.bam_index ) != "None":
- -d "" "${reference_source.input_bam.metadata.bam_index}" "bam_index" "gatk_input" ##hardcode galaxy ext type as bam_index
- #end if
- -p 'java
- -jar "/data/galaxy/galaxy3/tool-data/shared/jars/gatk2/GenomeAnalysisTK.jar"
- -T "IndelRealigner"
- -o "${output_bam}"
- -et "NO_ET" -K "/data/galaxy/galaxy3/tool-data/shared/jars/gatk2/gatk2_key_file" ##ET no phone home
- ##--num_threads 4 ##hard coded, for now
- ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
- #if $reference_source.reference_source_selector != "history":
- -R "${reference_source.ref_file.fields.path}"
- #end if
- -LOD "${lod_threshold}"
- ${knowns_only}
- '
-
- #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
- #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
- -d "-known:${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]}"
- #end for
-
- ##start standard gatk options
- #if $gatk_param_type.gatk_param_type_selector == "advanced":
- #for $pedigree in $gatk_param_type.pedigree:
- -p '--pedigree "${pedigree.pedigree_file}"'
- #end for
- #for $pedigree_string in $gatk_param_type.pedigree_string_repeat:
- -p '--pedigreeString "${pedigree_string.pedigree_string}"'
- #end for
- -p '--pedigreeValidationType "${gatk_param_type.pedigree_validation_type}"'
- #for $read_filter in $gatk_param_type.read_filter:
- -p '--read_filter "${read_filter.read_filter_type.read_filter_type_selector}"
- ###raise Exception( str( dir( $read_filter ) ) )
- #for $name, $param in $read_filter.read_filter_type.iteritems():
- #if $name not in [ "__current_case__", "read_filter_type_selector" ]:
- #if hasattr( $param.input, 'truevalue' ):
- ${param}
- #else:
- --${name} "${param}"
- #end if
- #end if
- #end for
- '
- #end for
- #for $interval_count, $input_intervals in enumerate( $gatk_param_type.input_interval_repeat ):
- -d "--intervals" "${input_intervals.input_intervals}" "${input_intervals.input_intervals.ext}" "input_intervals_${interval_count}"
- #end for
-
- #for $interval_count, $input_intervals in enumerate( $gatk_param_type.input_exclude_interval_repeat ):
- -d "--excludeIntervals" "${input_intervals.input_exclude_intervals}" "${input_intervals.input_exclude_intervals.ext}" "input_exlude_intervals_${interval_count}"
- #end for
-
- -p '--interval_set_rule "${gatk_param_type.interval_set_rule}"'
-
- -p '--downsampling_type "${gatk_param_type.downsampling_type.downsampling_type_selector}"'
- #if str( $gatk_param_type.downsampling_type.downsampling_type_selector ) != "NONE":
- -p '--${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_type_selector} "${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_value}"'
- #end if
- -p '
- --baq "${gatk_param_type.baq}"
- --baqGapOpenPenalty "${gatk_param_type.baq_gap_open_penalty}"
- ${gatk_param_type.use_original_qualities}
- --defaultBaseQualities "${gatk_param_type.default_base_qualities}"
- --validation_strictness "${gatk_param_type.validation_strictness}"
- --interval_merging "${gatk_param_type.interval_merging}"
- ${gatk_param_type.disable_experimental_low_memory_sharding}
- ${gatk_param_type.non_deterministic_random_seed}
- '
- #for $rg_black_list_count, $rg_black_list in enumerate( $gatk_param_type.read_group_black_list_repeat ):
- #if $rg_black_list.read_group_black_list_type.read_group_black_list_type_selector == "file":
- -d "--read_group_black_list" "${rg_black_list.read_group_black_list_type.read_group_black_list}" "txt" "input_read_group_black_list_${rg_black_list_count}"
- #else
- -p '--read_group_black_list "${rg_black_list.read_group_black_list_type.read_group_black_list}"'
- #end if
- #end for
- #end if
- #if $reference_source.reference_source_selector == "history":
- -d "-R" "${reference_source.ref_file}" "${reference_source.ref_file.ext}" "gatk_input"
- #end if
- ##end standard gatk options
- ##start analysis specific options
- -d "-targetIntervals" "${target_intervals}" "${target_intervals.ext}" "gatk_target_intervals"
- -p '
- --disable_bam_indexing
- '
- #if $analysis_param_type.analysis_param_type_selector == "advanced":
- -p '
- --entropyThreshold "${analysis_param_type.entropy_threshold}"
- ${analysis_param_type.simplify_bam}
- --consensusDeterminationModel "${analysis_param_type.consensus_determination_model}"
- --maxIsizeForMovement "${analysis_param_type.max_insert_size_for_movement}"
- --maxPositionalMoveAllowed "${analysis_param_type.max_positional_move_allowed}"
- --maxConsensuses "${analysis_param_type.max_consensuses}"
- --maxReadsForConsensuses "${analysis_param_type.max_reads_for_consensuses}"
- --maxReadsForRealignment "${analysis_param_type.max_reads_for_realignment}"
- ${analysis_param_type.no_original_alignment_tags}
- '
- #end if
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-**What it does**
-
-Performs local realignment of reads based on misalignments due to the presence of indels. Unlike most mappers, this walker uses the full alignment context to determine whether an appropriate alternate reference (i.e. indel) exists and updates SAMRecords accordingly.
-
-For more information on local realignment around indels using the GATK, see this `tool specific page <http://www.broadinstitute.org/gsa/wiki/index.php/Local_realignment_around_indels>`_.
-
-To learn about best practices for variant detection using GATK, see this `overview <http://www.broadinstitute.org/gsa/wiki/index.php/Best_Practice_Variant_Detection_with_the_GATK_v3>`_.
-
-If you encounter errors, please view the `GATK FAQ <http://www.broadinstitute.org/gsa/wiki/index.php/Frequently_Asked_Questions>`_.
-
-------
-
-**Inputs**
-
-GenomeAnalysisTK: IndelRealigner accepts an aligned BAM and a list of intervals to realign as input files.
-
-
-**Outputs**
-
-The output is in the BAM format.
-
-
-Go `here <http://www.broadinstitute.org/gsa/wiki/index.php/Input_files_for_the_GATK>`_ for details on GATK file formats.
-
--------
-
-**Settings**::
-
- targetIntervals intervals file output from RealignerTargetCreator
- LODThresholdForCleaning LOD threshold above which the cleaner will clean
- entropyThreshold percentage of mismatches at a locus to be considered having high entropy
- out Output bam
- bam_compression Compression level to use for writing BAM files
- disable_bam_indexing Turn off on-the-fly creation of indices for output BAM files.
- simplifyBAM If provided, output BAM files will be simplified to include just key reads for downstream variation discovery analyses (removing duplicates, PF-, non-primary reads), as well stripping all extended tags from the kept reads except the read group identifier
- useOnlyKnownIndels Don't run 'Smith-Waterman' to generate alternate consenses; use only known indels provided as RODs for constructing the alternate references.
- maxReadsInMemory max reads allowed to be kept in memory at a time by the SAMFileWriter. Keep it low to minimize memory consumption (but the tool may skip realignment on regions with too much coverage. If it is too low, it may generate errors during realignment); keep it high to maximize realignment (but make sure to give Java enough memory).
- maxIsizeForMovement maximum insert size of read pairs that we attempt to realign
- maxPositionalMoveAllowed maximum positional move in basepairs that a read can be adjusted during realignment
- maxConsensuses max alternate consensuses to try (necessary to improve performance in deep coverage)
- maxReadsForConsensuses max reads used for finding the alternate consensuses (necessary to improve performance in deep coverage)
- maxReadsForRealignment max reads allowed at an interval for realignment; if this value is exceeded, realignment is not attempted and the reads are passed to the output file(s) as-is
- noOriginalAlignmentTags Don't output the original cigar or alignment start tags for each realigned read in the output bam.
-
-------
-
-**Citation**
-
-For the underlying tool, please cite `DePristo MA, Banks E, Poplin R, Garimella KV, Maguire JR, Hartl C, Philippakis AA, del Angel G, Rivas MA, Hanna M, McKenna A, Fennell TJ, Kernytsky AM, Sivachenko AY, Cibulskis K, Gabriel SB, Altshuler D, Daly MJ. A framework for variation discovery and genotyping using next-generation DNA sequencing data. Nat Genet. 2011 May;43(5):491-8. <http://www.ncbi.nlm.nih.gov/pubmed/21478889>`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
-
-
-
diff -r 0a895e7c6d8e -r d5e8dbe8072e unified_genotyper.xml
--- a/unified_genotyper.xml Wed Sep 12 18:09:15 2012 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,611 +0,0 @@
-
- SNP and indel caller
-
- gatk
- samtools
-
- gatk2_wrapper.py
- --max_jvm_heap_fraction "1"
- --stdout "${output_log}"
- #for $i, $input_bam in enumerate( $reference_source.input_bams ):
- -d "-I" "${input_bam.input_bam}" "${input_bam.input_bam.ext}" "gatk_input_${i}"
- #if str( $input_bam.input_bam.metadata.bam_index ) != "None":
- -d "" "${input_bam.input_bam.metadata.bam_index}" "bam_index" "gatk_input_${i}" ##hardcode galaxy ext type as bam_index
- #end if
- #end for
- -p 'java
- -jar "/data/galaxy/galaxy3/tool-data/shared/jars/gatk2/GenomeAnalysisTK.jar"
- -T "UnifiedGenotyper"
- --num_threads 4 ##hard coded, for now
- --out "${output_vcf}"
- --metrics_file "${output_metrics}"
- -et "NO_ET" -K "/data/galaxy/galaxy3/tool-data/shared/jars/gatk2/gatk2_key_file" ##ET no phone home
- ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
- #if $reference_source.reference_source_selector != "history":
- -R "${reference_source.ref_file.fields.path}"
- #end if
- --genotype_likelihoods_model "${genotype_likelihoods_model}"
- --standard_min_confidence_threshold_for_calling "${standard_min_confidence_threshold_for_calling}"
- --standard_min_confidence_threshold_for_emitting "${standard_min_confidence_threshold_for_emitting}"
- '
- #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
- #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
- -d "--dbsnp:${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]}"
- #end for
-
- ##start standard gatk options
- #if $gatk_param_type.gatk_param_type_selector == "advanced":
- #for $pedigree in $gatk_param_type.pedigree:
- -p '--pedigree "${pedigree.pedigree_file}"'
- #end for
- #for $pedigree_string in $gatk_param_type.pedigree_string_repeat:
- -p '--pedigreeString "${pedigree_string.pedigree_string}"'
- #end for
- -p '--pedigreeValidationType "${gatk_param_type.pedigree_validation_type}"'
- #for $read_filter in $gatk_param_type.read_filter:
- -p '--read_filter "${read_filter.read_filter_type.read_filter_type_selector}"
- ###raise Exception( str( dir( $read_filter ) ) )
- #for $name, $param in $read_filter.read_filter_type.iteritems():
- #if $name not in [ "__current_case__", "read_filter_type_selector" ]:
- #if hasattr( $param.input, 'truevalue' ):
- ${param}
- #else:
- --${name} "${param}"
- #end if
- #end if
- #end for
- '
- #end for
- #for $interval_count, $input_intervals in enumerate( $gatk_param_type.input_interval_repeat ):
- -d "--intervals" "${input_intervals.input_intervals}" "${input_intervals.input_intervals.ext}" "input_intervals_${interval_count}"
- #end for
-
- #for $interval_count, $input_intervals in enumerate( $gatk_param_type.input_exclude_interval_repeat ):
- -d "--excludeIntervals" "${input_intervals.input_exclude_intervals}" "${input_intervals.input_exclude_intervals.ext}" "input_exlude_intervals_${interval_count}"
- #end for
-
- -p '--interval_set_rule "${gatk_param_type.interval_set_rule}"'
-
- -p '--downsampling_type "${gatk_param_type.downsampling_type.downsampling_type_selector}"'
- #if str( $gatk_param_type.downsampling_type.downsampling_type_selector ) != "NONE":
- -p '--${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_type_selector} "${gatk_param_type.downsampling_type.downsample_to_type.downsample_to_value}"'
- #end if
- -p '
- --baq "${gatk_param_type.baq}"
- --baqGapOpenPenalty "${gatk_param_type.baq_gap_open_penalty}"
- ${gatk_param_type.use_original_qualities}
- --defaultBaseQualities "${gatk_param_type.default_base_qualities}"
- --validation_strictness "${gatk_param_type.validation_strictness}"
- --interval_merging "${gatk_param_type.interval_merging}"
- ${gatk_param_type.disable_experimental_low_memory_sharding}
- ${gatk_param_type.non_deterministic_random_seed}
- '
- #for $rg_black_list_count, $rg_black_list in enumerate( $gatk_param_type.read_group_black_list_repeat ):
- #if $rg_black_list.read_group_black_list_type.read_group_black_list_type_selector == "file":
- -d "--read_group_black_list" "${rg_black_list.read_group_black_list_type.read_group_black_list}" "txt" "input_read_group_black_list_${rg_black_list_count}"
- #else
- -p '--read_group_black_list "${rg_black_list.read_group_black_list_type.read_group_black_list}"'
- #end if
- #end for
- #end if
-
- #if $reference_source.reference_source_selector == "history":
- -d "-R" "${reference_source.ref_file}" "${reference_source.ref_file.ext}" "gatk_input"
- #end if
- ##end standard gatk options
- ##start analysis specific options
- #if $analysis_param_type.analysis_param_type_selector == "advanced":
- -p '
- --p_nonref_model "${analysis_param_type.p_nonref_model}"
- --heterozygosity "${analysis_param_type.heterozygosity}"
- --pcr_error_rate "${analysis_param_type.pcr_error_rate}"
- --genotyping_mode "${analysis_param_type.genotyping_mode_type.genotyping_mode}"
- #if str( $analysis_param_type.genotyping_mode_type.genotyping_mode ) == 'GENOTYPE_GIVEN_ALLELES':
- --alleles "${analysis_param_type.genotyping_mode_type.input_alleles_rod}"
- #end if
- --output_mode "${analysis_param_type.output_mode}"
- ${analysis_param_type.compute_SLOD}
- --min_base_quality_score "${analysis_param_type.min_base_quality_score}"
- --max_deletion_fraction "${analysis_param_type.max_deletion_fraction}"
- --max_alternate_alleles "${analysis_param_type.max_alternate_alleles}"
- --min_indel_count_for_genotyping "${analysis_param_type.min_indel_count_for_genotyping}"
- --indel_heterozygosity "${analysis_param_type.indel_heterozygosity}"
- --indelGapContinuationPenalty "${analysis_param_type.indelGapContinuationPenalty}"
- --indelGapOpenPenalty "${analysis_param_type.indelGapOpenPenalty}"
- --indelHaplotypeSize "${analysis_param_type.indelHaplotypeSize}"
- ${analysis_param_type.doContextDependentGapPenalties}
- #if str( $analysis_param_type.annotation ) != "None":
- #for $annotation in str( $analysis_param_type.annotation.fields.gatk_value ).split( ','):
- --annotation "${annotation}"
- #end for
- #end if
- #for $additional_annotation in $analysis_param_type.additional_annotations:
- --annotation "${additional_annotation.additional_annotation_name}"
- #end for
- #if str( $analysis_param_type.group ) != "None":
- #for $group in str( $analysis_param_type.group ).split( ','):
- --group "${group}"
- #end for
- #end if
- #if str( $analysis_param_type.exclude_annotations ) != "None":
- #for $annotation in str( $analysis_param_type.exclude_annotations.fields.gatk_value ).split( ','):
- --excludeAnnotation "${annotation}"
- #end for
- #end if
- ${analysis_param_type.multiallelic}
- '
-## #if str( $analysis_param_type.snpEff_rod_bind_type.snpEff_rod_bind_type_selector ) == 'set_snpEff':
-## -p '--annotation "SnpEff"'
-## -d "--snpEffFile:${analysis_param_type.snpEff_rod_bind_type.snpEff_rod_name},%(file_type)s" "${analysis_param_type.snpEff_rod_bind_type.snpEff_input_rod}" "${analysis_param_type.snpEff_rod_bind_type.snpEff_input_rod.ext}" "input_snpEff_${analysis_param_type.snpEff_rod_bind_type.snpEff_rod_name}"
-## #else:
-## -p '--excludeAnnotation "SnpEff"'
-## #end if
- #end if
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-**What it does**
-
-A variant caller which unifies the approaches of several disparate callers. Works for single-sample and multi-sample data. The user can choose from several different incorporated calculation models.
-
-For more information on the GATK Unified Genotyper, see this `tool specific page <http://www.broadinstitute.org/gsa/wiki/index.php/Unified_genotyper>`_.
-
-To learn about best practices for variant detection using GATK, see this `overview <http://www.broadinstitute.org/gsa/wiki/index.php/Best_Practice_Variant_Detection_with_the_GATK_v3>`_.
-
-If you encounter errors, please view the `GATK FAQ <http://www.broadinstitute.org/gsa/wiki/index.php/Frequently_Asked_Questions>`_.
-
-------
-
-**Inputs**
-
-GenomeAnalysisTK: UnifiedGenotyper accepts an aligned BAM input file.
-
-
-**Outputs**
-
-The output is in VCF format.
-
-
-Go `here <http://www.broadinstitute.org/gsa/wiki/index.php/Input_files_for_the_GATK>`_ for details on GATK file formats.
-
--------
-
-**Settings**::
-
- genotype_likelihoods_model Genotype likelihoods calculation model to employ -- BOTH is the default option, while INDEL is also available for calling indels and SNP is available for calling SNPs only (SNP|INDEL|BOTH)
- p_nonref_model Non-reference probability calculation model to employ -- EXACT is the default option, while GRID_SEARCH is also available. (EXACT|GRID_SEARCH)
- heterozygosity Heterozygosity value used to compute prior likelihoods for any locus
- pcr_error_rate The PCR error rate to be used for computing fragment-based likelihoods
- genotyping_mode Should we output confident genotypes (i.e. including ref calls) or just the variants? (DISCOVERY|GENOTYPE_GIVEN_ALLELES)
- output_mode Should we output confident genotypes (i.e. including ref calls) or just the variants? (EMIT_VARIANTS_ONLY|EMIT_ALL_CONFIDENT_SITES|EMIT_ALL_SITES)
- standard_min_confidence_threshold_for_calling The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be called
- standard_min_confidence_threshold_for_emitting The minimum phred-scaled confidence threshold at which variants not at 'trigger' track sites should be emitted (and filtered if less than the calling threshold)
- noSLOD If provided, we will not calculate the SLOD
- min_base_quality_score Minimum base quality required to consider a base for calling
- max_deletion_fraction Maximum fraction of reads with deletions spanning this locus for it to be callable [to disable, set to < 0 or > 1; default:0.05]
- min_indel_count_for_genotyping Minimum number of consensus indels required to trigger genotyping run
- indel_heterozygosity Heterozygosity for indel calling
- indelGapContinuationPenalty Indel gap continuation penalty
- indelGapOpenPenalty Indel gap open penalty
- indelHaplotypeSize Indel haplotype size
- doContextDependentGapPenalties Vary gap penalties by context
- indel_recal_file Filename for the input covariates table recalibration .csv file - EXPERIMENTAL, DO NO USE
- indelDebug Output indel debug info
- out File to which variants should be written
- annotation One or more specific annotations to apply to variant calls
- group One or more classes/groups of annotations to apply to variant calls
-
-------
-
-**Citation**
-
-For the underlying tool, please cite `DePristo MA, Banks E, Poplin R, Garimella KV, Maguire JR, Hartl C, Philippakis AA, del Angel G, Rivas MA, Hanna M, McKenna A, Fennell TJ, Kernytsky AM, Sivachenko AY, Cibulskis K, Gabriel SB, Altshuler D, Daly MJ. A framework for variation discovery and genotyping using next-generation DNA sequencing data. Nat Genet. 2011 May;43(5):491-8. <http://www.ncbi.nlm.nih.gov/pubmed/21478889>`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
-
-
-