diff --git a/ebwt.cpp b/ebwt.cpp index c6e6661..3092ede 100644 --- a/ebwt.cpp +++ b/ebwt.cpp @@ -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 diff --git a/ebwt_build.cpp b/ebwt_build.cpp index 2ccaa1b..d699ea1 100644 --- a/ebwt_build.cpp +++ b/ebwt_build.cpp @@ -421,7 +421,7 @@ static void driver(const string& infile, refparams.color = false; vector szs2; vector plens2; - int numSeqs2 = 0; + TIndexOff numSeqs2 = 0; fastaRefReadSizes(is, szs2, plens2, refparams, NULL, numSeqs2); assert_leq(numSeqs, numSeqs2); // One less color than base diff --git a/scripts/test/args.pl b/scripts/test/args.pl index 8b54ae2..8c17be3 100755 --- a/scripts/test/args.pl +++ b/scripts/test/args.pl @@ -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"; }