annotate iit_store.xml @ 0:10e3476429b5 draft

Uploaded
author jjohnson
date Fri, 05 Oct 2012 13:51:49 -0400
parents
children 74391fc6e3f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
1 <tool id="gmap_iit_store" name="GMAP IIT" version="2.0.0">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
2 <description>Create a map store for known genes or SNPs</description>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
3 <requirements>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
4 <requirement type="binary">iit_store</requirement>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
5 </requirements>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
6 <version_string>iit_store --version</version_string>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
7 <command interpreter="command"> /bin/bash $shscript 2> $log </command>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
8 <inputs>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
9 <!-- Input data -->
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
10 <conditional name="map">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
11 <param name="type" type="select" label="Make map for" >
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
12 <option value="genes">Introns and Splice sites</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
13 <option value="snps">SNPs</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
14 <option value="gmap">GMAP Annotation</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
15 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
16 <when value="genes">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
17 <conditional name="src">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
18 <param name="src_format" type="select" label="Add splice and intron info from" >
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
19 <option value="refGeneTable">refGenes table from UCSC table browser</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
20 <option value="gtf">GTF</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
21 <option value="gff3">GFF3</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
22 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
23 <when value="refGeneTable">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
24 <param name="genes" type="data" format="tabular" label="UCSC refGenes table" help="Example: ftp://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/refGene.txt.gz" />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
25 <param name="col_skip" type="integer" value="1" label="Columns to skip before the id/name column (default 1)"
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
26 help="Note that alignment tracks in UCSC sometimes have an extra column on the left.">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
27 <validator type="in_range" message="The number of colmumns to skip must >= 0." min="0."/>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
28 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
29 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
30 <when value="gtf">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
31 <param name="genes" type="data" format="gtf" label="Genes as GTF" help="" />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
32 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
33 <when value="gff3">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
34 <param name="genes" type="data" format="gff3" label="Genes in GFF3 format" help="" />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
35 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
36 </conditional>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
37 <param name="maps" type="select" display="checkboxes" multiple="true" force_select="true" label="Add splice and intron info from" >
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
38 <option value="splicesites" selected="true">splicesites.iit</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
39 <option value="introns" selected="false">introns.iit</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
40 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
41 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
42 <when value="snps">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
43 <conditional name="src">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
44 <param name="src_format" type="select" label="Add SNP info from" >
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
45 <option value="snpTable">UCSC SNP Table</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
46 <option value="snpFile">GMAP SNP File</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
47 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
48 <when value="snpTable">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
49 <param name="snps" type="data" format="tabular" label="UCSC SNPs table" help="Example: ftp://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/snp130.txt.gz" />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
50 <param name="snpsex" type="data" format="tabular" optional="true" label="UCSC SNP Exceptions table" help="Example: ftp://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/snp130Exceptions.txt.gz" />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
51 <param name="weight" type="select" label="Include SNPs with at least Confidence Level" help="">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
52 <option value="1" selected="true">1 (High)</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
53 <option value="2">2 (Medium)</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
54 <option value="3">3 (All)</option>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
55 </param>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
56 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
57 <when value="snpFile">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
58 <param name="snps" type="data" format="gmap_snps" optional="true" label="GMAP SNPs file"
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
59 help="Format (3 columns):&lt;B&gt;
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
60 &lt;br&gt;>rs62211261 21:14379270 CG
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
61 &lt;br&gt;>rs62211262 21:14379281 CG
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
62 &lt;/B&gt;
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
63 &lt;br&gt;Each line must start with a &gt; character, then be followed by an
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
64 identifier (which may have duplicates). Then there should be the
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
65 chromosomal coordinate of the SNP. (Coordinates are all 1-based, so
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
66 the first character of a chromosome is number 1.) Finally, there
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
67 should be the two possible alleles: ( AC AG AT CG CT GT or AN CN GN TN)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
68 &lt;br&gt;These alleles must correspond to the possible nucleotides on the plus strand of the genome.
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
69 If the one of these two letters does not match the allele in the reference
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
70 sequence, that SNP will be ignored in subsequent processing as a probable error.
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
71 The N stands for any other allele." />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
72 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
73 </conditional>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
74 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
75 <when value="gmap">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
76 <param name="annotation" type="data" format="gmap_annotation" label="GMAP mapfile"
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
77 help="Format (2 or columns): &lt;B&gt;
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
78 &lt;br&gt;>label coords optional_tag
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
79 &lt;br&gt;optional_annotation (which may be zero, one, or multiple lines)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
80 &lt;/B&gt;
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
81 &lt;br&gt;Each line must start with a &gt; character, then be followed by an identifier (which may have duplicates).
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
82 &lt;br&gt;Then there should be the chromosomal coordinate range. (Coordinates are all 1-based, so the first character of a chromosome is number 1.)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
83 &lt;br&gt;The coords should be of the form
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
84 &lt;br&gt; chr:position
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
85 &lt;br&gt; chr:startposition..endposition
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
86 &lt;br&gt;The term chr:position is equivalent to chr:position..position.
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
87 &lt;br&gt;If you want to indicate that the interval is on the minus strand or reverse direction, then endposition may be less than startposition.
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
88 " />
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
89 </when>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
90 </conditional>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
91 </inputs>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
92 <outputs>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
93 <data format="txt" name="log" label="${tool.name} on ${on_string}: log"/>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
94 <data format="splicesites.iit" name="splicesites_iit" label="${tool.name} on ${on_string} splicesites.iit">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
95 <filter>(map['type'] == 'genes' and 'splicesites' in map['maps'])</filter>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
96 </data>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
97 <data format="introns.iit" name="introns_iit" label="${tool.name} on ${on_string} introns.iit">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
98 <filter>(map['type'] == 'genes' and 'introns' in map['maps'])</filter>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
99 </data>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
100 <data format="snps.iit" name="snps_iit" label="${tool.name} on ${on_string} snps.iit">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
101 <filter>(map['type'] == 'snps')</filter>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
102 </data>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
103 <data format="iit" name="map_iit" label="${tool.name} on ${on_string} map.iit">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
104 <filter>(map['type'] == 'gmap')</filter>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
105 </data>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
106 </outputs>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
107 <configfiles>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
108 <configfile name="shscript">
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
109 #!/bin/bash
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
110 #set $catcmd = 'gzcat -f'
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
111 #set $catcmd = 'cat'
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
112 #set $ds = chr(36)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
113 #set $gt = chr(62)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
114 #set $lt = chr(60)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
115 #set $ad = chr(38)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
116 #set $ep = chr(33)
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
117 #set $toerr = ''.join([$gt,$ad,'2'])
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
118 #import os.path
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
119 #if $map.type == 'genes':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
120 if [ $ep -e $map.src.genes ]; then echo "$map.src.genes does not exist" $toerr; exit 1; fi
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
121 if [ $ep -s $map.src.genes ]; then echo "$map.src.genes is empty" $toerr; exit 2; fi
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
122 #if $map.src.src_format == 'refGeneTable':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
123 #if 'splicesites' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
124 $catcmd $map.src.genes | psl_splicesites -s $map.src.col_skip | iit_store -o $splicesites_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
125 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
126 #if 'introns' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
127 $catcmd $map.src.genes | psl_introns -s $map.src.col_skip | iit_store -o $introns_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
128 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
129 #elif $map.src.src_format == 'gtf':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
130 #if 'splicesites' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
131 $catcmd $map.src.genes | gtf_splicesites | iit_store -o $splicesites_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
132 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
133 #if 'introns' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
134 $catcmd $map.src.genes | gtf_introns | iit_store -o $introns_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
135 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
136 #elif $map.src.src_format == 'gff3':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
137 #if 'splicesites' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
138 $catcmd $map.src.genes | gff3_splicesites | iit_store -o $splicesites_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
139 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
140 #if 'introns' in [ $map.maps.__str__ ]:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
141 $catcmd $map.src.genes | gff3_introns | iit_store -o $introns_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
142 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
143 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
144 #elif $map.type == 'snps':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
145 if [ $ep -s $map.src.snps ]; then echo "$map.src.snps is empty" $toerr; exit 2; fi
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
146 #if $map.src.snpsex.__str__ != 'None':
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
147 $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight -e $map.src.snpsex | iit_store -o $snps_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
148 #else:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
149 $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight | iit_store -o $snps_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
150 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
151 #else:
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
152 $catcmd $map.src.snps | iit_store -o $map_iit
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
153 #end if
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
154 </configfile>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
155 </configfiles>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
156
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
157 <tests>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
158 </tests>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
159
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
160 <help>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
161
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
162
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
163 **iit_store**
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
164
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
165 GMAP IIT creates an Interval Index Tree map of known splice sites, introns, or SNPs (it uses iit_store described in the GMAP documentation). The maps can be used in GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program). Maps are typically used for known splice sites, introns, or SNPs.
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
166
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
167 You will want to read the README_
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
168
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
169 Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
170
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
171 .. _GMAP: http://research-pub.gene.com/gmap/
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
172 .. _GSNAP: http://research-pub.gene.com/gmap/
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
173 .. _README: http://research-pub.gene.com/gmap/src/README
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
174 .. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
175
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
176
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
177 **inputs**
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
178
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
179 </help>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
180 </tool>
10e3476429b5 Uploaded
jjohnson
parents:
diff changeset
181