/tools/gatk/realigner_target_creator.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 165 lines · 145 code · 20 blank · 0 comment · 0 complexity · 0daf04f37014a978b8dd20549cd01e47 MD5 · raw file

  1. <tool id="gatk_realigner_target_creator" name="Realigner Target Creator" version="0.0.4">
  2. <description>for use in local realignment</description>
  3. <requirements>
  4. <requirement type="package" version="1.3">gatk</requirement>
  5. <requirement type="package">samtools</requirement>
  6. </requirements>
  7. <macros>
  8. <import>gatk_macros.xml</import>
  9. </macros>
  10. <command interpreter="python">gatk_wrapper.py
  11. --max_jvm_heap_fraction "1"
  12. --stdout "${output_log}"
  13. -d "-I" "${reference_source.input_bam}" "${reference_source.input_bam.ext}" "gatk_input"
  14. #if str( $reference_source.input_bam.metadata.bam_index ) != "None":
  15. -d "" "${reference_source.input_bam.metadata.bam_index}" "bam_index" "gatk_input" ##hardcode galaxy ext type as bam_index
  16. #end if
  17. -p 'java
  18. -jar "${GALAXY_DATA_INDEX_DIR}/shared/jars/gatk/GenomeAnalysisTK.jar"
  19. -T "RealignerTargetCreator"
  20. -o "${output_interval}"
  21. -et "NO_ET" ##ET no phone home
  22. --num_threads 4 ##hard coded, for now
  23. ##-log "${output_log}" ##don't use this to log to file, instead directly capture stdout
  24. #if $reference_source.reference_source_selector != "history":
  25. -R "${reference_source.ref_file.fields.path}"
  26. #end if
  27. '
  28. #set $rod_binding_names = dict()
  29. #for $rod_binding in $rod_bind:
  30. #if str( $rod_binding.rod_bind_type.rod_bind_type_selector ) == 'custom':
  31. #set $rod_bind_name = $rod_binding.rod_bind_type.custom_rod_name
  32. #else
  33. #set $rod_bind_name = $rod_binding.rod_bind_type.rod_bind_type_selector
  34. #end if
  35. #set $rod_binding_names[$rod_bind_name] = $rod_binding_names.get( $rod_bind_name, -1 ) + 1
  36. -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]}"
  37. #end for
  38. #include source=$standard_gatk_options#
  39. ##start analysis specific options
  40. #if $analysis_param_type.analysis_param_type_selector == "advanced":
  41. -p '
  42. --minReadsAtLocus "${analysis_param_type.minReadsAtLocus}"
  43. --windowSize "${analysis_param_type.windowSize}"
  44. --mismatchFraction "${analysis_param_type.mismatchFraction}"
  45. --maxIntervalSize "${analysis_param_type.maxIntervalSize}"
  46. '
  47. #end if
  48. </command>
  49. <inputs>
  50. <conditional name="reference_source">
  51. <expand macro="reference_source_selector_param" />
  52. <when value="cached">
  53. <param name="input_bam" type="data" format="bam" label="BAM file" help="-I,--input_file &amp;lt;input_file&amp;gt;">
  54. <validator type="unspecified_build" />
  55. <validator type="dataset_metadata_in_data_table" table_name="gatk_picard_indexes" metadata_name="dbkey" metadata_column="dbkey" message="Sequences are not currently available for the specified build." /> <!-- fixme!!! this needs to be a select -->
  56. </param>
  57. <param name="ref_file" type="select" label="Using reference genome" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;" >
  58. <options from_data_table="gatk_picard_indexes">
  59. <filter type="data_meta" key="dbkey" ref="input_bam" column="dbkey"/>
  60. </options>
  61. <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
  62. </param>
  63. </when>
  64. <when value="history">
  65. <param name="input_bam" type="data" format="bam" label="BAM file" help="-I,--input_file &amp;lt;input_file&amp;gt;" />
  66. <param name="ref_file" type="data" format="fasta" label="Using reference file" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;">
  67. <options>
  68. <filter type="data_meta" key="dbkey" ref="input_bam" />
  69. </options>
  70. </param>
  71. </when>
  72. </conditional>
  73. <repeat name="rod_bind" title="Binding for reference-ordered data" help="-known,--known &amp;lt;known&amp;gt;">
  74. <conditional name="rod_bind_type">
  75. <param name="rod_bind_type_selector" type="select" label="Binding Type">
  76. <option value="dbsnp" selected="True">dbSNP</option>
  77. <option value="snps">SNPs</option>
  78. <option value="indels">INDELs</option>
  79. <option value="custom">Custom</option>
  80. </param>
  81. <when value="dbsnp">
  82. <param name="input_rod" type="data" format="vcf" label="ROD file" />
  83. </when>
  84. <when value="snps">
  85. <param name="input_rod" type="data" format="vcf" label="ROD file" />
  86. </when>
  87. <when value="indels">
  88. <param name="input_rod" type="data" format="vcf" label="ROD file" />
  89. </when>
  90. <when value="custom">
  91. <param name="custom_rod_name" type="text" value="Unknown" label="ROD Name"/>
  92. <param name="input_rod" type="data" format="vcf" label="ROD file" />
  93. </when>
  94. </conditional>
  95. </repeat>
  96. <expand macro="gatk_param_type_conditional" />
  97. <expand macro="analysis_type_conditional">
  98. <param name="windowSize" type="integer" value="10" label="Window size for calculating entropy or SNP clusters (windowSize)" help="-window,--windowSize &amp;lt;windowSize&amp;gt;" />
  99. <param name="mismatchFraction" type="float" value="0.15" label="Fraction of base qualities needing to mismatch for a position to have high entropy (mismatchFraction)" help="to disable set to &lt;= 0 or &gt; 1 (-mismatch,--mismatchFraction &amp;lt;mismatchFraction&amp;gt;)"/>
  100. <param name="minReadsAtLocus" type="integer" value="4" label="Minimum reads at a locus to enable using the entropy calculation (minReadsAtLocus)" help="-minReads,--minReadsAtLocus &amp;lt;minReadsAtLocus&amp;gt;" />
  101. <param name="maxIntervalSize" type="integer" value="500" label="Maximum interval size" help="-maxInterval,--maxIntervalSize &amp;lt;maxIntervalSize&amp;gt;" />
  102. </expand>
  103. </inputs>
  104. <outputs>
  105. <data format="gatk_interval" name="output_interval" label="${tool.name} on ${on_string} (GATK intervals)" />
  106. <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
  107. </outputs>
  108. <tests>
  109. <test>
  110. <param name="reference_source_selector" value="history" />
  111. <param name="ref_file" value="phiX.fasta" ftype="fasta" />
  112. <param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" />
  113. <param name="rod_bind_type_selector" value="dbsnp" />
  114. <param name="input_rod" value="gatk/fake_phiX_variant_locations.vcf" ftype="vcf" />
  115. <param name="gatk_param_type_selector" value="basic" />
  116. <param name="analysis_param_type_selector" value="advanced" />
  117. <param name="windowSize" value="10" />
  118. <param name="mismatchFraction" value="0.15" />
  119. <param name="minReadsAtLocus" value="4" />
  120. <param name="maxIntervalSize" value="500" />
  121. <output name="output_interval" file="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.gatk_interval" />
  122. <output name="output_log" file="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.log.contains" compare="contains"/>
  123. </test>
  124. </tests>
  125. <help>
  126. **What it does**
  127. Emits intervals for the Local Indel Realigner to target for cleaning. Ignores 454 reads, MQ0 reads, and reads with consecutive indel operators in the CIGAR string.
  128. For more information on local realignment around indels using the GATK, see this `tool specific page &lt;http://www.broadinstitute.org/gsa/wiki/index.php/Local_realignment_around_indels&gt;`_.
  129. To learn about best practices for variant detection using GATK, see this `overview &lt;http://www.broadinstitute.org/gsa/wiki/index.php/Best_Practice_Variant_Detection_with_the_GATK_v3&gt;`_.
  130. If you encounter errors, please view the `GATK FAQ &lt;http://www.broadinstitute.org/gsa/wiki/index.php/Frequently_Asked_Questions&gt;`_.
  131. ------
  132. **Inputs**
  133. GenomeAnalysisTK: RealignerTargetCreator accepts an aligned BAM input file.
  134. **Outputs**
  135. The output is in GATK Interval format.
  136. Go `here &lt;http://www.broadinstitute.org/gsa/wiki/index.php/Input_files_for_the_GATK&gt;`_ for details on GATK file formats.
  137. -------
  138. **Settings**::
  139. windowSize window size for calculating entropy or SNP clusters
  140. mismatchFraction fraction of base qualities needing to mismatch for a position to have high entropy; to disable set to &lt;= 0 or &gt; 1
  141. minReadsAtLocus minimum reads at a locus to enable using the entropy calculation
  142. maxIntervalSize maximum interval size
  143. @CITATION_SECTION@
  144. </help>
  145. </tool>