Skip to content

Commit

Permalink
Added support for FragGeneScan
Browse files Browse the repository at this point in the history
  • Loading branch information
treangen committed Feb 3, 2012
1 parent 14c5638 commit 8c5a760
Show file tree
Hide file tree
Showing 25 changed files with 21,299 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Test/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#/bin/sh
../initPipeline -f -m carsonella_pe_filt.fna -d test1 -i 150:450
../runPipeline -c amphora2 -p 15 -d test1 -k 45
../runPipeline -a metaidba -c amphora2 -g fraggenescan -p 15 -d test1 -k 45 -f FindORFS,Abundance,Classify,Annotate
Binary file added Utilities/cpp/Linux-x86_64/FragGeneScan
Binary file not shown.
88 changes: 88 additions & 0 deletions Utilities/perl/run_FragGeneScan.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/usr/bin/perl -w
use strict;
use Getopt::Long;

my $genome_file = "";
my $FGS_result = "";
my $FGS_whole = -1;
my $FGS_train_file = "";
my $command;
my $program = $0;
my $dir = substr($0, 0, length($0)-19);
my $train_file;


GetOptions(
'genome=s' => \$genome_file,
'out=s' => \$FGS_result,
'complete=s' => \$FGS_whole,
'train=s' => \$FGS_train_file,
);

if (length($genome_file)==0){
print "ERROR: An input genome file was not specified.\n";
print_usage();
exit;
}elsif (! -e $genome_file){
print "ERROR: The input genome file [$genome_file] does not exist.\n";
print_usage();
exit;
}

if (length($FGS_result) == 0 ){
print "ERROR: An output file name was not specified.\n";
print_usage();
exit;
}

unless ($FGS_whole eq "1" || $FGS_whole eq "0"){
print "ERROR: An incorrect value for the option -complete was entered.\n";
print_usage();
exit;
}

$train_file = $dir."train/".$FGS_train_file;
if (length($FGS_train_file)==0){
print "ERROR: A file for model parameters was not specified.\n";
print_usage();
exit;
}elsif (! -e $train_file){
print "ERROR: The file for model parameter [$train_file] does not exist.\n";
print_usage();
exit;
}


$command = $dir."FragGeneScan";
$command .= " -s ".$genome_file;
$command .= " -o ".$FGS_result;
$command .= " -w ".$FGS_whole ;
$command .= " -t ".$FGS_train_file;
system($command);

if ($FGS_whole eq "1"){
system($dir."post_process.pl -genome=".$genome_file." -pre=".$FGS_result." -post=".$FGS_result.".out");
system("rm ".$FGS_result);

}else{
system("mv ".$FGS_result." ".$FGS_result.".out");
}


