# HG changeset patch # User jjohnson # Date 1343737186 14400 # Node ID 6adc485b6dc073e0defd6dd232840fb563923f34 # Parent 93911bac43da3c97cc9b6ac492e0e83ce7ee19de Uploaded diff -r 93911bac43da -r 6adc485b6dc0 README --- a/README Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -GMAP applications and citation info are available from: http://research-pub.gene.com/gmap/ - - - Installation instructions are in the README file in the download, - and online: http://research-pub.gene.com/gmap/src/README - - These tools were consistent with gmap version: 2011-11-30 - - -GMAP and GSNAP use added datatypes: - - add datatype definition file: lib/galaxy/datatypes/gmap.py - - add the following import line to: lib/galaxy/datatypes/registry.py - import gmap # added for gmap tools - - add to datatypes_conf.xml - - - - - - - - - - - - - - - - -Tools: - GMAP_Build - create a GmapDB set of index files for a reference sequence and optional set of annotations - GMAP - map sequences to a reference sequence GmapDB index - GSNAP - align sequences to a reference and detect splicing - - Add to tool_conf.xml ( probably in the "NGS: Mapping" section ) - - - - - - -Admin built cached gmapdb indexes defined in tool-data/gmap_indices.loc - - -TODO: - - - Add classes to gmap.py - CmetIndex - an index created by cmetindex - AtoiIndex - an index created by atoiindex - - Add tally creation - gsnap default output -> gsnap_tally -> iit_store - - Add goby support - Should add separate tools and datatypes for goby - GSNAP goby output relies on goby input, might be better to have a separate gsnap tool for goby - - Possibly add Tools: - get_genome - retrieves from a gmapdb - cmetindex - create methylcytosine index - atoiindex - create A-to-I RNA editing index - - - - - diff -r 93911bac43da -r 6adc485b6dc0 gmap.xml --- a/gmap.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,482 +0,0 @@ - - Genomic Mapping and Alignment Program for mRNA and EST sequences - - gmap - - 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 - #* Removed in gmap version 2011-11-30 - #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 - #if len($computation.min_intronlength.__str__) > 0 - --min-intronlength=$computation.min_intronlength - #end if - #if len($computation.intronlength.__str__) > 0 - --intronlength=$computation.intronlength - #end if - #if len($computation.localsplicedist.__str__) > 0 - --localsplicedist=$computation.localsplicedist - #end if - #if len($computation.totallength.__str__) > 0 - --totallength=$computation.totallength - #end if - #if len($computation.trimendexons.__str__) > 0 - --trimendexons=$computation.trimendexons - #end if - --direction=$computation.direction - --canonical-mode=$computation.canonical - --prunelevel=$computation.prunelevel - --allow-close-indels=$computation.allow_close_indels - #if len($computation.microexon_spliceprob.__str__) >= 0: - --microexon-spliceprob=$computation.microexon_spliceprob - #end if - #if len($computation.chimera_margin.__str__) >= 0: - --chimera-margin=$computation.chimera_margin - #end if - #end if - #if $advanced.options == "used": - #if len($advanced.npaths.__str__) > 0: - --npaths=$advanced.npaths - #end if - #if len($advanced.suboptimal_score.__str__) > 0: - --suboptimal-score=$advanced.suboptimal_score - #end if - #if len($advanced.chimera_overlap.__str__) > 0: - --chimera_overlap=$advanced.chimera_overlap - #end if - $advanced.protein - $advanced.tolerant - $advanced.nolengths - $advanced.invertmode - #if len($advanced.introngap.__str__) > 0: - --introngap=$advanced.introngap - #end if - #if len($advanced.wraplength.__str__) > 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 93911bac43da -r 6adc485b6dc0 gmap_build.xml --- a/gmap_build.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ - - a database genome index for GMAP and GSNAP - - gmap_build - - 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 93911bac43da -r 6adc485b6dc0 gsnap.xml --- a/gsnap.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,864 +0,0 @@ - - Genomic Short-read Nucleotide Alignment Program - - gsnap - - 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 - #if $computation.trim_mismatch_score.__str__ == '0': - $ambig_splice_noclip - #end if - #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) - #if $computation.trim_mismatch_score.__str__ == '0': - $ambig_splice_noclip - #end if - #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 - #* ## No longer in options as of version 2011-11-30 - #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 - #if $computation.trim_indel_score.__str__ != '': - --trim-indel-score=$computation.trim_indel_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 - #if $seq.paired.pairexpect.__str__ != '': - --pairexpect=$seq.paired.pairexpect - #end if - #if $seq.paired.pairdev.__str__ != '': - --pairdev=$seq.paired.pairdev - #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 93911bac43da -r 6adc485b6dc0 iit_store.xml --- a/iit_store.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ - - Create a map store for known genes or SNPs - - iit_store - - 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 93911bac43da -r 6adc485b6dc0 lib/galaxy/datatypes/gmap.py --- a/lib/galaxy/datatypes/gmap.py Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,472 +0,0 @@ -""" -GMAP indexes -""" -import logging -import os,os.path,re -import galaxy.datatypes.data -from galaxy.datatypes.data import Text -from galaxy import util -from galaxy.datatypes.metadata import MetadataElement - -log = logging.getLogger(__name__) - -class GmapDB( Text ): - """ - A GMAP DB for indexes - """ - MetadataElement( name="db_name", desc="The db name for this index set", default='unknown', set_in_upload=True, readonly=True ) - MetadataElement( name="basesize", default="12", desc="The basesize for offsetscomp", visible=True, readonly=True ) - MetadataElement( name="kmers", default=[''], desc="The kmer sizes for indexes", visible=True, no_value=[''], readonly=True ) - MetadataElement( name="map_dir", desc="The maps directory", default='unknown', set_in_upload=True, readonly=True ) - MetadataElement( name="maps", default=[''], desc="The names of maps stored for this gmap gmapdb", visible=True, no_value=[''], readonly=True ) - MetadataElement( name="snps", default=[''], desc="The names of SNP indexes stored for this gmapdb", visible=True, no_value=[''], readonly=True ) - MetadataElement( name="cmet", default=False, desc="Has a cmet index", visible=True, readonly=True ) - MetadataElement( name="atoi", default=False, desc="Has a atoi index", visible=True, readonly=True ) - - file_ext = 'gmapdb' - is_binary = True - composite_type = 'auto_primary_file' - allow_datatype_change = False - - def generate_primary_file( self, dataset = None ): - """ - This is called only at upload to write the html file - cannot rename the datasets here - they come with the default unfortunately - """ - return 'AutoGenerated Primary File for Composite Dataset' - - def regenerate_primary_file(self,dataset): - """ - cannot do this until we are setting metadata - """ - bn = dataset.metadata.db_name - log.info( "GmapDB regenerate_primary_file %s" % (bn)) - rval = ['GMAPDB %s

