Mercurial > repos > jjohnson > gmap
comparison gmap/gmap_build.xml @ 2:52da588232b0
Add datatypes for maps and snpindex, add iit_store and snpindex tools, update GMAP and GSNAP to use these.
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Fri, 21 Oct 2011 11:38:55 -0500 |
parents | d58d272914e7 |
children |
comparison
equal
deleted
inserted
replaced
1:30d42bb409b8 | 2:52da588232b0 |
---|---|
1 <tool id="gmap_build" name="GMAP Build" version="2.0.0"> | 1 <tool id="gmap_build" name="GMAP Build" version="2.0.0"> |
2 <description>a GMAP DB Index</description> | 2 <description>a database genome index for GMAP and GSNAP</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="binary">gmap_build</requirement> | 4 <requirement type="binary">gmap_build</requirement> |
5 <!-- proposed tag for added datatype dependencies --> | |
6 <requirement type="datatype">gmapdb</requirement> | |
7 <requirement type="datatype">gmap_snps</requirement> | |
5 </requirements> | 8 </requirements> |
6 <version_string>gmap --version</version_string> | 9 <version_string>gmap --version</version_string> |
7 <command interpreter="command"> /bin/bash $shscript 2>1 1> $output </command> | 10 <command interpreter="command"> /bin/bash $shscript 2>1 1> $output </command> |
8 <inputs> | 11 <inputs> |
9 <!-- Input data --> | 12 <!-- Name for this gmapdb --> |
10 <param name="input" type="data" format="fasta" label="reference sequence fasta" /> | 13 <param name="refname" type="text" label="Name you want to give this gmap database" help=""> |
11 <param name="refname" type="text" label="reference name" help=""> | |
12 <validator type="empty_field" message="A database name is required."/> | 14 <validator type="empty_field" message="A database name is required."/> |
13 </param> | 15 </param> |
16 <!-- Input data --> | |
17 <repeat name="inputs" title="Reference Sequence" min="1"> | |
18 <param name="input" type="data" format="fasta" label="reference sequence fasta" /> | |
19 </repeat> | |
20 | |
14 <param name="kmer" type="select" multiple="true" force_select="true" label="kmer size" help=""> | 21 <param name="kmer" type="select" multiple="true" force_select="true" label="kmer size" help=""> |
15 <option value="12">12</option> | 22 <option value="12">12</option> |
16 <option value="13">13</option> | 23 <option value="13">13</option> |
17 <option value="14">14</option> | 24 <option value="14">14</option> |
18 <option value="15" selected="true">15</option> | 25 <option value="15" selected="true">15</option> |
77 </inputs> | 84 </inputs> |
78 <outputs> | 85 <outputs> |
79 <!-- | 86 <!-- |
80 <data format="txt" name="log" label="${tool.name} on ${on_string}: log"/> | 87 <data format="txt" name="log" label="${tool.name} on ${on_string}: log"/> |
81 --> | 88 --> |
82 <!-- this should have its own datatype: gmapdb --> | |
83 <data format="gmapdb" name="output" label="${tool.name} on ${on_string} gmapdb ${refname}" /> | 89 <data format="gmapdb" name="output" label="${tool.name} on ${on_string} gmapdb ${refname}" /> |
84 </outputs> | 90 </outputs> |
85 <configfiles> | 91 <configfiles> |
86 <configfile name="shscript"> | 92 <configfile name="shscript"> |
87 #!/bin/bash | 93 #!/bin/bash |
88 #set $ds = chr(36) | 94 #set $ds = chr(36) |
89 #set $gt = chr(62) | 95 #set $gt = chr(62) |
90 #set $lt = chr(60) | 96 #set $lt = chr(60) |
91 #set $ad = chr(38) | 97 #set $ad = chr(38) |
98 ## #set $ref_files = '' | |
99 ## #for $i in $inputs: | |
100 ## #set $ref_files = $ref_files $i.input | |
101 ## #end for | |
102 ## echo $ref_files | |
92 #import os.path | 103 #import os.path |
93 #set $gmapdb = $output.extra_files_path | 104 #set $gmapdb = $output.extra_files_path |
94 #set $mapsdir = $os.path.join($os.path.join($gmapdb,str($refname)), str($refname) + '.maps') | 105 #set $mapsdir = $os.path.join($os.path.join($gmapdb,str($refname)), str($refname) + '.maps') |
95 mkdir -p $gmapdb | 106 mkdir -p $gmapdb |
96 ## export GMAPDB required for cmetindex and atoiindex | 107 ## export GMAPDB required for cmetindex and atoiindex |
97 export GMAPDB=$gmapdb | 108 export GMAPDB=$gmapdb |
98 #for $k in $kmer.__str__.split(','): | 109 #for $k in $kmer.__str__.split(','): |
99 gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k $input | 110 gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k #for i in $inputs# ${i.input}#end for# |
100 #end for | 111 #end for |
101 get-genome -D $gmapdb -d '?' | sed 's/^Available .*/gmap db: /' | 112 get-genome -D $gmapdb -d '?' | sed 's/^Available .*/gmap db: /' |
102 echo "kmers: " $kmer | 113 echo "kmers: " $kmer |
103 #if $splicesite.splice_source == 'refGeneTable': | 114 #if $splicesite.splice_source == 'refGeneTable': |
104 #if $splicesite.refGenes.__str__ != 'None': | 115 #if $splicesite.refGenes.__str__ != 'None': |
114 #if $splicesite.gff3Genes.__str__ != 'None': | 125 #if $splicesite.gff3Genes.__str__ != 'None': |
115 cat $splicesite.gff3Genes | gff3_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') | 126 cat $splicesite.gff3Genes | gff3_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') |
116 cat $splicesite.gff3Genes | gff3_introns | iit_store -o $os.path.join($mapsdir,'introns') | 127 cat $splicesite.gff3Genes | gff3_introns | iit_store -o $os.path.join($mapsdir,'introns') |
117 #end if | 128 #end if |
118 #end if | 129 #end if |
130 #if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None': | |
119 #if $dbsnp.snp_source == 'snpTable': | 131 #if $dbsnp.snp_source == 'snpTable': |
120 #if $dbsnp.snps.__str__ != 'None': | |
121 #if $dbsnp.snpsex.__str__ != 'None': | 132 #if $dbsnp.snpsex.__str__ != 'None': |
122 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $os.path.join($mapsdir,'snps') | 133 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $os.path.join($mapsdir,'snps') |
123 #else: | 134 #else: |
124 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $os.path.join($mapsdir,'snps') | 135 cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $os.path.join($mapsdir,'snps') |
125 #end if | 136 #end if |
137 #else: | |
138 cat $dbsnp.snps | iit_store -o $os.path.join($mapsdir,'snps') | |
139 #end if | |
126 snpindex -d $refname -v snps | 140 snpindex -d $refname -v snps |
127 #end if | 141 echo "snpindex" -d $refname -v snps |
128 #end if | 142 #end if |
129 #if $cmetindex.__str__ == 'yes': | 143 #if $cmetindex.__str__ == 'yes': |
130 cmetindex -d $refname | 144 cmetindex -d $refname |
131 echo "cmetindex" | 145 echo "cmetindex" -d $refname |
132 #end if | 146 #end if |
133 #if $atoiindex.__str__ == 'yes': | 147 #if $atoiindex.__str__ == 'yes': |
134 atoiindex -d $refname | 148 atoiindex -d $refname |
135 echo "atoiindex" | 149 echo "atoiindex" -d $refname |
136 #end if | 150 #end if |
137 get-genome -D $gmapdb -d $refname -m '?' | sed 's/^Available maps .*/maps: /' | 151 get-genome -D $gmapdb -d $refname -m '?' | sed 's/^Available maps .*/maps: /' |
138 </configfile> | 152 </configfile> |
139 </configfiles> | 153 </configfiles> |
140 | 154 |
144 <help> | 158 <help> |
145 | 159 |
146 | 160 |
147 **GMAP Build** | 161 **GMAP Build** |
148 | 162 |
149 GMAP Build creates an index of a genomic sequence for alignments using GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program). | 163 GMAP Build creates an index of a genomic sequence for mapping and alignment using GMAP_ (Genomic Mapping and Alignment Program for mRNA and EST sequences) and GSNAP_ (Genomic Short-read Nucleotide Alignment Program). (GMAP Build uses GMSP commands: gmap_build, iit_store, psl_splicesites, psl_introns, gtf_splicesites, gtf_introns, gff3_splicesites, gff3_introns, dbsnp_iit, snpindex, cmetindex, and atoiindex.) |
150 | 164 |
151 You will want to read the README_ | 165 You will want to read the README_ |
152 | 166 |
153 Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 | 167 Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 |
154 | 168 |