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