Mercurial > repos > scisjnu123 > ngsap_vc
comparison ngsap-vc/gatk/generation/gatk.xsl @ 3:0d10255b5434 draft default tip
Uploaded
| author | scisjnu123 |
|---|---|
| date | Thu, 03 Oct 2019 10:42:15 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:2c7824a8d764 | 3:0d10255b5434 |
|---|---|
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
| 3 <xsl:output | |
| 4 method="xml" | |
| 5 encoding="utf-8" | |
| 6 indent="yes" | |
| 7 cdata-section-elements="script style" /> | |
| 8 | |
| 9 <xsl:template match="/"> | |
| 10 | |
| 11 <tool id="gatk" name="GATK" version="@VERSION@.d9"> | |
| 12 <description>tool collection Version @VERSION@</description> | |
| 13 | |
| 14 <macros> | |
| 15 <import>gatk_macros.xml</import> | |
| 16 <xsl:for-each select="analyses/analysis"> | |
| 17 <import><xsl:value-of select="macro_file" /></import> | |
| 18 </xsl:for-each> | |
| 19 </macros> | |
| 20 | |
| 21 <expand macro="requirements" /> | |
| 22 | |
| 23 <stdio> | |
| 24 <regex match="^INFO" level="log" /> | |
| 25 <regex match="^WARN" level="warning" /> | |
| 26 <regex match="Using .* implementation of PairHMM" level="warning" /> | |
| 27 <regex match="There is insufficient memory for the Java Runtime Environment to continue" level="fatal" /> | |
| 28 <regex match="^##### ERROR" level="fatal" /> | |
| 29 <exit_code range="1:" level="fatal"/> | |
| 30 </stdio> | |
| 31 | |
| 32 <command> | |
| 33 <xsl:text disable-output-escaping="yes"><![CDATA[ | |
| 34 ############################ | |
| 35 ## import analysis specific preprocessings by using cheetahs internal searchList | |
| 36 ## if not defined, ignore | |
| 37 ############################ | |
| 38 #if $analysis_type.analysis_type_selector + "Preprocessing" in vars()['SL'][2] | |
| 39 #set $analysisPreprocessing = vars()['SL'][2][$analysis_type.analysis_type_selector + "Preprocessing"] | |
| 40 #include source=$analysisPreprocessing | |
| 41 #end if | |
| 42 | |
| 43 ############################ | |
| 44 ## GATK tool unspecific options | |
| 45 ############################ | |
| 46 @GATK_EXEC@ | |
| 47 | |
| 48 --analysis_type ${analysis_type.analysis_type_selector} | |
| 49 --reference_sequence ${ref_file.fields.path} | |
| 50 | |
| 51 --log_to_file ${output_log} | |
| 52 | |
| 53 #if $cond_intervals.cond_intervals_enabled | |
| 54 #for $interval in $cond_intervals.intervals: | |
| 55 --intervals ${interval.L} | |
| 56 #end for | |
| 57 #end if | |
| 58 | |
| 59 #if $cond_BQSR.cond_BQSR_enabled | |
| 60 --BQSR $cond_BQSR.BQSR | |
| 61 #end if | |
| 62 | |
| 63 ############################ | |
| 64 ## import analysis specific options by using cheetahs internal searchList | |
| 65 ## if not defined throw raw python error until better idea | |
| 66 ############################ | |
| 67 #if $analysis_type.analysis_type_selector + "Options" in vars()['SL'][2] | |
| 68 #set $analysisOptions = vars()['SL'][2][$analysis_type.analysis_type_selector + "Options"] | |
| 69 #include source=$analysisOptions | |
| 70 #else | |
| 71 #set $analysisOptions = vars()['SL'][2][$analysis_type.analysis_type_selector + "Options"] | |
| 72 #end if | |
| 73 | |
| 74 ############################ | |
| 75 ## only put ERROR or FATAL log messages into stderr | |
| 76 ## but keep full log for printing into log file | |
| 77 ############################ | |
| 78 2>&1 | awk '\$1 != "INFO" && \$1 != "WARN"' >&2 | |
| 79 ]]></xsl:text> | |
| 80 </command> | |
| 81 | |
| 82 <inputs> | |
| 83 | |
| 84 <param name="ref_file" type="select" label="Using reference genome" help="-R,‑‑reference_sequence &lt;reference_sequence&gt;" > | |
| 85 <options from_data_table="picard_indexes"> | |
| 86 <!--filter type="data_meta" key="dbkey" ref="@TAG@_input" column="dbkey" /--> | |
| 87 </options> | |
| 88 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | |
| 89 </param> | |
| 90 | |
| 91 <conditional name="cond_intervals"> | |
| 92 <param name="cond_intervals_enabled" type="boolean" label="Select interval subset to operate on?" /> | |
| 93 <when value="true"> | |
| 94 <repeat name="intervals" title="genomic interval over which to operate" help="-L,‑‑intervals &lt;intervals&gt;"> | |
| 95 <param name="L" type="text" value="" /> | |
| 96 </repeat> | |
| 97 </when> | |
| 98 <when value="false" /> | |
| 99 </conditional> | |
| 100 | |
| 101 <conditional name="cond_BQSR"> | |
| 102 <param name="cond_BQSR_enabled" type="boolean" label="Select covariates for on-the-fly recalibration?" /> | |
| 103 <when value="true"> | |
| 104 <param name="BQSR" type="data" format="tabular" label="Input covariates table file for on-the-fly base quality score recalibration" help="-BQSR,‑‑BQSR &lt;BQSR&gt; intended primarily for use with BaseRecalibrator and PrintReads" /> | |
| 105 </when> | |
| 106 <when value="false" /> | |
| 107 </conditional> | |
| 108 | |
| 109 <conditional name="cond_threads"> | |
| 110 <param name="cond_threads_enabled" type="boolean" label="Set computational options (cpu, mem)?" /> | |
| 111 <when value="true"> | |
| 112 <param name="nt" type="integer" value="1" label="Number of data threads to allocate to this analysis" help="make sure, the option is available for the chosen tool" /> | |
| 113 <param name="nct" type="integer" value="1" label="Number of CPU threads to allocate per data thread" help="make sure, the option is available for the chosen tool" /> | |
| 114 <param name="mem" type="integer" value="0" label="Overwrite Memory in MB (0 = don't overwrite)" help="Overwrites all other defaults and might lead to crash the run. States mem per data thread" /> | |
| 115 </when> | |
| 116 <when value="false" /> | |
| 117 </conditional> | |
| 118 | |
| 119 <conditional name="analysis_type"> | |
| 120 <param name="analysis_type_selector" type="select" label="Analysis Type"> | |
| 121 <xsl:for-each select="analyses/analysis"> | |
| 122 <option value="{name}"><xsl:value-of select="name" /></option> | |
| 123 </xsl:for-each> | |
| 124 </param> | |
| 125 <xsl:for-each select="analyses/analysis"> | |
| 126 <when value="{name}"> | |
| 127 <!--xsl:choose> | |
| 128 <xsl:when test="input_type = 'bam'"> | |
| 129 <expand macro="macro_bam_input" tag="{tag}" /> | |
| 130 </xsl:when> | |
| 131 <xsl:when test="input_type = 'gvcf'"> | |
| 132 <expand macro="macro_gvcf_input" tag="{tag}" /> | |
| 133 </xsl:when> | |
| 134 </xsl:choose--> | |
| 135 <expand macro="{name}Parameters" tag="{tag}" /> | |
| 136 </when> | |
| 137 </xsl:for-each> | |
| 138 </conditional> | |
| 139 </inputs> | |
| 140 | |
| 141 <outputs> | |
| 142 <xsl:for-each select="analyses/analysis"> | |
| 143 <expand macro="{name}Output" tag="{tag}"> | |
| 144 <filter>analysis_type['analysis_type_selector'] == '<xsl:value-of select="name" />'</filter> | |
| 145 </expand> | |
| 146 </xsl:for-each> | |
| 147 <data format="txt" name="output_log" label="${{tool.name}} - ${{analysis_type.analysis_type_selector}} on ${{on_string}} (log)" /> | |
| 148 </outputs> | |
| 149 | |
| 150 <expand macro="macro_tests" /> | |
| 151 | |
| 152 <citations> | |
| 153 <citation type="doi">10.1101/gr.107524.110</citation> | |
| 154 <citation type="doi">10.1038/ng.806</citation> | |
| 155 <citation type="doi">10.1002/0471250953.bi1110s43</citation> | |
| 156 </citations> | |
| 157 </tool> | |
| 158 | |
| 159 </xsl:template> | |
| 160 </xsl:stylesheet> | |
| 161 | |
| 162 |
