# HG changeset patch # User dereeper # Date 1427102239 14400 # Node ID abde5b0387c89a9c56a8409423fb4f748720e6f7 Uploaded diff -r 000000000000 -r abde5b0387c8 SnpEff.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SnpEff.pl Mon Mar 23 05:17:19 2015 -0400 @@ -0,0 +1,82 @@ +#!/usr/bin/perl + +use strict; +use Getopt::Long; + +my $usage = qq~Usage:$0 [] +where are: + -i, --input + -o, --output + -g, --gff + -f, --fasta + -h, --html +~; +$usage .= "\n"; + +my ($input,$output,$gff,$fasta,$html); + + +GetOptions( + "input=s" => \$input, + "output=s" => \$output, + "gff=s" => \$gff, + "fasta=s" => \$fasta, + "html=s" => \$html +); + + +die $usage + if ( !$input || !$output || !$fasta || !$gff || !$html); + + +if (!-e $gff){ + die "Error: GFF input does not exist\n" +} +if (!-e $fasta){ + die "Error: Fasta input does not exist\n" +} + +#my $SNPEFF_PATH = "/usr/local/bioinfo/galaxy/galaxy_dist/tools/SNiPlay/SnpEff/snpEff"; +my $SNPEFF_PATH = $ENV{SNPEFF_JAR_PATH}; + + +my $session = $$; +mkdir($session); +mkdir("$session/data"); +mkdir("$session/data/genomes"); +mkdir("$session/data/myspecies"); + +system("cp -rf $fasta $session/data/genomes/myspecies.fa"); +system("cp -rf $gff $session/data/myspecies/genes.gff"); + +open(my $C,"$SNPEFF_PATH/snpEff.config"); +open(my $C2,">$session/snpEff.config"); +while(<$C>) +{ + if (/data_dir/) + { + print $C2 "data_dir = ./data\n"; + } + elsif (/^genomes/) + { + print $C2 "genomes : \\n"; + print $C2 "myspecies, myspecies \\n"; + } + else + { + print $C2 $_; + } +} +print $C2 "myspecies.genome : myspecies\n"; +close($C); +close($C2); + + +my $build_cmd = "java -jar $SNPEFF_PATH/snpEff.jar build -c $session/snpEff.config -gff3 myspecies"; +system($build_cmd); + +my $eff_cmd = "java -jar $SNPEFF_PATH/snpEff.jar eff -c $session/snpEff.config -o vcf -no-downstream -no-upstream myspecies -s $html $input >$output"; +system($eff_cmd); + + +system("rm -rf $session"); diff -r 000000000000 -r abde5b0387c8 snpEff-pipe.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/snpEff-pipe.sh Mon Mar 23 05:17:19 2015 -0400 @@ -0,0 +1,14 @@ +#!/bin/bash +vcf=$1 +genome=$2 +gff=$3 +output=$4 +html=$5 +log=$6 + +directory=`dirname $0` + +/usr/bin/perl $directory/SnpEff.pl -i $vcf -f $genome -g $gff -o $output -h $html >>$log 2>&1 + + + diff -r 000000000000 -r abde5b0387c8 snpEff.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/snpEff.xml Mon Mar 23 05:17:19 2015 -0400 @@ -0,0 +1,63 @@ + + predicts SNP effect from a genomic VCF file + + snpEff + + + + ./snpEff-pipe.sh $vcf $genome $gff $output $statsFile $log + + + + + + + + + + + + + + + + + + +.. class:: infomark + +**Program encapsulated in Galaxy by Southgreen** + +.. class:: infomark + +**SnpEff version 4.0** + +----- + +============== + Please cite: +============== + +"A program for annotating and predicting the effects of single nucleotide polymorphisms, SnpEff: SNPs in the genome of Drosophila melanogaster strain w1118; iso-2; iso-3.", **Cingolani P, Platts A, Wang le L, Coon M, Nguyen T, Wang L, Land SJ, Lu X, Ruden DM.**, Fly (Austin). 2012 Apr-Jun;6(2):80-92. + +----- + +=========== + Overview: +=========== + +Genetic variant annotation and effect prediction toolbox. It annotates and predicts the effects of variants on genes (such as amino acid changes). + +----- + +For further informations, please visite the SnpEff_ website. + + +.. _SnpEff: http://snpeff.sourceforge.net/ + + + + diff -r 000000000000 -r abde5b0387c8 tool-data/tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/tool_dependencies.xml Mon Mar 23 05:17:19 2015 -0400 @@ -0,0 +1,6 @@ + + + + + +