GMAPDB %s

cmet %s
atoi %s

Maps:

    ' % (bn,bn,dataset.metadata.cmet,dataset.metadata.atoi)] - for i,name in enumerate(dataset.metadata.maps): - rval.append( '
  • %s' % name) - rval.append( '
' ) - f = file(dataset.file_name,'w') - f.write("\n".join( rval )) - f.write('\n') - f.close() - - def set_peek( self, dataset, is_multi_byte=False ): - log.info( "GmapDB set_peek %s" % (dataset)) - if not dataset.dataset.purged: - dataset.peek = "GMAPDB index %s\n cmet %s\n atoi %s\n maps %s" % ( dataset.metadata.db_name,dataset.metadata.cmet,dataset.metadata.atoi,dataset.metadata.maps ) - dataset.blurb = "GMAPDB %s" % ( dataset.metadata.db_name ) - else: - dataset.peek = 'file does not exist' - dataset.blurb = 'file purged from disk' - def display_peek( self, dataset ): - try: - return dataset.peek - except: - return "GMAP index file" - - def sniff( self, filename ): - return False - def set_meta( self, dataset, overwrite = True, **kwd ): - """ - Expecting: - extra_files_path//db_name>.ref3 - extra_files_path/db_name/db_name.ref1[2345]1[2345]3offsetscomp - extra_files_path/db_name/db_name.ref1[2345]1[2345]3positions - extra_files_path/db_name/db_name.ref1[2345]1[2345]3gammaptrs - index maps: - extra_files_path/db_name/db_name.maps/*.iit - """ - log.info( "GmapDB set_meta %s %s" % (dataset,dataset.extra_files_path)) - pat = '(.*)\.((ref)|(met)[atgc][atgc]|(a2i)[atgc][atgc])((\d\d)(\d\d))?3positions(\.(.+))?' - efp = dataset.extra_files_path - flist = os.listdir(efp) - for i,fname in enumerate(flist): - log.info( "GmapDB set_meta %s %s" % (i,fname)) - fpath = os.path.join(efp,fname) - if os.path.isdir(fpath): - ilist = os.listdir(fpath) - kmers = {'':'default'} # HACK '' empty key added so user has default choice when selecting kmer from metadata - for j,iname in enumerate(ilist): - log.info( "GmapDB set_meta file %s %s" % (j,iname)) - ipath = os.path.join(fpath,iname) - if os.path.isdir(ipath): # find maps - dataset.metadata.map_dir = iname - for mapfile in os.listdir(ipath): - mapname = mapfile.replace('.iit','') - log.info( "GmapDB set_meta map %s %s" % (mapname,mapfile)) - dataset.metadata.maps.append(mapname) - else: - m = re.match(pat,iname) - if m: - log.info( "GmapDB set_meta m %s %s " % (iname, m)) - assert len(m.groups()) == 10 - dataset.metadata.db_name = fname - if m.groups()[2] == 'ref': - if m.groups()[-1] != None: - dataset.metadata.snps.append(m.groups()[-1]) - else: - if m.groups()[-3] != None: - k = int(m.groups()[-3]) - kmers[k] = k - if m.groups()[-4] != None: - dataset.metadata.basesize = int( m.groups()[-4]) - elif m.groups()[3] == 'met': - dataset.metadata.cmet = True - elif m.groups()[4] == 'a2i': - dataset.metadata.atoi = True - dataset.metadata.kmers = kmers.keys() - -class GmapSnpIndex( Text ): - """ - A GMAP SNP index created by snpindex - """ - MetadataElement( name="db_name", desc="The db name for this index set", default='unknown', set_in_upload=True, readonly=True ) - MetadataElement( name="snps_name", default='snps', desc="The name of SNP index", visible=True, no_value='', readonly=True ) - - file_ext = 'gmapsnpindex' - is_binary = True - composite_type = 'auto_primary_file' - allow_datatype_change = False - - def generate_primary_file( self, dataset = None ): - """ - This is called only at upload to write the html file - cannot rename the datasets here - they come with the default unfortunately - """ - return 'AutoGenerated Primary File for Composite Dataset' - - def regenerate_primary_file(self,dataset): - """ - cannot do this until we are setting metadata - """ - bn = dataset.metadata.db_name - log.info( "GmapDB regenerate_primary_file %s" % (bn)) - rval = ['GMAPDB %s

