Permalink
Browse files

test updates

  • Loading branch information...
1 parent eb66e31 commit c3a3c72b640544526e8caf7273535f6d429d9bcb @val-antonescu val-antonescu committed Apr 22, 2014
Showing with 14 additions and 17 deletions.
  1. +2 −2 ebwt.cpp
  2. +1 −1 ebwt_build.cpp
  3. +11 −14 scripts/test/args.pl
View
@@ -15,11 +15,11 @@ using namespace std;
#ifdef BOWTIE_64BIT_INDEX
-std::string gEbwt_ext("bt2l");
+std::string gEbwt_ext("ebwtl");
#else
-std::string gEbwt_ext("bt2");
+std::string gEbwt_ext("ebwt");
#endif // BOWTIE_64BIT_INDEX
View
@@ -421,7 +421,7 @@ static void driver(const string& infile,
refparams.color = false;
vector<RefRecord> szs2;
vector<uint32_t> plens2;
- int numSeqs2 = 0;
+ TIndexOff numSeqs2 = 0;
fastaRefReadSizes(is, szs2, plens2, refparams, NULL, numSeqs2);
assert_leq(numSeqs, numSeqs2);
// One less color than base
View
@@ -8,7 +8,7 @@
#
my $bowtie = "./bowtie";
-my $bowtie_d = "./bowtie-debug";
+my $bowtie_build = "./bowtie-build";
if(system("$bowtie --version") != 0) {
print STDERR "Could not execute ./bowtie; looking in PATH...\n";
$bowtie = `which bowtie`;
@@ -17,18 +17,9 @@
die "Could not find bowtie in current directory or in PATH\n";
}
}
-if(system("$bowtie_d --version") != 0) {
- print STDERR "Could not execute ./bowtie-debug; looking in PATH...\n";
- $bowtie_d = `which bowtie-debug`;
- chomp($bowtie_d);
- if(system("$bowtie_d --version") != 0) {
- die "Could not find bowtie-debug in current directory or in PATH\n";
- }
-}
if(! -f "e_coli_c.1.ebwt") {
print STDERR "Making colorspace e_coli index\n";
- my $bowtie_build = "./bowtie-build";
if(system("$bowtie_build --version") != 0) {
print STDERR "Could not execute ./bowtie-build; looking in PATH...\n";
$bowtie_build = `which $bowtie_build`;
@@ -42,6 +33,12 @@
print STDERR "Colorspace e_coli index already present...\n";
}
+if(! -f "e_coli.1.ebwt") {
+ system("$bowtie_build genomes/NC_008253.fna e_coli") && die;
+} else {
+ print STDERR "e_coli index already present...\n";
+}
+
open TMP, ">.args.pl.1.fa" || die;
print TMP ">\nT0120012002012030303023\n";
close(TMP);
@@ -98,24 +95,24 @@ ($)
print "Bad:\n";
for my $a (@bad) {
run("$bowtie $a e_coli reads/e_coli_1000.fq /dev/null") != 0 || die "bowtie should have rejected: \"$a\"\n";
- run("$bowtie_d $a e_coli reads/e_coli_1000.fq /dev/null") != 0 || die "bowtie-debug should have rejected: \"$a\"\n";
+ run("$bowtie --debug $a e_coli reads/e_coli_1000.fq /dev/null") != 0 || die "bowtie-debug should have rejected: \"$a\"\n";
print "PASSED: bad args \"$a\"\n";
}
print "\nBadEx:\n";
for my $a (@badEx) {
run("$bowtie $a /dev/null") != 0 || die "bowtie should have rejected: \"$a\"\n";
- run("$bowtie_d $a /dev/null") != 0 || die "bowtie-debug should have rejected: \"$a\"\n";
+ run("$bowtie --debug $a /dev/null") != 0 || die "bowtie-debug should have rejected: \"$a\"\n";
print "PASSED: bad args \"$a\"\n";
}
print "\nGood:\n";
for my $a (@good) {
run("$bowtie $a e_coli reads/e_coli_1000.fq /dev/null") == 0 || die "bowtie should have accepted: \"$a\"\n";
- run("$bowtie_d $a e_coli reads/e_coli_1000.fq /dev/null") == 0 || die "bowtie-debug should have accepted: \"$a\"\n";
+ run("$bowtie --debug $a e_coli reads/e_coli_1000.fq /dev/null") == 0 || die "bowtie-debug should have accepted: \"$a\"\n";
print "PASSED: good args \"$a\"\n";
}
print "\nGoodEx:\n";
for my $a (@goodEx) {
run("$bowtie $a /dev/null") == 0 || die "bowtie should have accepted: \"$a\"\n";
- run("$bowtie_d $a /dev/null") == 0 || die "bowtie-debug should have accepted: \"$a\"\n";
+ run("$bowtie --debug $a /dev/null") == 0 || die "bowtie-debug should have accepted: \"$a\"\n";
print "PASSED: good args \"$a\"\n";
}

0 comments on commit c3a3c72

Please sign in to comment.