annotate snpindex.xml @ 8:a89fec682254

gmap/gsnap updated to version 2011-11-30
author Jim Johnson <jj@umn.edu>
date Thu, 08 Dec 2011 11:00:46 -0600
parents 561503a442f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
1 <tool id="gmap_snpindex" name="GMAP SNP Index" version="2.0.0">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
2 <description>build index files for known SNPs</description>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
3 <requirements>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
4 <requirement type="binary">snpindex</requirement>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
5 </requirements>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
6 <version_string>snpindex --version</version_string>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
7 <command interpreter="command"> /bin/bash $shscript 2>1 1> $output </command>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
8 <inputs>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
9 <conditional name="refGenomeSource">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
10 <param name="genomeSource" type="select" label="Will you map to a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
11 <option value="indexed">Use a built-in index</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
12 <option value="gmapdb">Use gmapdb from the history</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
13 </param>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
14 <when value="indexed">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
15 <param name="gmapindex" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
16 <options from_file="gmap_indices.loc">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
17 <column name="uid" index="0" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
18 <column name="dbkey" index="1" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
19 <column name="name" index="2" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
20 <column name="kmers" index="3" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
21 <column name="maps" index="4" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
22 <column name="snps" index="5" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
23 <column name="value" index="6" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
24 </options>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
25 </param>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
26 </when>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
27 <when value="gmapdb">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
28 <param name="gmapdb" type="data" format="gmapdb" metadata_name="dbkey" label="Select a gmapdb"
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
29 help="A GMAP database built with GMAP Build"/>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
30 </when>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
31 </conditional>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
32 <conditional name="dbsnp">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
33 <param name="snp_source" type="select" label="Add SNP info from" >
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
34 <option value="snpTable">UCSC SNP Table</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
35 <option value="snpFile">GMAP SNP File</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
36 <option value="snpIIT">"GMAP SNPs map from GMAP iit store</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
37 </param>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
38 <when value="snpTable">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
39 <param name="snps" type="data" format="tabular" label="UCSC SNPs table" help="Example: ftp://hgdownload.cse.ucsc.edu/goldenPath/hg18/database/snp130.txt.gz" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
40 <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" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
41 <param name="weight" type="select" label="Include SNPs with at least Confidence Level" help="">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
42 <option value="1" selected="true">1 (High)</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
43 <option value="2">2 (Medium)</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
44 <option value="3">3 (All)</option>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
45 </param>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
46 </when>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
47 <when value="snpFile">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
48 <param name="snps" type="data" format="gmap_snps" label="GMAP SNPs file"
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
49 help="Format (3 columns):
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
50 &lt;br&gt;>rs62211261 21:14379270 CG
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
51 &lt;br&gt;>rs62211262 21:14379281 CG
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
52 &lt;br&gt;Each line must start with a &gt; character, then be followed by an
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
53 identifier (which may have duplicates). Then there should be the
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
54 chromosomal coordinate of the SNP. (Coordinates are all 1-based, so
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
55 the first character of a chromosome is number 1.) Finally, there
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
56 should be the two possible alleles: ( AC AG AT CG CT GT or AN CN GN TN)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
57 &lt;br&gt;These alleles must correspond to the possible nucleotides on the plus strand of the genome.
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
58 If the one of these two letters does not match the allele in the reference
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
59 sequence, that SNP will be ignored in subsequent processing as a probable error.
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
60 The N stands for any other allele." />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
61 </when>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
62 <when value="snpIIT">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
63 <param name="snpIIT" type="data" format="snps.iit" label="GMAP SNPs map" help="Created by: GMAP iit store" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
64 </when>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
65 </conditional>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
66 <param name="snps_name" type="text" value="snps" label="Name for this SNP index" help="no white space characters">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
67 </param>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
68 </inputs>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
69 <outputs>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
70 <!--
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
71 <data format="txt" name="log" label="${tool.name} on ${on_string}: log"/>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
72 -->
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
73 <data format="gmapsnpindex" name="output" label="${tool.name} on ${on_string} snpindex" />
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
74 </outputs>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
75 <configfiles>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
76 <configfile name="shscript">
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
77 #!/bin/bash
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
78 #set $ds = chr(36)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
79 #set $gt = chr(62)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
80 #set $lt = chr(60)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
81 #set $ad = chr(38)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
82 #import os.path
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
83 #if $refGenomeSource.genomeSource == "gmapdb":
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
84 #set $gmapdb = $refGenomeSource.gmapdb.extra_files_path
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
85 #set $refname = $refGenomeSource.gmapdb.metadata.db_name
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
86 #else:
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
87 #set $gmapdb = $os.path.dirname($refGenomeSource.gmapindex.value)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
88 $refname = $os.path.basename($refGenomeSource.gmapindex.value)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
89 #end if
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
90 #set $gmapsnpdir = $output.extra_files_path
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
91 mkdir -p $gmapsnpdir
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
92 #set $snpsname = $snps_name.__str__
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
93 #set $snpsiit = '.'.join([$snpsname,'iit'])
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
94 #set $pathsnps = $os.path.join($gmapsnpdir,$snpsname)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
95 #set $pathsnpsiit = $os.path.join($gmapsnpdir,$snpsiit)
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
96 #if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None':
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
97 #if $dbsnp.snp_source == 'snpTable':
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
98 #if $dbsnp.snpsex.__str__ != 'None':
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
99 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $pathsnps
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
100 #else:
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
101 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $pathsnps
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
102 #end if
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
103 #elif $dbsnp.snp_source == 'snpFile':
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
104 cat $dbsnp.snps | iit_store -o $pathsnps
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
105 #elif $dbsnp.snp_source == 'snpIIT':
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
106 cat $dbsnp.snps > $pathsnpsiit
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
107 #end if
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
108 snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
109 echo snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
110 #end if
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
111 </configfile>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
112 </configfiles>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
113
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
114 <tests>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
115 </tests>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
116
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
117 <help>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
118
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
119
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
120 **GMAP SNP Index**
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
121
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
122 GMAP SNP Index (snpindex in the GMAP documentaion) creates an index for known SNPs allowing for SNP tolerant mapping and alignment when using GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program).
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
123
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
124 You will want to read the README_
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
125
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
126 Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
127
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
128 .. _GMAP: http://research-pub.gene.com/gmap/
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
129 .. _GSNAP: http://research-pub.gene.com/gmap/
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
130 .. _README: http://research-pub.gene.com/gmap/src/README
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
131 .. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
132
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
133
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
134 </help>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
135 </tool>
561503a442f0 refactor
Jim Johnson <jj@umn.edu>
parents:
diff changeset
136