# HG changeset patch # User Jim Johnson # Date 1320780401 21600 # Node ID 561503a442f0fe1c24827c4446573e0c6f1300be # Parent 3be0e0a858fe31c5fc5d9982280604e68b040aae refactor diff -r 3be0e0a858fe -r 561503a442f0 gmap.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gmap.xml Tue Nov 08 13:26:41 2011 -0600 @@ -0,0 +1,442 @@ + + Genomic Mapping and Alignment Program for mRNA and EST sequences + + gmap + + gmapdb + gmap_annotation + gmap_splicesites + gmap_introns + gmap_snps + + gmap --version + + #import os,os.path + gmap + --nthreads=4 --ordered + #if $refGenomeSource.genomeSource == "history": + --gseg=$refGenomeSource.ownFile + #elif $refGenomeSource.genomeSource == "gmapdb": + #set $gmapdb = $os.listdir($refGenomeSource.gmapdb.extra_files_path)[0] + --dir=$refGenomeSource.gmapdb.extra_files_path --db=$gmapdb + #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: + --kmer=$refGenomeSource.kmer + #end if + #else: + --dir=$os.path.dirname($refGenomeSource.gmapindex.value) --db=$os.path.basename($refGenomeSource.gmapindex.value) + #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: + --kmer=$refGenomeSource.kmer + #end if + #end if + #if $result.format == "summary": + --summary + #elif $result.format == "align": + --align + #elif $result.format == "continuous": + --continuous + #elif $result.format == "continuous-by-exon": + --continuous-by-exon + #elif $result.format == "compress": + --compress + #elif $result.format == "exons_dna": + --exons=cdna + #elif $result.format == "exons_gen": + --exons=genomic + #elif $result.format == "protein_dna": + --protein_dna + #elif $result.format == "protein_gen": + --protein_gen + #elif $result.format == "sam": + --format=$result.sam_paired_read + $result.no_sam_headers + #if len($result.noncanonical_splices.__str__) > 0 + --noncanonical-splices=$result.noncanonical_splices + #end if + #if len($result.read_group_id.__str__) > 0 + --read-group-id=$result.read_group_id + #end if + #if len($result.read_group_name.__str__) > 0 + --read-group-name=$result.read_group_name + #end if + #if len($result.read_group_library.__str__) > 0 + --read-group-library=$result.read_group_library + #end if + #if len($result.read_group_platform.__str__) > 0 + --read-group-platform=$result.read_group_platform + #end if + #elif $result.format != "gmap": + --format=$result.format + #end if + #if $computation.options == "advanced": + $computation.nosplicing + $computation.cross_species + --min-intronlength=$computation.min_intronlength + --intronlength=$computation.intronlength + --localsplicedist=$computation.localsplicedist + --totallength=$computation.totallength + --trimendexons=$computation.trimendexons + --direction=$computation.direction + --canonical-mode=$computation.canonical + --prunelevel=$computation.prunelevel + --allow-close-indels=$computation.allow_close_indels + --microexon-spliceprob=$computation.microexon_spliceprob + #if int($computation.chimera_margin) >= 0: + --chimera-margin=$computation.chimera_margin + #end if + #end if + #if $advanced.options == "used": + #if int($advanced.npaths) >= 0: + --npaths=$advanced.npaths + #end if + #if int($advanced.chimera_overlap) > 0: + --chimera_overlap=$advanced.chimera_overlap + #end if + $advanced.protein + $advanced.tolerant + $advanced.nolengths + $advanced.invertmode + #if int($advanced.introngap) > 0: + --introngap=$advanced.introngap + #end if + #if int($advanced.wraplength) > 0: + --wraplength=$advanced.wraplength + #end if + #end if + #if $split_output == True + $split_output + #end if + #if len($quality_protocol.__str__) > 0: + --quality-protocol=$quality_protocol + #end if + $input + #for $i in $inputs: + ${i.added_input} + #end for + #if $split_output == True + 2> $gmap_stderr + #else + 2> $gmap_stderr > $output + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (split_output == False) + + + + + + + + + + + + + (split_output == True) + + + + + + + + + + + + + (split_output == True) + + + + + + + + + + + + + (split_output == True) + + + + + + + + + + + + + (split_output == True) + + + + + + + + + + + + + + + + + +**What it does** + +GMAP_ (Genomic Mapping and Alignment Program) The functionality provided by gmap allows a user to: (1) map and align a single cDNA interactively against a large genome in about a second, without the startup time of several minutes typically needed by existing mapping programs; (2) switch arbitrarily among different genomes, without the need for a preloaded server dedicated to each genome; (3) run the program on computers with as little as 128 MB of RAM (random access memory); (4) perform high-throughput batch processing of cDNAs by using memory mapping and multithreading when appropriate memory and hardware are available; (5) generate accurate gene models, even in the presence of substantial polymorphisms and sequence errors; (6) locate splice sites accurately without the use of probabilistic splice site models, allowing generalized use of the program across species; (7) detect statistically significant microexons and incorporate them into the alignment; and (8) handle mapping and alignment tasks on genomes having alternate assemblies, linkage groups or strains. It is developed by Thomas D. Wu of Genentech, Inc. + +Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 + +.. _GMAP: http://research-pub.gene.com/gmap/ +.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 + +------ + +**Know what you are doing** + +.. class:: warningmark + +You will want to read the README_ + +.. _README: http://research-pub.gene.com/gmap/src/README + + + + diff -r 3be0e0a858fe -r 561503a442f0 gmap/gmap.xml --- a/gmap/gmap.xml Tue Nov 08 13:22:34 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,442 +0,0 @@ - - Genomic Mapping and Alignment Program for mRNA and EST sequences - - gmap - - gmapdb - gmap_annotation - gmap_splicesites - gmap_introns - gmap_snps - - gmap --version - - #import os,os.path - gmap - --nthreads=4 --ordered - #if $refGenomeSource.genomeSource == "history": - --gseg=$refGenomeSource.ownFile - #elif $refGenomeSource.genomeSource == "gmapdb": - #set $gmapdb = $os.listdir($refGenomeSource.gmapdb.extra_files_path)[0] - --dir=$refGenomeSource.gmapdb.extra_files_path --db=$gmapdb - #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: - --kmer=$refGenomeSource.kmer - #end if - #else: - --dir=$os.path.dirname($refGenomeSource.gmapindex.value) --db=$os.path.basename($refGenomeSource.gmapindex.value) - #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: - --kmer=$refGenomeSource.kmer - #end if - #end if - #if $result.format == "summary": - --summary - #elif $result.format == "align": - --align - #elif $result.format == "continuous": - --continuous - #elif $result.format == "continuous-by-exon": - --continuous-by-exon - #elif $result.format == "compress": - --compress - #elif $result.format == "exons_dna": - --exons=cdna - #elif $result.format == "exons_gen": - --exons=genomic - #elif $result.format == "protein_dna": - --protein_dna - #elif $result.format == "protein_gen": - --protein_gen - #elif $result.format == "sam": - --format=$result.sam_paired_read - $result.no_sam_headers - #if len($result.noncanonical_splices.__str__) > 0 - --noncanonical-splices=$result.noncanonical_splices - #end if - #if len($result.read_group_id.__str__) > 0 - --read-group-id=$result.read_group_id - #end if - #if len($result.read_group_name.__str__) > 0 - --read-group-name=$result.read_group_name - #end if - #if len($result.read_group_library.__str__) > 0 - --read-group-library=$result.read_group_library - #end if - #if len($result.read_group_platform.__str__) > 0 - --read-group-platform=$result.read_group_platform - #end if - #elif $result.format != "gmap": - --format=$result.format - #end if - #if $computation.options == "advanced": - $computation.nosplicing - $computation.cross_species - --min-intronlength=$computation.min_intronlength - --intronlength=$computation.intronlength - --localsplicedist=$computation.localsplicedist - --totallength=$computation.totallength - --trimendexons=$computation.trimendexons - --direction=$computation.direction - --canonical-mode=$computation.canonical - --prunelevel=$computation.prunelevel - --allow-close-indels=$computation.allow_close_indels - --microexon-spliceprob=$computation.microexon_spliceprob - #if int($computation.chimera_margin) >= 0: - --chimera-margin=$computation.chimera_margin - #end if - #end if - #if $advanced.options == "used": - #if int($advanced.npaths) >= 0: - --npaths=$advanced.npaths - #end if - #if int($advanced.chimera_overlap) > 0: - --chimera_overlap=$advanced.chimera_overlap - #end if - $advanced.protein - $advanced.tolerant - $advanced.nolengths - $advanced.invertmode - #if int($advanced.introngap) > 0: - --introngap=$advanced.introngap - #end if - #if int($advanced.wraplength) > 0: - --wraplength=$advanced.wraplength - #end if - #end if - #if $split_output == True - $split_output - #end if - #if len($quality_protocol.__str__) > 0: - --quality-protocol=$quality_protocol - #end if - $input - #for $i in $inputs: - ${i.added_input} - #end for - #if $split_output == True - 2> $gmap_stderr - #else - 2> $gmap_stderr > $output - #end if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (split_output == False) - - - - - - - - - - - - - (split_output == True) - - - - - - - - - - - - - (split_output == True) - - - - - - - - - - - - - (split_output == True) - - - - - - - - - - - - - (split_output == True) - - - - - - - - - - - - - - - - - -**What it does** - -GMAP_ (Genomic Mapping and Alignment Program) The functionality provided by gmap allows a user to: (1) map and align a single cDNA interactively against a large genome in about a second, without the startup time of several minutes typically needed by existing mapping programs; (2) switch arbitrarily among different genomes, without the need for a preloaded server dedicated to each genome; (3) run the program on computers with as little as 128 MB of RAM (random access memory); (4) perform high-throughput batch processing of cDNAs by using memory mapping and multithreading when appropriate memory and hardware are available; (5) generate accurate gene models, even in the presence of substantial polymorphisms and sequence errors; (6) locate splice sites accurately without the use of probabilistic splice site models, allowing generalized use of the program across species; (7) detect statistically significant microexons and incorporate them into the alignment; and (8) handle mapping and alignment tasks on genomes having alternate assemblies, linkage groups or strains. It is developed by Thomas D. Wu of Genentech, Inc. - -Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 - -.. _GMAP: http://research-pub.gene.com/gmap/ -.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 - ------- - -**Know what you are doing** - -.. class:: warningmark - -You will want to read the README_ - -.. _README: http://research-pub.gene.com/gmap/src/README - - - - diff -r 3be0e0a858fe -r 561503a442f0 gmap/gmap_build.xml --- a/gmap/gmap_build.xml Tue Nov 08 13:22:34 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ - - a database genome index for GMAP and GSNAP - - gmap_build - - gmapdb - gmap_snps - - gmap --version - /bin/bash $shscript 2>1 1> $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#!/bin/bash -#set $ds = chr(36) -#set $gt = chr(62) -#set $lt = chr(60) -#set $ad = chr(38) -## #set $ref_files = '' -## #for $i in $inputs: - ## #set $ref_files = $ref_files $i.input -## #end for -## echo $ref_files -#import os.path -#set $gmapdb = $output.extra_files_path -#set $mapsdir = $os.path.join($os.path.join($gmapdb,str($refname)), str($refname) + '.maps') -mkdir -p $gmapdb -## export GMAPDB required for cmetindex and atoiindex -export GMAPDB=$gmapdb -#for $k in $kmer.__str__.split(','): -gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k #for i in $inputs# ${i.input}#end for# -#end for -get-genome -D $gmapdb -d '?' | sed 's/^Available .*/gmap db: /' -echo "kmers: " $kmer -#if $splicesite.splice_source == 'refGeneTable': -#if $splicesite.refGenes.__str__ != 'None': -cat $splicesite.refGenes | psl_splicesites -s $splicesite.col_skip | iit_store -o $os.path.join($mapsdir,'splicesites') -cat $splicesite.refGenes | psl_introns -s $splicesite.col_skip | iit_store -o $os.path.join($mapsdir,'introns') -#end if -#elif $splicesite.splice_source == 'gtf': -#if $splicesite.gtfGenes.__str__ != 'None': -cat $splicesite.gtfGenes | gtf_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') -cat $splicesite.gtfGenes | gtf_introns | iit_store -o $os.path.join($mapsdir,'introns') -#end if -#elif $splicesite.splice_source == 'gff3': -#if $splicesite.gff3Genes.__str__ != 'None': -cat $splicesite.gff3Genes | gff3_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') -cat $splicesite.gff3Genes | gff3_introns | iit_store -o $os.path.join($mapsdir,'introns') -#end if -#end if -#if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None': -#if $dbsnp.snp_source == 'snpTable': -#if $dbsnp.snpsex.__str__ != 'None': -cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $os.path.join($mapsdir,'snps') -#else: -cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $os.path.join($mapsdir,'snps') -#end if -#else: -cat $dbsnp.snps | iit_store -o $os.path.join($mapsdir,'snps') -#end if -snpindex -d $refname -v snps -echo "snpindex" -d $refname -v snps -#end if -#if $cmetindex.__str__ == 'yes': -cmetindex -d $refname -echo "cmetindex" -d $refname -#end if -#if $atoiindex.__str__ == 'yes': -atoiindex -d $refname -echo "atoiindex" -d $refname -#end if -get-genome -D $gmapdb -d $refname -m '?' | sed 's/^Available maps .*/maps: /' - - - - - - - - - -**GMAP Build** - -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.) - -You will want to read the README_ - -Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 - -.. _GMAP: http://research-pub.gene.com/gmap/ -.. _GSNAP: http://research-pub.gene.com/gmap/ -.. _README: http://research-pub.gene.com/gmap/src/README -.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 - - - - - diff -r 3be0e0a858fe -r 561503a442f0 gmap/gsnap.xml --- a/gmap/gsnap.xml Tue Nov 08 13:22:34 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,834 +0,0 @@ - - Genomic Short-read Nucleotide Alignment Program - - gsnap - - gmapdb - gmapsnpindex - splicesites.iit - introns.iit - - gsnap --version - - #import os.path, re - gsnap - --nthreads="4" --ordered - #if $refGenomeSource.genomeSource == "gmapdb": - #set $gmapdb = $os.listdir($refGenomeSource.gmapdb.extra_files_path)[0] - --dir=$refGenomeSource.gmapdb.extra_files_path --db=$refGenomeSource.gmapdb.metadata.db_name - #else: - --dir=$os.path.dirname($refGenomeSource.gmapindex.value) --db=$os.path.basename($refGenomeSource.gmapindex.value) - #end if - #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: - --kmer=$refGenomeSource.kmer - #end if - #if $refGenomeSource.use_splicing.src == 'gmapdb': - #if $refGenomeSource.use_splicing.splicemap != None and len($refGenomeSource.use_splicing.splicemap.__str__) > 0: - -s $refGenomeSource.use_splicing.splicemap.value - #end if - #elif $refGenomeSource.use_splicing.src == 'history': - #if $refGenomeSource.use_splicing.splicemap != None and len($refGenomeSource.use_splicing.splicemap.__str__) > 0: - -S $os.path.dirname($refGenomeSource.use_splicing.splicemap) -s $os.path.basename($refGenomeSource.use_splicing.splicemap) - #end if - #end if - #if $refGenomeSource.use_snps.src == 'gmapdb': - #if $refGenomeSource.use_snps.snpindex != None and len($refGenomeSource.use_snps.snpindex.__str__) > 0: - -v $refGenomeSource.use_snps.snpindex.value - #end if - #elif $refGenomeSource.use_snps.src == 'history': - #if $refGenomeSource.use_snps.snpindex != None and len($refGenomeSource.use_snps.snpindex.__str__) > 0: - -V $refGenomeSource.use_snps.snpindex.extra_files_path -v $refGenomeSource.use_snps.snpindex.metadata.snps_name - #end if - #end if - #if $refGenomeSource.mode.__str__ != '': - --mode=$refGenomeSource.mode - #end if - #if $mapq_unique_score.__str__ != '': - --mapq-unique-score=$mapq_unique_score - #end if - #if $computation.options == "advanced": - #if $computation.max_mismatches.__str__ != '': - --max-mismatches=$computation.max_mismatches - #end if - $computation.query_unk_mismatch - $computation.genome_unk_mismatch - #if $computation.terminal_threshold.__str__ != '': - --terminal-threshold=$computation.terminal_threshold - #end if - #if $computation.indel_penalty.__str__ != '': - --indel-penalty=$computation.indel_penalty - #end if - #if $computation.indel_endlength.__str__ != '': - --indel-endlength=$computation.indel_endlength - #end if - #if $computation.max_middle_insertions.__str__ != '': - --max-middle-insertions=$computation.max_middle_insertions - #end if - #if $computation.max_middle_deletions.__str__ != '': - --max-middle-deletions=$computation.max_middle_deletions - #end if - #if $computation.max_end_insertions.__str__ != '': - --max-end-insertions=$computation.max_end_insertions - #end if - #if $computation.max_end_deletions.__str__ != '': - --max-end-deletions=$computation.max_end_deletions - #end if - #if $computation.suboptimal_levels.__str__ != '': - --suboptimal-levels=$computation.suboptimal_levels - #end if - #if $computation.adapter_strip.__str__ != '': - --adapter-strip=$computation.adapter_strip - #end if - #if $computation.trim_mismatch_score.__str__ != '': - --trim-mismatch-score=$computation.trim_mismatch_score - #end if - ## TODO - do we need these options (Is it tally XOR runlength?): - ## --tallydir= --use-tally=tally - ## --runlengthdir --use-runlength=runlength - #if $computation.use_tally != None and len($computation.use_tally.__str__) > 0: - ##--tallydir $os.path.dirname($computation.use_tally) --use-tally $os.path.basename($computation.use_tally) - --use-tally=$computation.use_tally - #end if - ## gmap options - #if $computation.gmap_mode.__str__ != '' and $computation.gmap_mode.__str__ != 'None': - --gmap-mode='$computation.gmap_mode' - #end if - #if $computation.trigger_score_for_gmap.__str__ != '': - --trigger-score-for-gmap=$computation.trigger_score_for_gmap - #end if - #if $computation.max_gmap_pairsearch.__str__ != '' and $re.search("pairsearch",$computation.gmap_mode): - --max-gmap-pairsearch=$computation.max_gmap_pairsearch - #end if - #if $computation.max_gmap_terminal.__str__ != '' and $re.search("terminal",$computation.gmap_mode): - --max-gmap-terminal=$computation.max_gmap_terminal - #end if - #if $computation.max_gmap_improvement.__str__ != '' and $re.search("improv",$computation.gmap_mode): - --max-gmap-improvement=$computation.max_gmap_improvement - #end if - #if $computation.microexon_spliceprob.__str__ != '': - --microexon-spliceprob=$computation.microexon_spliceprob - #end if - #end if - #if $splicing.options == "advanced": - $splicing.novelsplicing - #if $splicing.localsplicedist.__str__ != '': - --localsplicedist=$splicing.localsplicedist - #end if - #if $splicing.local_splice_penalty.__str__ != '': - --local-splice-penalty=$splicing.local_splice_penalty - #end if - #if $splicing.distant_splice_penalty.__str__ != '': - --distant-splice-penalty=$splicing.distant_splice_penalty - #end if - #if $splicing.local_splice_endlength.__str__ != '': - --local-splice-endlength=$splicing.local_splice_endlength - #end if - #if $splicing.distant_splice_endlength.__str__ != '': - --distant-splice-endlength=$splicing.distant_splice_endlength - #end if - #if $splicing.distant_splice_identity.__str__ != '': - --distant-splice-identity=$splicing.distant_splice_identity - #end if - #end if - #if $output.options == "advanced": - #if $output.npath.__str__ != '': - --npath=$output.npath - #end if - $output.quiet_if_excessive - $output.show_refdiff - $output.clip_overlap - #end if - #if $result.format == "sam": - --format=sam - $result.no_sam_headers - #if $result.read_group_id.__str__.strip != '': - --read-group-id='$result.read_group_id' - #end if - #if $result.read_group_name.__str__ != '': - --read-group-name='$result.read_group_name' - #end if - #if $result.read_group_library.__str__ != '': - --read-group-library='$result.read_group_library' - #end if - #if $result.read_group_platform.__str__ != '': - --read-group-platform='$result.read_group_platform' - #end if - #if $result.quality_shift.__str__ != '': - --quality-shift=$result.quality_shift - #end if - #elif $result.format == "goby": - #if $result.goby_output.__str__ != '': - --goby-output='$result.goby_output' - #end if - #if $result.creads_window_start.__str__ != '': - --creads-window-start=$result.creads_window_start - #end if - #if $result.creads_window_end.__str__ != '': - --creads-window-end=$result.creads_window_end - #end if - $result.creads_complement - #end if - #if $results.split_output == 'yes': - --split-output=gsnap_out - #if $results.fails.choice == 'nofails': - --nofails - #elif $results.fails.choice == 'failsonly': - --failsonly - #end if - $results.fails_as_input - #else - #if $results.fails.choice == 'nofails': - --nofails - #elif $results.fails.choice == 'failsonly': - --failsonly - $results.fails.fails_as_input - #end if - #end if - #if $seq.format == "gsnap_fasta": - $seq.circularinput $seq.gsnap - #else if $seq.format == "fastq": - #if $seq.barcode_length.__str__ != '': - --barcode-length=$seq.barcode_length - #end if - #if $seq.fastq_id_start.__str__ != '': - --fastq-id-start=$seq.fastq_id_start - #end if - #if $seq.fastq_id_end.__str__ != '': - --fastq-id-end=$seq.fastq_id_end - #end if - #if $seq.filter_chastity.__str__ != 'off': - --filter-chastity=$seq.filter_chastity - #end if - #if $seq.paired.ispaired.__str__ == 'yes': - #if $seq.paired.pairmax_dna.__str__ != '': - --pairmax-dna=$seq.paired.pairmax_dna - #end if - #if $seq.paired.pairmax_rna.__str__ != '': - --pairmax-rna=$seq.paired.pairmax_rna - #end if - $seq.fastq $seq.paired.fastq - #else - $seq.fastq - #end if - #end if - #if $results.split_output == 'yes': - 2> $gsnap_stderr - #else: - #if $results.fails.choice.__str__ == 'failsonly' and $results.fails.fails_as_input.__str__ != '': - 2> $gsnap_stderr > $gsnap_fq - #else - 2> $gsnap_stderr > $gsnap_out - #end if - #end if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (results['split_output'] == 'no' and (results['fails']['choice'] != 'failsonly' or results['fails']['fails_as_input'] == False)) - - - - - - - - (results['split_output'] == 'no' and results['fails']['choice'] == 'failsonly' and results['fails']['fails_as_input'] == True) - - - - - - (results['split_output'] == 'yes') - - - - - - - (results['split_output'] == 'yes') - - - - - - - (results['split_output'] == 'yes') - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - - (results['split_output'] == 'yes' and results['fails_as_input'] == False) - - - - - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == False) - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) - - - - - - - - - - -**What it does** - -GSNAP_ (Genomic Short-read Nucleotide Alignment Program) is a short read aligner which can align both single- and paired-end reads as short as 14nt and of arbitrarily long length. It can detect short- and long-distance splicing, including interchromosomal splicing, in individual reads, using probabilistic models or a database of known splice sites. Our program also permits SNP-tolerant alignment to a reference space of all possible combinations of major and minor alleles, and can align reads from bisulfite-treated DNA for the study of methylation state. It is developed by Thomas D. Wu of Genentech, Inc. -Publication_ citation: Thomas D. Wu, Serban Nacu "Fast and SNP-tolerant detection of complex variants and splicing in short reads. Bioinformatics. 2010 Apr 1;26(7):873-81. Epub 2010 Feb 10. - -.. _GSNAP: http://research-pub.gene.com/gmap/ -.. _Publication: http://bioinformatics.oupjournals.org/cgi/content/full/26/7/873 -http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2844994/?tool=pubmed - ------- - -**Know what you are doing** - -.. class:: warningmark - -You will want to read the README_ - -.. _README: http://research-pub.gene.com/gmap/src/README - ------- - -**Input formats** - -Input to GSNAP should be either in FASTQ or FASTA format. - -The FASTQ input may include quality scores, which will then be included in SAM -output, if that output format is selected. - -For FASTA format, you should include one line per read (or end of a -paired-end read). The same FASTA file can have a mixture of -single-end and paired-end reads of varying lengths, if desired. - -Single-end reads: - -Each FASTA entry should contain one short read per line, like this - ->Header information -AAAACATTCTCCTCCGCATAAGCCTGCGTCAGATTA - -Each short read can have a different length. However, the entire read -needs to be on a single line, and may not wrap around multiple lines. -If it extends to a second line, GSNAP will think that the read is -paired-end. - - -Paired-end reads: - -Each FASTA entry should contain two short reads, one per line, like -this - ->Header information -AAAACATTCTCCTCCGCATAAGCCTAGTAGATTA -GGCGTAGGTAGAAGTAGAGGTTAAGGCGCGTCAG - -By default, the program assumes that the second end is in the reverse -complement direction compared with the first end. If they are in the -same direction, you may need to use the --circular-input (or -c) flag. - -( The Galaxy tool: "FASTA Width formatter" can be used to reformat fasta files to have single line sequences. ) - ------- - -**Output formats in GSNAP** - -SAM output format - -Default GSNAP format - See the README_ - - - - - - - diff -r 3be0e0a858fe -r 561503a442f0 gmap/iit_store.xml --- a/gmap/iit_store.xml Tue Nov 08 13:22:34 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ - - Create a map store for known genes or SNPs - - iit_store - - gmap_annotation - gmap_snps - iit - splicesites.iit - introns.iit - snps.iit - - iit_store --version - /bin/bash $shscript 2> $log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (map['type'] == 'genes' and 'splicesites' in map['maps']) - - - (map['type'] == 'genes' and 'introns' in map['maps']) - - - (map['type'] == 'snps') - - - (map['type'] == 'gmap') - - - - -#!/bin/bash -#set $catcmd = 'gzcat -f' -#set $catcmd = 'cat' -#set $ds = chr(36) -#set $gt = chr(62) -#set $lt = chr(60) -#set $ad = chr(38) -#set $ep = chr(33) -#set $toerr = ''.join([$gt,$ad,'2']) -#import os.path -#if $map.type == 'genes': -if [ $ep -e $map.src.genes ]; then echo "$map.src.genes does not exist" $toerr; exit 1; fi -if [ $ep -s $map.src.genes ]; then echo "$map.src.genes is empty" $toerr; exit 2; fi - #if $map.src.src_format == 'refGeneTable': - #if 'splicesites' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | psl_splicesites -s $map.src.col_skip | iit_store -o $splicesites_iit - #end if - #if 'introns' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | psl_introns -s $map.src.col_skip | iit_store -o $introns_iit - #end if - #elif $map.src.src_format == 'gtf': - #if 'splicesites' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | gtf_splicesites | iit_store -o $splicesites_iit - #end if - #if 'introns' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | gtf_introns | iit_store -o $introns_iit - #end if - #elif $map.src.src_format == 'gff3': - #if 'splicesites' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | gff3_splicesites | iit_store -o $splicesites_iit - #end if - #if 'introns' in [ $map.maps.__str__ ]: - $catcmd $map.src.genes | gff3_introns | iit_store -o $introns_iit - #end if - #end if -#elif $map.type == 'snps': -if [ $ep -s $map.src.snps ]; then echo "$map.src.snps is empty" $toerr; exit 2; fi - #if $map.src.snpsex.__str__ != 'None': - $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight -e $map.src.snpsex | iit_store -o $snps_iit - #else: - $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight | iit_store -o $snps_iit - #end if -#else: - $catcmd $map.src.snps | iit_store -o $map_iit -#end if - - - - - - - - - -**iit_store** - -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. - -You will want to read the README_ - -Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 - -.. _GMAP: http://research-pub.gene.com/gmap/ -.. _GSNAP: http://research-pub.gene.com/gmap/ -.. _README: http://research-pub.gene.com/gmap/src/README -.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 - - -**inputs** - - - - diff -r 3be0e0a858fe -r 561503a442f0 gmap/snpindex.xml --- a/gmap/snpindex.xml Tue Nov 08 13:22:34 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ - - build index files for known SNPs - - snpindex - - gmapsnpindex - gmapdb - gmap_snps - snps.iit - - snpindex --version - /bin/bash $shscript 2>1 1> $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#!/bin/bash -#set $ds = chr(36) -#set $gt = chr(62) -#set $lt = chr(60) -#set $ad = chr(38) -#import os.path -#if $refGenomeSource.genomeSource == "gmapdb": -#set $gmapdb = $refGenomeSource.gmapdb.extra_files_path -#set $refname = $refGenomeSource.gmapdb.metadata.db_name -#else: -#set $gmapdb = $os.path.dirname($refGenomeSource.gmapindex.value) -$refname = $os.path.basename($refGenomeSource.gmapindex.value) -#end if -#set $gmapsnpdir = $output.extra_files_path -mkdir -p $gmapsnpdir -#set $snpsname = $snps_name.__str__ -#set $snpsiit = '.'.join([$snpsname,'iit']) -#set $pathsnps = $os.path.join($gmapsnpdir,$snpsname) -#set $pathsnpsiit = $os.path.join($gmapsnpdir,$snpsiit) -#if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None': -#if $dbsnp.snp_source == 'snpTable': -#if $dbsnp.snpsex.__str__ != 'None': -cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $pathsnps -#else: -cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $pathsnps -#end if -#elif $dbsnp.snp_source == 'snpFile': -cat $dbsnp.snps | iit_store -o $pathsnps -#elif $dbsnp.snp_source == 'snpIIT': -cat $dbsnp.snps > $pathsnpsiit -#end if -snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit -echo snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit -#end if - - - - - - - - - -**GMAP SNP Index** - -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). - -You will want to read the README_ - -Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 - -.. _GMAP: http://research-pub.gene.com/gmap/ -.. _GSNAP: http://research-pub.gene.com/gmap/ -.. _README: http://research-pub.gene.com/gmap/src/README -.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 - - - - - diff -r 3be0e0a858fe -r 561503a442f0 gmap_build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gmap_build.xml Tue Nov 08 13:26:41 2011 -0600 @@ -0,0 +1,177 @@ + + a database genome index for GMAP and GSNAP + + gmap_build + + gmapdb + gmap_snps + + gmap --version + /bin/bash $shscript 2>1 1> $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#!/bin/bash +#set $ds = chr(36) +#set $gt = chr(62) +#set $lt = chr(60) +#set $ad = chr(38) +## #set $ref_files = '' +## #for $i in $inputs: + ## #set $ref_files = $ref_files $i.input +## #end for +## echo $ref_files +#import os.path +#set $gmapdb = $output.extra_files_path +#set $mapsdir = $os.path.join($os.path.join($gmapdb,str($refname)), str($refname) + '.maps') +mkdir -p $gmapdb +## export GMAPDB required for cmetindex and atoiindex +export GMAPDB=$gmapdb +#for $k in $kmer.__str__.split(','): +gmap_build -D $gmapdb -d $refname -s numeric-alpha -k $k #for i in $inputs# ${i.input}#end for# +#end for +get-genome -D $gmapdb -d '?' | sed 's/^Available .*/gmap db: /' +echo "kmers: " $kmer +#if $splicesite.splice_source == 'refGeneTable': +#if $splicesite.refGenes.__str__ != 'None': +cat $splicesite.refGenes | psl_splicesites -s $splicesite.col_skip | iit_store -o $os.path.join($mapsdir,'splicesites') +cat $splicesite.refGenes | psl_introns -s $splicesite.col_skip | iit_store -o $os.path.join($mapsdir,'introns') +#end if +#elif $splicesite.splice_source == 'gtf': +#if $splicesite.gtfGenes.__str__ != 'None': +cat $splicesite.gtfGenes | gtf_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') +cat $splicesite.gtfGenes | gtf_introns | iit_store -o $os.path.join($mapsdir,'introns') +#end if +#elif $splicesite.splice_source == 'gff3': +#if $splicesite.gff3Genes.__str__ != 'None': +cat $splicesite.gff3Genes | gff3_splicesites | iit_store -o $os.path.join($mapsdir,'splicesites') +cat $splicesite.gff3Genes | gff3_introns | iit_store -o $os.path.join($mapsdir,'introns') +#end if +#end if +#if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None': +#if $dbsnp.snp_source == 'snpTable': +#if $dbsnp.snpsex.__str__ != 'None': +cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $os.path.join($mapsdir,'snps') +#else: +cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $os.path.join($mapsdir,'snps') +#end if +#else: +cat $dbsnp.snps | iit_store -o $os.path.join($mapsdir,'snps') +#end if +snpindex -d $refname -v snps +echo "snpindex" -d $refname -v snps +#end if +#if $cmetindex.__str__ == 'yes': +cmetindex -d $refname +echo "cmetindex" -d $refname +#end if +#if $atoiindex.__str__ == 'yes': +atoiindex -d $refname +echo "atoiindex" -d $refname +#end if +get-genome -D $gmapdb -d $refname -m '?' | sed 's/^Available maps .*/maps: /' + + + + + + + + + +**GMAP Build** + +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.) + +You will want to read the README_ + +Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 + +.. _GMAP: http://research-pub.gene.com/gmap/ +.. _GSNAP: http://research-pub.gene.com/gmap/ +.. _README: http://research-pub.gene.com/gmap/src/README +.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 + + + + + diff -r 3be0e0a858fe -r 561503a442f0 gsnap.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsnap.xml Tue Nov 08 13:26:41 2011 -0600 @@ -0,0 +1,834 @@ + + Genomic Short-read Nucleotide Alignment Program + + gsnap + + gmapdb + gmapsnpindex + splicesites.iit + introns.iit + + gsnap --version + + #import os.path, re + gsnap + --nthreads="4" --ordered + #if $refGenomeSource.genomeSource == "gmapdb": + #set $gmapdb = $os.listdir($refGenomeSource.gmapdb.extra_files_path)[0] + --dir=$refGenomeSource.gmapdb.extra_files_path --db=$refGenomeSource.gmapdb.metadata.db_name + #else: + --dir=$os.path.dirname($refGenomeSource.gmapindex.value) --db=$os.path.basename($refGenomeSource.gmapindex.value) + #end if + #if $refGenomeSource.kmer != None and len($refGenomeSource.kmer.__str__) == 2: + --kmer=$refGenomeSource.kmer + #end if + #if $refGenomeSource.use_splicing.src == 'gmapdb': + #if $refGenomeSource.use_splicing.splicemap != None and len($refGenomeSource.use_splicing.splicemap.__str__) > 0: + -s $refGenomeSource.use_splicing.splicemap.value + #end if + #elif $refGenomeSource.use_splicing.src == 'history': + #if $refGenomeSource.use_splicing.splicemap != None and len($refGenomeSource.use_splicing.splicemap.__str__) > 0: + -S $os.path.dirname($refGenomeSource.use_splicing.splicemap) -s $os.path.basename($refGenomeSource.use_splicing.splicemap) + #end if + #end if + #if $refGenomeSource.use_snps.src == 'gmapdb': + #if $refGenomeSource.use_snps.snpindex != None and len($refGenomeSource.use_snps.snpindex.__str__) > 0: + -v $refGenomeSource.use_snps.snpindex.value + #end if + #elif $refGenomeSource.use_snps.src == 'history': + #if $refGenomeSource.use_snps.snpindex != None and len($refGenomeSource.use_snps.snpindex.__str__) > 0: + -V $refGenomeSource.use_snps.snpindex.extra_files_path -v $refGenomeSource.use_snps.snpindex.metadata.snps_name + #end if + #end if + #if $refGenomeSource.mode.__str__ != '': + --mode=$refGenomeSource.mode + #end if + #if $mapq_unique_score.__str__ != '': + --mapq-unique-score=$mapq_unique_score + #end if + #if $computation.options == "advanced": + #if $computation.max_mismatches.__str__ != '': + --max-mismatches=$computation.max_mismatches + #end if + $computation.query_unk_mismatch + $computation.genome_unk_mismatch + #if $computation.terminal_threshold.__str__ != '': + --terminal-threshold=$computation.terminal_threshold + #end if + #if $computation.indel_penalty.__str__ != '': + --indel-penalty=$computation.indel_penalty + #end if + #if $computation.indel_endlength.__str__ != '': + --indel-endlength=$computation.indel_endlength + #end if + #if $computation.max_middle_insertions.__str__ != '': + --max-middle-insertions=$computation.max_middle_insertions + #end if + #if $computation.max_middle_deletions.__str__ != '': + --max-middle-deletions=$computation.max_middle_deletions + #end if + #if $computation.max_end_insertions.__str__ != '': + --max-end-insertions=$computation.max_end_insertions + #end if + #if $computation.max_end_deletions.__str__ != '': + --max-end-deletions=$computation.max_end_deletions + #end if + #if $computation.suboptimal_levels.__str__ != '': + --suboptimal-levels=$computation.suboptimal_levels + #end if + #if $computation.adapter_strip.__str__ != '': + --adapter-strip=$computation.adapter_strip + #end if + #if $computation.trim_mismatch_score.__str__ != '': + --trim-mismatch-score=$computation.trim_mismatch_score + #end if + ## TODO - do we need these options (Is it tally XOR runlength?): + ## --tallydir= --use-tally=tally + ## --runlengthdir --use-runlength=runlength + #if $computation.use_tally != None and len($computation.use_tally.__str__) > 0: + ##--tallydir $os.path.dirname($computation.use_tally) --use-tally $os.path.basename($computation.use_tally) + --use-tally=$computation.use_tally + #end if + ## gmap options + #if $computation.gmap_mode.__str__ != '' and $computation.gmap_mode.__str__ != 'None': + --gmap-mode='$computation.gmap_mode' + #end if + #if $computation.trigger_score_for_gmap.__str__ != '': + --trigger-score-for-gmap=$computation.trigger_score_for_gmap + #end if + #if $computation.max_gmap_pairsearch.__str__ != '' and $re.search("pairsearch",$computation.gmap_mode): + --max-gmap-pairsearch=$computation.max_gmap_pairsearch + #end if + #if $computation.max_gmap_terminal.__str__ != '' and $re.search("terminal",$computation.gmap_mode): + --max-gmap-terminal=$computation.max_gmap_terminal + #end if + #if $computation.max_gmap_improvement.__str__ != '' and $re.search("improv",$computation.gmap_mode): + --max-gmap-improvement=$computation.max_gmap_improvement + #end if + #if $computation.microexon_spliceprob.__str__ != '': + --microexon-spliceprob=$computation.microexon_spliceprob + #end if + #end if + #if $splicing.options == "advanced": + $splicing.novelsplicing + #if $splicing.localsplicedist.__str__ != '': + --localsplicedist=$splicing.localsplicedist + #end if + #if $splicing.local_splice_penalty.__str__ != '': + --local-splice-penalty=$splicing.local_splice_penalty + #end if + #if $splicing.distant_splice_penalty.__str__ != '': + --distant-splice-penalty=$splicing.distant_splice_penalty + #end if + #if $splicing.local_splice_endlength.__str__ != '': + --local-splice-endlength=$splicing.local_splice_endlength + #end if + #if $splicing.distant_splice_endlength.__str__ != '': + --distant-splice-endlength=$splicing.distant_splice_endlength + #end if + #if $splicing.distant_splice_identity.__str__ != '': + --distant-splice-identity=$splicing.distant_splice_identity + #end if + #end if + #if $output.options == "advanced": + #if $output.npath.__str__ != '': + --npath=$output.npath + #end if + $output.quiet_if_excessive + $output.show_refdiff + $output.clip_overlap + #end if + #if $result.format == "sam": + --format=sam + $result.no_sam_headers + #if $result.read_group_id.__str__.strip != '': + --read-group-id='$result.read_group_id' + #end if + #if $result.read_group_name.__str__ != '': + --read-group-name='$result.read_group_name' + #end if + #if $result.read_group_library.__str__ != '': + --read-group-library='$result.read_group_library' + #end if + #if $result.read_group_platform.__str__ != '': + --read-group-platform='$result.read_group_platform' + #end if + #if $result.quality_shift.__str__ != '': + --quality-shift=$result.quality_shift + #end if + #elif $result.format == "goby": + #if $result.goby_output.__str__ != '': + --goby-output='$result.goby_output' + #end if + #if $result.creads_window_start.__str__ != '': + --creads-window-start=$result.creads_window_start + #end if + #if $result.creads_window_end.__str__ != '': + --creads-window-end=$result.creads_window_end + #end if + $result.creads_complement + #end if + #if $results.split_output == 'yes': + --split-output=gsnap_out + #if $results.fails.choice == 'nofails': + --nofails + #elif $results.fails.choice == 'failsonly': + --failsonly + #end if + $results.fails_as_input + #else + #if $results.fails.choice == 'nofails': + --nofails + #elif $results.fails.choice == 'failsonly': + --failsonly + $results.fails.fails_as_input + #end if + #end if + #if $seq.format == "gsnap_fasta": + $seq.circularinput $seq.gsnap + #else if $seq.format == "fastq": + #if $seq.barcode_length.__str__ != '': + --barcode-length=$seq.barcode_length + #end if + #if $seq.fastq_id_start.__str__ != '': + --fastq-id-start=$seq.fastq_id_start + #end if + #if $seq.fastq_id_end.__str__ != '': + --fastq-id-end=$seq.fastq_id_end + #end if + #if $seq.filter_chastity.__str__ != 'off': + --filter-chastity=$seq.filter_chastity + #end if + #if $seq.paired.ispaired.__str__ == 'yes': + #if $seq.paired.pairmax_dna.__str__ != '': + --pairmax-dna=$seq.paired.pairmax_dna + #end if + #if $seq.paired.pairmax_rna.__str__ != '': + --pairmax-rna=$seq.paired.pairmax_rna + #end if + $seq.fastq $seq.paired.fastq + #else + $seq.fastq + #end if + #end if + #if $results.split_output == 'yes': + 2> $gsnap_stderr + #else: + #if $results.fails.choice.__str__ == 'failsonly' and $results.fails.fails_as_input.__str__ != '': + 2> $gsnap_stderr > $gsnap_fq + #else + 2> $gsnap_stderr > $gsnap_out + #end if + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (results['split_output'] == 'no' and (results['fails']['choice'] != 'failsonly' or results['fails']['fails_as_input'] == False)) + + + + + + + + (results['split_output'] == 'no' and results['fails']['choice'] == 'failsonly' and results['fails']['fails_as_input'] == True) + + + + + + (results['split_output'] == 'yes') + + + + + + + (results['split_output'] == 'yes') + + + + + + + (results['split_output'] == 'yes') + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + + (results['split_output'] == 'yes' and results['fails_as_input'] == False) + + + + + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == False) + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + (results['split_output'] == 'yes' and seq['format'] == 'fastq' and seq['paired']['ispaired'] == True) + + + + + + + + + + +**What it does** + +GSNAP_ (Genomic Short-read Nucleotide Alignment Program) is a short read aligner which can align both single- and paired-end reads as short as 14nt and of arbitrarily long length. It can detect short- and long-distance splicing, including interchromosomal splicing, in individual reads, using probabilistic models or a database of known splice sites. Our program also permits SNP-tolerant alignment to a reference space of all possible combinations of major and minor alleles, and can align reads from bisulfite-treated DNA for the study of methylation state. It is developed by Thomas D. Wu of Genentech, Inc. +Publication_ citation: Thomas D. Wu, Serban Nacu "Fast and SNP-tolerant detection of complex variants and splicing in short reads. Bioinformatics. 2010 Apr 1;26(7):873-81. Epub 2010 Feb 10. + +.. _GSNAP: http://research-pub.gene.com/gmap/ +.. _Publication: http://bioinformatics.oupjournals.org/cgi/content/full/26/7/873 +http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2844994/?tool=pubmed + +------ + +**Know what you are doing** + +.. class:: warningmark + +You will want to read the README_ + +.. _README: http://research-pub.gene.com/gmap/src/README + +------ + +**Input formats** + +Input to GSNAP should be either in FASTQ or FASTA format. + +The FASTQ input may include quality scores, which will then be included in SAM +output, if that output format is selected. + +For FASTA format, you should include one line per read (or end of a +paired-end read). The same FASTA file can have a mixture of +single-end and paired-end reads of varying lengths, if desired. + +Single-end reads: + +Each FASTA entry should contain one short read per line, like this + +>Header information +AAAACATTCTCCTCCGCATAAGCCTGCGTCAGATTA + +Each short read can have a different length. However, the entire read +needs to be on a single line, and may not wrap around multiple lines. +If it extends to a second line, GSNAP will think that the read is +paired-end. + + +Paired-end reads: + +Each FASTA entry should contain two short reads, one per line, like +this + +>Header information +AAAACATTCTCCTCCGCATAAGCCTAGTAGATTA +GGCGTAGGTAGAAGTAGAGGTTAAGGCGCGTCAG + +By default, the program assumes that the second end is in the reverse +complement direction compared with the first end. If they are in the +same direction, you may need to use the --circular-input (or -c) flag. + +( The Galaxy tool: "FASTA Width formatter" can be used to reformat fasta files to have single line sequences. ) + +------ + +**Output formats in GSNAP** + +SAM output format + +Default GSNAP format + See the README_ + + + + + + + diff -r 3be0e0a858fe -r 561503a442f0 iit_store.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/iit_store.xml Tue Nov 08 13:26:41 2011 -0600 @@ -0,0 +1,188 @@ + + Create a map store for known genes or SNPs + + iit_store + + gmap_annotation + gmap_snps + iit + splicesites.iit + introns.iit + snps.iit + + iit_store --version + /bin/bash $shscript 2> $log + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (map['type'] == 'genes' and 'splicesites' in map['maps']) + + + (map['type'] == 'genes' and 'introns' in map['maps']) + + + (map['type'] == 'snps') + + + (map['type'] == 'gmap') + + + + +#!/bin/bash +#set $catcmd = 'gzcat -f' +#set $catcmd = 'cat' +#set $ds = chr(36) +#set $gt = chr(62) +#set $lt = chr(60) +#set $ad = chr(38) +#set $ep = chr(33) +#set $toerr = ''.join([$gt,$ad,'2']) +#import os.path +#if $map.type == 'genes': +if [ $ep -e $map.src.genes ]; then echo "$map.src.genes does not exist" $toerr; exit 1; fi +if [ $ep -s $map.src.genes ]; then echo "$map.src.genes is empty" $toerr; exit 2; fi + #if $map.src.src_format == 'refGeneTable': + #if 'splicesites' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | psl_splicesites -s $map.src.col_skip | iit_store -o $splicesites_iit + #end if + #if 'introns' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | psl_introns -s $map.src.col_skip | iit_store -o $introns_iit + #end if + #elif $map.src.src_format == 'gtf': + #if 'splicesites' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | gtf_splicesites | iit_store -o $splicesites_iit + #end if + #if 'introns' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | gtf_introns | iit_store -o $introns_iit + #end if + #elif $map.src.src_format == 'gff3': + #if 'splicesites' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | gff3_splicesites | iit_store -o $splicesites_iit + #end if + #if 'introns' in [ $map.maps.__str__ ]: + $catcmd $map.src.genes | gff3_introns | iit_store -o $introns_iit + #end if + #end if +#elif $map.type == 'snps': +if [ $ep -s $map.src.snps ]; then echo "$map.src.snps is empty" $toerr; exit 2; fi + #if $map.src.snpsex.__str__ != 'None': + $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight -e $map.src.snpsex | iit_store -o $snps_iit + #else: + $catcmd $map.src.snps | dbsnp_iit -w $map.src.weight | iit_store -o $snps_iit + #end if +#else: + $catcmd $map.src.snps | iit_store -o $map_iit +#end if + + + + + + + + + +**iit_store** + +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. + +You will want to read the README_ + +Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 + +.. _GMAP: http://research-pub.gene.com/gmap/ +.. _GSNAP: http://research-pub.gene.com/gmap/ +.. _README: http://research-pub.gene.com/gmap/src/README +.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 + + +**inputs** + + + + diff -r 3be0e0a858fe -r 561503a442f0 snpindex.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/snpindex.xml Tue Nov 08 13:26:41 2011 -0600 @@ -0,0 +1,141 @@ + + build index files for known SNPs + + snpindex + + gmapsnpindex + gmapdb + gmap_snps + snps.iit + + snpindex --version + /bin/bash $shscript 2>1 1> $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#!/bin/bash +#set $ds = chr(36) +#set $gt = chr(62) +#set $lt = chr(60) +#set $ad = chr(38) +#import os.path +#if $refGenomeSource.genomeSource == "gmapdb": +#set $gmapdb = $refGenomeSource.gmapdb.extra_files_path +#set $refname = $refGenomeSource.gmapdb.metadata.db_name +#else: +#set $gmapdb = $os.path.dirname($refGenomeSource.gmapindex.value) +$refname = $os.path.basename($refGenomeSource.gmapindex.value) +#end if +#set $gmapsnpdir = $output.extra_files_path +mkdir -p $gmapsnpdir +#set $snpsname = $snps_name.__str__ +#set $snpsiit = '.'.join([$snpsname,'iit']) +#set $pathsnps = $os.path.join($gmapsnpdir,$snpsname) +#set $pathsnpsiit = $os.path.join($gmapsnpdir,$snpsiit) +#if $dbsnp.snp_source != 'none' and $dbsnp.snps.__str__ != 'None': +#if $dbsnp.snp_source == 'snpTable': +#if $dbsnp.snpsex.__str__ != 'None': +cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight -e $dbsnp.snpsex | iit_store -o $pathsnps +#else: +cat $dbsnp.snps | dbsnp_iit -w $dbsnp.weight | iit_store -o $pathsnps +#end if +#elif $dbsnp.snp_source == 'snpFile': +cat $dbsnp.snps | iit_store -o $pathsnps +#elif $dbsnp.snp_source == 'snpIIT': +cat $dbsnp.snps > $pathsnpsiit +#end if +snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit +echo snpindex -D $gmapdb -d $refname -V $output.extra_files_path -v $snpsname $pathsnpsiit +#end if + + + + + + + + + +**GMAP SNP Index** + +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). + +You will want to read the README_ + +Publication_ citation: Thomas D. Wu, Colin K. Watanabe Bioinformatics 2005 21(9):1859-1875; doi:10.1093/bioinformatics/bti310 + +.. _GMAP: http://research-pub.gene.com/gmap/ +.. _GSNAP: http://research-pub.gene.com/gmap/ +.. _README: http://research-pub.gene.com/gmap/src/README +.. _Publication: http://bioinformatics.oxfordjournals.org/cgi/content/full/21/9/1859 + + + + +