comparison gemini_db_info.xml @ 5:bc8b01d1b496 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit 62ed732cba355e695181924a8ed4cce49ca21c59
author iuc
date Fri, 11 Jan 2019 17:37:04 -0500
parents f3cc64057b4e
children c2a413e47fe9
comparison
equal deleted inserted replaced
4:f3cc64057b4e 5:bc8b01d1b496
1 <tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.1"> 1 <tool id="gemini_db_info" name="GEMINI database info" version="@VERSION@">
2 <description>List the gemini database tables and columns</description> 2 <description>Retrieve information about tables, columns and annotation data stored in a GEMINI database</description>
3 <macros> 3 <macros>
4 <import>gemini_macros.xml</import> 4 <import>gemini_macros.xml</import>
5 <token name="@BINARY@">db_info</token>
6 </macros> 5 </macros>
7 <expand macro="requirements" /> 6 <expand macro="requirements" />
8 <expand macro="stdio" /> 7 <expand macro="stdio" />
9 <expand macro="version_command" /> 8 <expand macro="version_command" />
10 <command> 9 <command>
11 <![CDATA[ 10 <![CDATA[
12 gemini @BINARY@ 11 #if str($select.info_type) == 'scheme':
13 "${ infile }" | tr -s ' ' '\t' 12 gemini db_info '$infile' | tr -s ' ' '\t'
14 > "${ outfile }" 13 #elif str($select.info_type) == 'resources':
14 gemini query --header -q "SELECT name as data_source, resource as resource_file from resources" '$infile'
15 #elif str($select.info_type) == 'gene_detailed':
16 gemini query --header -q "SELECT gene, synonym as synonyms, transcript FROM gene_detailed WHERE gene is not NULL GROUP BY transcript ORDER BY gene" '$infile'
17 #else:
18 gemini query --header -q "SELECT * FROM samples" "$infile" | cut -f 2-${select.format}
19 #end if
20
21 > '$outfile'
15 ]]> 22 ]]>
16 </command> 23 </command>
17 <inputs> 24 <inputs>
18 <expand macro="infile" /> 25 <expand macro="infile" />
26 <conditional name="select">
27 <param name="info_type" type="select"
28 label="Information to retrieve from the database">
29 <option value="scheme">Names of database tables and their columns</option>
30 <option value="resources">List of annotation data sources</option>
31 <option value="gene_detailed">List of genes and their transcripts</option>
32 <option value="samples">Write out sample information in PED format</option>
33 </param>
34 <when value="scheme" />
35 <when value="resources" />
36 <when value="gene_detailed" />
37 <when value="samples">
38 <param name="format" type="select" display="radio"
39 label="Format of the pedigree file">
40 <option value="">Allow extra columns to accomodate custom sample info</option>
41 <option value="7">Restrict to 6 PED standard columns and drop additional info</option>
42 </param>
43 </when>
44 </conditional>
19 </inputs> 45 </inputs>
20 <outputs> 46 <outputs>
21 <data name="outfile" format="tabular" /> 47 <data name="outfile" format="tabular" />
22 </outputs> 48 </outputs>
23 <tests> 49 <tests>
24 <test> 50 <test>
25 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" /> 51 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
52 <conditional name="select">
53 <param name="info_type" value="scheme" />
54 </conditional>
26 <output name="outfile"> 55 <output name="outfile">
27 <assert_contents> 56 <assert_contents>
28 <has_line_matching expression="table_name&#009;column_name&#009;type.*" /> 57 <has_line_matching expression="table_name&#009;column_name&#009;type.*" />
58 </assert_contents>
59 </output>
60 </test>
61 <test>
62 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
63 <conditional name="select">
64 <param name="info_type" value="resources" />
65 </conditional>
66 <output name="outfile">
67 <assert_contents>
68 <has_line line="data_source&#009;resource_file" />
69 <has_n_columns n="2" />
70 </assert_contents>
71 </output>
72 </test>
73 <test>
74 <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
75 <conditional name="select">
76 <param name="info_type" value="gene_detailed" />
77 </conditional>
78 <output name="outfile">
79 <assert_contents>
80 <has_line line="gene&#009;synonyms&#009;transcript" />
81 <has_n_columns n="3" />
82 </assert_contents>
83 </output>
84 </test>
85 <test>
86 <param name="infile" value="gemini_comphets_input.db" ftype="gemini.sqlite" />
87 <conditional name="select">
88 <param name="info_type" value="samples" />
89 </conditional>
90 <output name="outfile">
91 <assert_contents>
92 <has_line_matching expression="family_id&#009;name&#009;paternal_id&#009;maternal_id&#009;sex&#009;phenotype&#009;.+" />
93 </assert_contents>
94 </output>
95 </test>
96 <test>
97 <param name="infile" value="gemini_comphets_input.db" ftype="gemini.sqlite" />
98 <conditional name="select">
99 <param name="info_type" value="samples" />
100 <param name="format" value="7" />
101 </conditional>
102 <output name="outfile">
103 <assert_contents>
104 <has_line line="family_id&#009;name&#009;paternal_id&#009;maternal_id&#009;sex&#009;phenotype" />
105 <has_n_columns n="6" />
29 </assert_contents> 106 </assert_contents>
30 </output> 107 </output>
31 </test> 108 </test>
32 </tests> 109 </tests>
33 <help><![CDATA[ 110 <help><![CDATA[
34 **What it does** 111 **What it does**
35 112
36 Because of the sheer number of annotations that are stored in gemini, there are admittedly too many columns to remember by rote. 113 Because of the sheer number of annotations that are stored in gemini, it is easy to lose the overview of what is actually available through database queries.
37 If you can’t recall the name of particular column, just use the db_info tool.
38 It will report all of the tables and all of the columns / types in each table::
39 114
40 table_name column_name type 115 This tool offers a simple way to inspect the structure, the origin of the
41 variants chrom text 116 annotations and some of the actual annotation content quickly.
42 variants start integer
43 variants end integer
44 variants variant_id integer
45 variants anno_id integer
46 variants ref text
47 variants alt text
48 variants qual float
49 variants filter text
50 variants type text
51 variants sub_type text
52 variants gts blob
53 variants gt_types blob
54 variants gt_phases blob
55 variants gt_depths blob
56 variants call_rate float
57 variants in_dbsnp bool
58 variants rs_ids text
59 variants in_omim bool
60 variants clin_sigs text
61 variants cyto_band text
62 variants rmsk text
63 variants in_cpg_island bool
64 variants in_segdup bool
65 variants is_conserved bool
66 variants num_hom_ref integer
67 variants num_het integer
68 variants num_hom_alt integer
69 variants num_unknown integer
70 variants aaf float
71 variants hwe float
72 variants inbreeding_coeff float
73 variants pi float
74 variants recomb_rate float
75 variants gene text
76 variants transcript text
77 variants is_exonic bool
78 variants is_coding bool
79 variants is_lof bool
80 variants exon text
81 variants codon_change text
82 variants aa_change text
83 ... ... ...
84
85 For more columns see https://gemini.readthedocs.org/en/latest/content/tools.html#db-info-list-the-gemini-database-tables-and-columns
86
87 ]]></help> 117 ]]></help>
88 <expand macro="citations"/> 118 <expand macro="citations"/>
89 </tool> 119 </tool>