Mercurial > repos > iuc > gemini_annotate
changeset 3:f052e48b4783 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit e4dce25c8dbeffca62c402f74ca733ddc7a6091b
| author | iuc |
|---|---|
| date | Fri, 07 Dec 2018 12:51:48 -0500 |
| parents | 54f607ff195b |
| children | 80024600788f |
| files | gemini_annotate.xml gemini_macros.xml repository_dependencies.xml tool-data/gemini_databases.loc.sample tool-data/gemini_versioned_databases.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml |
| diffstat | 7 files changed, 65 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/gemini_annotate.xml Tue Feb 16 05:56:10 2016 -0500 +++ b/gemini_annotate.xml Fri Dec 07 12:51:48 2018 -0500 @@ -1,4 +1,4 @@ -<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.0"> +<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.2"> <description>adding your own custom annotations</description> <macros> <import>gemini_macros.xml</import> @@ -10,11 +10,15 @@ <command> <![CDATA[ - bgzip -c "$annotate_source" > tabixed.gz && - tabix -p bed tabixed.gz && + ## For GEMINI to work correctly, tabixed file must have form [name].[bed|vcf].gz + #set $tabixed_file = "tabixed.%s.gz" % $annotate_source.ext + bgzip -c "$annotate_source" > $tabixed_file && + tabix -p "$annotate_source.ext" $tabixed_file && + + @PROVIDE_ANNO_DATA@ gemini @BINARY@ - -f tabixed.gz + -f $tabixed_file -c $column_name -a $a.a_selector #if $a.a_selector == 'extract': @@ -30,7 +34,7 @@ </command> <inputs> <expand macro="infile" /> - <param name="annotate_source" type="data" format="bed" label="File containing the annotations in BED format" help="(-f)"/> + <param name="annotate_source" type="data" format="vcf,bed" label="File containing the annotations in BED/VCF format" help="(-f)"/> <param name="column_name" type="text" value="" label="The name of the column to be added to the variant table" @@ -45,12 +49,12 @@ <param name="a_selector" type="select" label="How should the annotation file be used?" help="(-a)"> <option value="boolean">Did a variant overlap a region or not? (boolean)</option> <option value="count">How many regions did a variant overlap? (count)</option> - <option value="extract" selected="True">Extract specific values from a BED file. (extract)</option> + <option value="extract" selected="True">Extract specific values from a BED/VCF file. (extract)</option> </param> <when value="extract"> - <param name="column_extracts" label="Column to extract information from for list annotations" - type="data_column" data_ref="annotate_source" force_select="true" help="(-e)"/> + <param name="column_extracts" label="Column to extract information from for list annotations. For BED files, this is the column number. For VCF files, this is the name of the INFO field." + type="text" force_select="true" help="(-e)"/> <param name="column_type" type="select" label="What data type(s) should be used to represent the new values in the database?"
--- a/gemini_macros.xml Tue Feb 16 05:56:10 2016 -0500 +++ b/gemini_macros.xml Fri Dec 07 12:51:48 2018 -0500 @@ -1,7 +1,15 @@ <macros> + <!-- gemini version to be used --> + <token name="@VERSION@">0.18.1</token> + <!-- minimal annotation files version required by this version of gemini --> + <token name="@DB_VERSION@">181</token> + <xml name="requirements"> <requirements> - <requirement type="package" version="0.18.1">gemini</requirement> + <requirement type="package" version="@VERSION@">gemini</requirement> + <requirement type="package" version="0.2.6">tabix</requirement> + <!-- for conda useage --> + <!--requirement type="package" version="1.3.1">htslib</requirement--> <yield /> </requirements> </xml> @@ -20,9 +28,10 @@ </xml> <xml name="annotation_dir"> - <param name="annotation_databases" type="select" optional="True" label="Choose a gemini annotation database"> - <options from_data_table="gemini_databases"> + <param name="annotation_databases" type="select" label="Choose a gemini annotation database"> + <options from_data_table="gemini_versioned_databases"> <filter type="sort_by" column="0" /> + <filter type="static_value" column="2" value="@DB_VERSION@" /> </options> </param> </xml> @@ -62,6 +71,7 @@ <option value="impact_severity">impact_severity</option> <option value="max_aaf_all">alternative allele frequency</option> </param> + <param name="extra_cols" type="text" label="Additional columns." help="Separate by whitespace"/> </when> </conditional> </xml> @@ -84,14 +94,44 @@ <xml name="sanitize_query"> <sanitizer invalid_char=""> - <valid initial="string.printable"/> + <valid initial="string.printable"> + <remove value="'" /> + </valid> + <mapping initial="none"> + <add source="'" target="'"'"'" /> + </mapping> </sanitizer> </xml> + <token name="@PROVIDE_ANNO_DATA@"><![CDATA[ + mkdir gemini && + ln -s "${annotation_databases.fields.path}/gemini/data" gemini/data && + export GEMINI_CONFIG="${annotation_databases.fields.path}" && + ]]></token> + + <token name="@MULTILN_SQL_EXPR_TO_CMDLN@"> + #set $sql_expr = str($multiline_sql_expr).strip() + #if str($sql_expr): + #set $sql_expr = $sql_expr.replace('\r\n', '\n') + #set $sql_expr = $sql_expr.replace('\r', '\n') + #set $sql_expr = $sql_expr.replace('\\\n', ' ') + $cmdln_param '$sql_expr' + #end if + </token> + <token name="@CMDLN_SQL_FILTER_FILTER_OPTION@"> #if str($filter.filter_selector) == 'yes' and $filter.filter: - #import pipes - --filter ${ pipes.quote( str( $filter.filter ) ) or "''" } + --filter '${ str( $filter.filter ) }' + #end if + </token> + + <token name="@COLUMN_SELECT@"> + #if $report.report_selector != 'all': + --columns "${report.columns} + #if str($report.extra_cols).strip() + #echo ','+','.join(str($report.extra_cols).split()) + #end if + " #end if </token> @@ -125,7 +165,6 @@ <xml name="gt_pl_max"> <param name="gt_pl_max" type="integer" value="-1" min="-1" label="The maximum phred-scaled genotype likelihod (PL) allowed for each sample in a family" help="default: -1 (not set) (--gt-pl-max)" /> </xml> - <token name="@VERSION@">0.18.1</token> <xml name="citations"> <citations>
--- a/repository_dependencies.xml Tue Feb 16 05:56:10 2016 -0500 +++ b/repository_dependencies.xml Fri Dec 07 12:51:48 2018 -0500 @@ -1,4 +1,4 @@ <?xml version="1.0"?> <repositories description="This requires the GEMINI data manager definition to install all required annotation databases."> - <repository changeset_revision="eb54ffdea8a0" name="data_manager_gemini_database_downloader" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> + <repository changeset_revision="8885ab36d6b5" name="data_manager_gemini_database_downloader" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> </repositories>
--- a/tool-data/gemini_databases.loc.sample Tue Feb 16 05:56:10 2016 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -## GEMINI databases -#Version dbkey Description Path -#08_08_2014 hg19 Database (08-08-2014) /path/to/data
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/gemini_versioned_databases.loc.sample Fri Dec 07 12:51:48 2018 -0500 @@ -0,0 +1,3 @@ +## GEMINI versioned databases +#DownloadDate dbkey DBversion Description Path +#2018-07-08 hg19 181 GEMINI annotations (2018-07-08 snapshot) /path/to/data
--- a/tool_data_table_conf.xml.sample Tue Feb 16 05:56:10 2016 -0500 +++ b/tool_data_table_conf.xml.sample Fri Dec 07 12:51:48 2018 -0500 @@ -1,7 +1,7 @@ <tables> - <table name="gemini_databases" comment_char="#"> - <columns>value, dbkey, name, path</columns> - <file path="tool-data/gemini_databases.loc" /> + <table name="gemini_versioned_databases" comment_char="#" allow_duplicate_entries="False"> + <columns>value, dbkey, version, name, path</columns> + <file path="tool-data/gemini_versioned_databases.loc" /> </table> </tables>
--- a/tool_dependencies.xml Tue Feb 16 05:56:10 2016 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="gemini" version="0.18.1"> - <repository changeset_revision="13ce32ffda3a" name="package_gemini_0_18_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency>