GMAPDB %s

cmet %s
atoi %s

Maps:

    ' % (bn,bn,dataset.metadata.cmet,dataset.metadata.atoi)] - for i,name in enumerate(dataset.metadata.maps): - rval.append( '
  • %s' % name) - rval.append( '
' ) - f = file(dataset.file_name,'w') - f.write("\n".join( rval )) - f.write('\n') - f.close() - def set_peek( self, dataset, is_multi_byte=False ): - log.info( "GmapSnpIndex set_peek %s" % (dataset)) - if not dataset.dataset.purged: - dataset.peek = "GMAP SNPindex %s on %s\n" % ( dataset.metadata.snps_name,dataset.metadata.db_name) - dataset.blurb = "GMAP SNPindex %s on %s\n" % ( dataset.metadata.snps_name,dataset.metadata.db_name) - else: - dataset.peek = 'file does not exist' - dataset.blurb = 'file purged from disk' - def display_peek( self, dataset ): - try: - return dataset.peek - except: - return "GMAP SNP index" - - def sniff( self, filename ): - return False - def set_meta( self, dataset, overwrite = True, **kwd ): - """ - Expecting: - extra_files_path/snp_name.iit - extra_files_path/db_name/db_name.ref1[2345]1[2345]3offsetscomp.snp_name - extra_files_path/db_name/db_name.ref1[2345]1[2345]3positions.snp_name - extra_files_path/db_name/db_name.ref1[2345]1[2345]3gammaptrs.snp_name - """ - log.info( "GmapSnpIndex set_meta %s %s" % (dataset,dataset.extra_files_path)) - pat = '(.*)\.(ref((\d\d)(\d\d))?3positions)\.(.+)?' - efp = dataset.extra_files_path - flist = os.listdir(efp) - for i,fname in enumerate(flist): - m = re.match(pat,fname) - if m: - assert len(m.groups()) == 6 - dataset.metadata.db_name = m.groups()[0] - dataset.metadata.snps_name = m.groups()[-1] - - - - -class IntervalIndexTree( Text ): - """ - A GMAP Interval Index Tree Map - created by iit_store - (/path/to/map)/(mapname).iit - """ - file_ext = 'iit' - is_binary = True - -class SpliceSitesIntervalIndexTree( IntervalIndexTree ): - """ - A GMAP Interval Index Tree Map - created by iit_store - """ - file_ext = 'splicesites.iit' - -class IntronsIntervalIndexTree( IntervalIndexTree ): - """ - A GMAP Interval Index Tree Map - created by iit_store - """ - file_ext = 'introns.iit' - -class SNPsIntervalIndexTree( IntervalIndexTree ): - """ - A GMAP Interval Index Tree Map - created by iit_store - """ - file_ext = 'snps.iit' - -class TallyIntervalIndexTree( IntervalIndexTree ): - """ - A GMAP Interval Index Tree Map - created by iit_store - """ - file_ext = 'tally.iit' - -class IntervalAnnotation( Text ): - """ - Class describing a GMAP Interval format: - >label coords optional_tag - optional_annotation (which may be zero, one, or multiple lines) - The coords should be of the form: - chr:position - chr:startposition..endposition - """ - file_ext = 'gmap_annotation' - """Add metadata elements""" - MetadataElement( name="annotations", default=0, desc="Number of interval annotations", readonly=True, optional=True, visible=False, no_value=0 ) - - def set_meta( self, dataset, **kwd ): - """ - Set the number of annotations and the number of data lines in dataset. - """ - data_lines = 0 - annotations = 0 - for line in file( dataset.file_name ): - line = line.strip() - if line and line.startswith( '>' ): - annotations += 1 - data_lines +=1 - else: - data_lines += 1 - dataset.metadata.data_lines = data_lines - dataset.metadata.annotations = annotations - def set_peek( self, dataset, is_multi_byte=False ): - if not dataset.dataset.purged: - dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte ) - if dataset.metadata.annotations: - dataset.blurb = "%s annotations" % util.commaify( str( dataset.metadata.annotations ) ) - else: - dataset.blurb = data.nice_size( dataset.get_size() ) - else: - dataset.peek = 'file does not exist' - dataset.blurb = 'file purged from disk' - - def sniff( self, filename ): - """ - Determines whether the file is a gmap annotation file - Format: - >label coords optional_tag - optional_annotation (which may be zero, one, or multiple lines) - For example, the label may be an EST accession, with the coords - representing its genomic position. Labels may be duplicated if - necessary. - The coords should be of the form - chr:position - chr:startposition..endposition - The term "chr:position" is equivalent to "chr:position..position". If - you want to indicate that the interval is on the minus strand or - reverse direction, then may be less than . - """ - try: - pat = '>(\S+)\s((\S+):(\d+)(\.\.(\d+))?(\s.(.+))?$' #>label chr:position[..endposition][ optional_tag] - fh = open( filename ) - count = 0 - while True and count < 10: - line = fh.readline() - if not line: - break #EOF - line = line.strip() - if line: #first non-empty line - if line.startswith( '>' ): - count += 1 - if re.match(pat,line) == None: # Failed to match - return False - finally: - fh.close() - return False - -class SpliceSiteAnnotation(IntervalAnnotation): - file_ext = 'gmap_splicesites' - """ - Example: - >NM_004448.ERBB2.exon1 17:35110090..35110091 donor 6678 - >NM_004448.ERBB2.exon2 17:35116768..35116769 acceptor 6678 - >NM_004448.ERBB2.exon2 17:35116920..35116921 donor 1179 - >NM_004448.ERBB2.exon3 17:35118099..35118100 acceptor 1179 - >NM_004449.ERG.exon1 21:38955452..38955451 donor 783 - >NM_004449.ERG.exon2 21:38878740..38878739 acceptor 783 - >NM_004449.ERG.exon2 21:38878638..38878637 donor 360 - >NM_004449.ERG.exon3 21:38869542..38869541 acceptor 360 - Each line must start with a ">" character, then be followed by an - identifier, which may have duplicates and can have any format, with - the gene name or exon number shown here only as a suggestion. Then - there should be the chromosomal coordinates which straddle the - exon-intron boundary, so one coordinate is on the exon and one is on - the intron. (Coordinates are all 1-based, so the first character of a - chromosome is number 1.) Finally, there should be the splice type: - "donor" or "acceptor". You may optionally store the intron distance - at the end. GSNAP can use this intron distance, if it is longer than - its value for --localsplicedist, to look for long introns at that - splice site. The same splice site may have different intron distances - in the database; GSNAP will use the longest intron distance reported - in searching for long introns. - """ - def sniff( self, filename ): # TODO - """ - Determines whether the file is a gmap splice site annotation file - """ - try: - pat = '>(\S+\.intron\d+)\s((\S+):(\d+)\.\.(\d+))\s(donor|acceptor)(\s(\d+))?$' #>label chr:position..position donor|acceptor[ intron_dist] - fh = open( filename ) - count = 0 - while True and count < 10: - line = fh.readline() - if not line: - break #EOF - line = line.strip() - if line: #first non-empty line - count += 1 - if re.match(pat,line) == None: # Failed to match - return False - finally: - fh.close() - return False - -class IntronAnnotation(IntervalAnnotation): - file_ext = 'gmap_introns' - """ - Example: - >NM_004448.ERBB2.intron1 17:35110090..35116769 - >NM_004448.ERBB2.intron2 17:35116920..35118100 - >NM_004449.ERG.intron1 21:38955452..38878739 - >NM_004449.ERG.intron2 21:38878638..38869541 - The coordinates are 1-based, and specify the exon coordinates - surrounding the intron, with the first coordinate being from the donor - exon and the second one being from the acceptor exon. - """ - def sniff( self, filename ): # TODO - """ - Determines whether the file is a gmap Intron annotation file - """ - try: - pat = '>(\S+\.intron\d+)\s((\S+):(\d+)\.\.(\d+)(\s(.)+)?$' #>label chr:position - fh = open( filename ) - count = 0 - while True and count < 10: - line = fh.readline() - if not line: - break #EOF - line = line.strip() - if line: #first non-empty line - count += 1 - if re.match(pat,line) == None: # Failed to match - return False - finally: - fh.close() - return False - -class SNPAnnotation(IntervalAnnotation): - file_ext = 'gmap_snps' - """ - Example: - >rs62211261 21:14379270 CG - >rs62211262 21:14379281 AT - >rs62211263 21:14379298 WN - Each line must start with a ">" character, then be followed by an - identifier (which may have duplicates). Then there should be the - chromosomal coordinate of the SNP. (Coordinates are all 1-based, so - the first character of a chromosome is number 1.) Finally, there - should be the two possible alleles. (Previous versions required that - these be in alphabetical order: "AC", "AG", "AT", "CG", "CT", or "GT", - but that is no longer a requirement.) These alleles must correspond - to the possible nucleotides on the plus strand of the genome. If the - one of these two letters does not match the allele in the reference - sequence, that SNP will be ignored in subsequent processing as a - probable error. - - GSNAP also supports the idea of a wildcard SNP. A wildcard SNP allows - all nucleotides to match at that position, not just a given reference - and alternate allele. It is essentially as if an "N" were recorded at - that genomic location, although the index files still keep track of - the reference allele. To indicate that a position has a wildcard SNP, - you can indicate the genotype as "WN", where "W" is the reference - allele. Another indication of a wildcard SNP is to provide two - separate lines at that position with the genotypes "WX" and "WY", - where "W" is the reference allele and "X" and "Y" are two different - alternate alleles. - """ - def sniff( self, filename ): - """ - Determines whether the file is a gmap SNP annotation file - """ - try: - pat = '>(\S+)\s((\S+):(\d+)\s([TACGW][TACGN])$' #>label chr:position ATCG - fh = open( filename ) - count = 0 - while True and count < 10: - line = fh.readline() - if not line: - break #EOF - line = line.strip() - if line: #first non-empty line - count += 1 - if re.match(pat,line) == None: # Failed to match - return False - finally: - fh.close() - return False - - -class TallyAnnotation(IntervalAnnotation): - file_ext = 'gsnap_tally' - """ - Output produced by gsnap_tally - Example: - >144 chr20:57268791..57268935 - G0 - A1(1@7|1Q-3) - A2(1@36,1@1|1Q2,1Q-8) - C2 0.889,0.912,0.889,0.889,0.933,0.912,0.912,0.889,0.889,0.889 -2.66,-2.89,-2.66,-2.66,-3.16,-2.89,-2.89,-2.66,-2.66,-2.66 - C1 T1 0.888,0.9,0.888,0.9,0.913,0.9,0.911,0.888,0.9,0.913 -2.66,-2.78,-2.66,-2.78,-2.91,-2.78,-2.89,-2.66,-2.78,-2.91 - """ - def sniff( self, filename ): # TODO - """ - Determines whether the file is a gmap splice site annotation file - """ - try: - pat = '^>(\d+)\s((\S+):(\d+)\.\.(\d+))$' #>total chr:position..position - pat2 = '^[GATCN]\d.*$' #BaseCountDeatails - fh = open( filename ) - count = 0 - while True and count < 10: - line = fh.readline() - if not line: - break #EOF - line = line.strip() - if line: #first non-empty line - count += 1 - if re.match(pat,line) == None and re.match(pat2,line) == None: # Failed to match - return False - finally: - fh.close() - return False - -class GsnapResult( Text ): - """ - The default output format for gsnap. Can be used as input for gsnap_tally. - """ - file_ext = 'gsnap' - - diff -r 93911bac43da -r 6adc485b6dc0 snpindex.xml --- a/snpindex.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ - - build index files for known SNPs - - snpindex - - 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 93911bac43da -r 6adc485b6dc0 tool-data/datatypes_conf.xml --- a/tool-data/datatypes_conf.xml Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -r 93911bac43da -r 6adc485b6dc0 tool-data/gmap_indices.loc.sample --- a/tool-data/gmap_indices.loc.sample Thu Jan 05 14:31:24 2012 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#This is a sample file distributed with Galaxy that enables tools -#to use a directory of GMAPDB indexed sequences data files. You will need -#to create these data files using gmap_build and then create a gmap_indices.loc file -#similar to this one (store it in this directory) that points to -#the directories in which those files are stored. The gmap_indices.loc -#file has this format (white space characters are TAB characters): -# -# -#hg18 hg18 hg18 (cmet atoi) 12,13,14,15 splicesites,introns snps /depot/data2/galaxy/gmap/hg18 -#hg19 hg19 hg19 (cmet atoi) 12,13,14,15 splicesites,introns,snps snps,dbsnp /depot/data2/galaxy/gmap/hg19 diff -r 93911bac43da -r 6adc485b6dc0 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Tue Jul 31 08:19:46 2012 -0400 @@ -0,0 +1,21 @@ + + + + + + wget http://research-pub.gene.com/gmap/src/gmap-gsnap-2011-11-30.tar.gz + ./configure --prefix=bin --with-gmapdb=../gmapdb + make + + bin + $INSTALL_DIR/bin + + + $INSTALL_DIR/bin + + + + + + +