sub print_usage{

print "USAGE: ./run_FragGeneScan.pl -genome=[seq_file_name] -out=[output_file_name] -complete=[1 or 0] -train=[train_file_name]\n";
print " [seq_file_name]: sequence file name including the full path\n";
print " [output_file_name]: output file name including the full path\n";
print " [1 or 0]: 1 if the sequence file has complete genomic sequences\n";
print " 0 if the sequence file has short sequence reads\n";
print " [train_file_name]: file name that contains model parameters; this file should be in the \"train\" directory\n";
print " Note that four files containing model parameters already exist in the \"train\" directory\n";
print " [complete] for complete genomic sequences or short sequence reads without sequencing error\n";
print " [sanger_5] for Sanger sequencing reads with about 0.5% error rate\n";
print " [sanger_10] for Sanger sequencing reads with about 1% error rate\n";
print " [454_10] for 454 pyrosequencing reads with about 1% error rate\n";
print " [454_30] for 454 pyrosequencing reads with about 3% error rate\n";
print " [illumina_5] for Illumina sequencing reads with about 0.5% error rate\n";
print " [illumina_10] for Illumina sequencing reads with about 1% error rate\n\n";
}
79 changes: 79 additions & 0 deletions Utilities/perl/train/454_10
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Transition=
GG 0.9990
GE 0.0010
ER 0.9965
ES 0.0030
ES1 0.0005
RS 0.0040
RR 0.9920
MM 0.9916
MI 0.0065
MD 0.0019
II 0.1002
IM 0.8998
DD 0.0002
DM 0.9998
TransitionMI=
A A 0.0035
A C 0.3565
A G 0.2671
A T 0.3730
C A 0.2898
C C 0.0016
C G 0.3537
C T 0.3550
G A 0.3687
G C 0.2201
G G 0.0014
G T 0.4098
T A 0.5050
T C 0.2687
T G 0.2224
T T 0.0039
TransitionII=
A A 0.9858
A C 0.0099
A G 0.0043
A T 0.0000
C A 0.0000
C C 0.9837
C G 0.0089
C T 0.0073
G A 0.0057
G C 0.0000
G G 0.9798
G T 0.0145
T A 0.0131
T C 0.0043
T G 0.0001
T T 0.9825
PI=
S 0.000001
E 0.000001
R 0.077
S_1 0.000001
E_1 0.000001
M1 0.077
M2 0.077
M3 0.077
M4 0.077
M5 0.077
M6 0.077
M1_1 0.077
M2_1 0.077
M3_1 0.077
M4_1 0.077
M5_1 0.077
M6_1 0.077
I1 0.000001
I2 0.000001
I3 0.000001
I4 0.000001
I5 0.000001
I6 0.000001
I1_1 0.000001
I2_1 0.000001
I3_1 0.000001
I4_1 0.000001
I5_1 0.000001
I6_1 0.000001
79 changes: 79 additions & 0 deletions Utilities/perl/train/454_30
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Transition=
GG 0.9990
GE 0.0010
ER 0.9965
ES 0.0030
ES1 0.0005
RS 0.0040
RR 0.9920
MM 0.9704
MI 0.0233
MD 0.0063
II 0.0235
IM 0.9765
DD 0.0059
DM 0.9941
TransitionMI=
A A 0.0021
A C 0.5495
A G 0.3340
A T 0.1144
C A 0.0972
C C 0.0011
C G 0.5521
C T 0.3496
G A 0.3516
G C 0.0736
G G 0.0005
G T 0.5744
T A 0.6070
T C 0.3188
T G 0.0712
T T 0.0031
TransitionII=
A A 0.5210
A C 0.4068
A G 0.0722
A T 0.0000
C A 0.0001
C C 0.4833
C G 0.4048
C T 0.1119
G A 0.0892
G C 0.0000
G G 0.4796
G T 0.4311
T A 0.4449
T C 0.0739
T G 0.0006
T T 0.4806
PI=
S 0.000001
E 0.000001
R 0.077
S_1 0.000001
E_1 0.000001
M1 0.077
M2 0.077
M3 0.077
M4 0.077
M5 0.077
M6 0.077
M1_1 0.077
M2_1 0.077
M3_1 0.077
M4_1 0.077
M5_1 0.077
M6_1 0.077
I1 0.000001
I2 0.000001
I3 0.000001
I4 0.000001
I5 0.000001
I6 0.000001
I1_1 0.000001
I2_1 0.000001
I3_1 0.000001
I4_1 0.000001
I5_1 0.000001
I6_1 0.000001
79 changes: 79 additions & 0 deletions Utilities/perl/train/454_5
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Transition=
GG 0.9990
GE 0.0010
ER 0.9965
ES 0.0030
ES1 0.0005
RS 0.0040
RR 0.9920
MM 0.9908
MI 0.0033
MD 0.0009
II 0.1002
IM 0.8998
DD 0.0002
DM 0.9998
TransitionMI=
A A 0.0035
A C 0.3565
A G 0.2671
A T 0.3730
C A 0.2898
C C 0.0016
C G 0.3537
C T 0.3550
G A 0.3687
G C 0.2201
G G 0.0014
G T 0.4098
T A 0.5050
T C 0.2687
T G 0.2224
T T 0.0039
TransitionII=
A A 0.9858
A C 0.0099
A G 0.0043
A T 0.0000
C A 0.0000
C C 0.9837
C G 0.0089
C T 0.0073
G A 0.0057
G C 0.0000
G G 0.9798
G T 0.0145
T A 0.0131
T C 0.0043
T G 0.0001
T T 0.9825
PI=
S 0.000001
E 0.000001
R 0.077
S_1 0.000001
E_1 0.000001
M1 0.077
M2 0.077
M3 0.077
M4 0.077
M5 0.077
M6 0.077
M1_1 0.077
M2_1 0.077
M3_1 0.077
M4_1 0.077
M5_1 0.077
M6_1 0.077
I1 0.000001
I2 0.000001
I3 0.000001
I4 0.000001
I5 0.000001
I6 0.000001
I1_1 0.000001
I2_1 0.000001
I3_1 0.000001
I4_1 0.000001
I5_1 0.000001
I6_1 0.000001
Loading

0 comments on commit 8c5a760

Please sign in to comment.