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