From 046c0bcb4de9804d9505d045fab5c7193ae2f3cf Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Wed, 10 Jun 2015 12:04:28 -0500 Subject: [PATCH 1/6] bug fix --- src/MGRAST/Schema/dump_analysis_for_cass.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/MGRAST/Schema/dump_analysis_for_cass.pl b/src/MGRAST/Schema/dump_analysis_for_cass.pl index 61badda3..9d78c01c 100755 --- a/src/MGRAST/Schema/dump_analysis_for_cass.pl +++ b/src/MGRAST/Schema/dump_analysis_for_cass.pl @@ -65,11 +65,13 @@ my @batch_set = (); my $batch_count = 0; my $md5_count = 0; +my $batch_num = 0; while (my @row = $sth->fetchrow_array()) { push @batch_set, \@row; $batch_count += 1; $md5_count += 1; if ($batch_count == 1000) { + $batch_num += 1; my @output = process_batch(\@batch_set, $m5nr."/m5nr_".$version."/select"); foreach my $line (@output) { print DUMP join(",", map { '"'.$_.'"' } @$line)."\n"; @@ -79,7 +81,8 @@ } } if (@batch_set > 0) { - my @output = process_batch(\@batch_set, $m5nr."/m5nr_".$version); + $batch_num += 1; + my @output = process_batch(\@batch_set, $m5nr."/m5nr_".$version."/select"); foreach my $line (@output) { print DUMP join(",", map { '"'.$_.'"' } @$line)."\n"; } @@ -109,7 +112,7 @@ sub process_batch { if ($@) { # try again !!! if ($try >= 3) { - print STDERR "Failed 3 times at md5 # $md5_count\n".$@."\n".$result->content."\n"; + print STDERR "Failed 3 times at md5 $md5_count (batch $batch_num)\n".$@."\n".$result->content."\n"; $dbh->disconnect; exit 1; } else { @@ -134,7 +137,8 @@ sub process_batch { push @{ $org->{$ann->{source}} }, cescape($ann->{organism} || ""); } my $out = [ $version, $job, - $ea, $ia, $la, $md5, $es, $is, $ls, + $ea, $ia, $la, $md5, + $es, $is, $ls, $abund, $seek, $len, ($prot ? 'true' : 'false'), cstring($acc), From d6a0b3199d15670dd20be3db726a5b906813ad08 Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Thu, 11 Jun 2015 09:28:32 -0500 Subject: [PATCH 2/6] schema updates --- src/MGRAST/Schema/dump_analysis_for_cass.pl | 2 ++ src/MGRAST/Schema/dump_annotation_for_cass.pl | 3 +++ src/MGRAST/Schema/m5nr_v4.cql | 20 ++++++++++++++++++- src/MGRAST/Schema/mgrast_analysis_v4.cql | 6 +++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/MGRAST/Schema/dump_analysis_for_cass.pl b/src/MGRAST/Schema/dump_analysis_for_cass.pl index 9d78c01c..9b9c1ff8 100755 --- a/src/MGRAST/Schema/dump_analysis_for_cass.pl +++ b/src/MGRAST/Schema/dump_analysis_for_cass.pl @@ -127,6 +127,8 @@ sub process_batch { foreach my $set (@batch_set) { my ($mid, $abund, $ea, $ia, $la, $es, $is, $ls, $seek, $len, $prot) = @$set; next unless ($data->{$mid}); + next if (int($ea) > 0); + $ea = $ea * -1; my $md5 = $data->{$mid}[0]{md5}; my $acc = {}; my $fun = {}; diff --git a/src/MGRAST/Schema/dump_annotation_for_cass.pl b/src/MGRAST/Schema/dump_annotation_for_cass.pl index 1687b038..81675dd4 100755 --- a/src/MGRAST/Schema/dump_annotation_for_cass.pl +++ b/src/MGRAST/Schema/dump_annotation_for_cass.pl @@ -143,6 +143,7 @@ $lca =~ s/\"/\\"/g; } foreach my $d (@$data) { + next unless ($d->[1]); # source => [[ accession, function, organism ]] $d->[2] =~ s/\'/''/g; $d->[3] =~ s/\'/''/g; @@ -183,6 +184,7 @@ $lca =~ s/\"/\\"/g; } foreach my $d (@$data) { + next unless ($d->[1]); # source => [[ accession, function, organism ]] $d->[2] =~ s/\'/''/g; $d->[3] =~ s/\'/''/g; @@ -211,6 +213,7 @@ my $mid = $data->[0][0]; my $srcs = {}; foreach my $d (@$data) { + next unless ($d->[1]); # source => [[ accession, function ]] $d->[2] =~ s/\'/''/g; $d->[3] =~ s/\'/''/g; diff --git a/src/MGRAST/Schema/m5nr_v4.cql b/src/MGRAST/Schema/m5nr_v4.cql index 9d98833e..02d87d36 100644 --- a/src/MGRAST/Schema/m5nr_v4.cql +++ b/src/MGRAST/Schema/m5nr_v4.cql @@ -1,5 +1,8 @@ -use MGRAST_m5nr; +CREATE KEYSPACE IF NOT EXISTS m5nr_v1 + WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 2 }; + +use m5nr_v1; CREATE TABLE IF NOT EXISTS md5_id_annotation ( id int, @@ -13,6 +16,7 @@ CREATE TABLE IF NOT EXISTS md5_id_annotation ( organism list, PRIMARY KEY (id, source) ); +COPY md5_id_annotation (id, source, md5, is_protein, single, lca, accession, function, organism) FROM '/mnt/src/m5nr_v1.annotation.id'; CREATE TABLE IF NOT EXISTS md5_annotation ( md5 text, @@ -25,6 +29,7 @@ CREATE TABLE IF NOT EXISTS md5_annotation ( organism list, PRIMARY KEY (md5, source) ); +COPY md5_annotation (md5, source, is_protein, single, lca, accession, function, organism) FROM '/mnt/src/m5nr_v1.annotation.md5'; CREATE TABLE IF NOT EXISTS ontologies ( source text, @@ -35,6 +40,7 @@ CREATE TABLE IF NOT EXISTS ontologies ( level4 text, PRIMARY KEY (source, name) ); +COPY ontologies (source, name, level1, level2, level3, level4) FROM '/mnt/src/m5nr_v1.ontology.all'; CREATE TABLE IF NOT EXISTS ont_level1 ( source text, @@ -42,6 +48,7 @@ CREATE TABLE IF NOT EXISTS ont_level1 ( name text, PRIMARY KEY (source, level1, name) ); +COPY ont_level1 (source, level1, name) FROM '/mnt/src/m5nr_v1.ontology.level1'; CREATE TABLE IF NOT EXISTS ont_level2 ( source text, @@ -49,6 +56,7 @@ CREATE TABLE IF NOT EXISTS ont_level2 ( name text, PRIMARY KEY (source, level2, name) ); +COPY ont_level2 (source, level2, name) FROM '/mnt/src/m5nr_v1.ontology.level2'; CREATE TABLE IF NOT EXISTS ont_level3 ( source text, @@ -56,6 +64,7 @@ CREATE TABLE IF NOT EXISTS ont_level3 ( name text, PRIMARY KEY (source, level3, name) ); +COPY ont_level3 (source, level3, name) FROM '/mnt/src/m5nr_v1.ontology.level3'; CREATE TABLE IF NOT EXISTS ont_level4 ( source text, @@ -63,6 +72,7 @@ CREATE TABLE IF NOT EXISTS ont_level4 ( name text, PRIMARY KEY (source, level4, name) ); +COPY ont_level4 (source, level4, name) FROM '/mnt/src/m5nr_v1.ontology.level4'; CREATE TABLE IF NOT EXISTS organisms_ncbi ( name text, @@ -76,45 +86,53 @@ CREATE TABLE IF NOT EXISTS organisms_ncbi ( ncbi_tax_id int, PRIMARY KEY (name) ); +COPY organisms_ncbi (name, tax_domain, tax_phylum, tax_class, tax_order, tax_family, tax_genus, tax_species, ncbi_tax_id) FROM '/mnt/src/m5nr_v1.taxonomy.all'; CREATE TABLE IF NOT EXISTS tax_domain ( tax_domain text, name text, PRIMARY KEY (tax_domain, name) ); +COPY tax_domain (tax_domain, name) FROM '/mnt/src/m5nr_v1.taxonomy.domain'; CREATE TABLE IF NOT EXISTS tax_phylum ( tax_phylum text, name text, PRIMARY KEY (tax_phylum, name) ); +COPY tax_phylum (tax_phylum, name) FROM '/mnt/src/m5nr_v1.taxonomy.phylum'; CREATE TABLE IF NOT EXISTS tax_class ( tax_class text, name text, PRIMARY KEY (tax_class, name) ); +COPY tax_class (tax_class, name) FROM '/mnt/src/m5nr_v1.taxonomy.class'; CREATE TABLE IF NOT EXISTS tax_order ( tax_order text, name text, PRIMARY KEY (tax_order, name) ); +COPY tax_order (tax_order, name) FROM '/mnt/src/m5nr_v1.taxonomy.order'; CREATE TABLE IF NOT EXISTS tax_family ( tax_family text, name text, PRIMARY KEY (tax_family, name) ); +COPY tax_family (tax_family, name) FROM '/mnt/src/m5nr_v1.taxonomy.family'; CREATE TABLE IF NOT EXISTS tax_genus ( tax_genus text, name text, PRIMARY KEY (tax_genus, name) ); +COPY tax_genus (tax_genus, name) FROM '/mnt/src/m5nr_v1.taxonomy.genus'; CREATE TABLE IF NOT EXISTS tax_species ( tax_species text, name text, PRIMARY KEY (tax_species, name) ); +COPY tax_species (tax_species, name) FROM '/mnt/src/m5nr_v1.taxonomy.species'; diff --git a/src/MGRAST/Schema/mgrast_analysis_v4.cql b/src/MGRAST/Schema/mgrast_analysis_v4.cql index 653036a9..57ea5664 100644 --- a/src/MGRAST/Schema/mgrast_analysis_v4.cql +++ b/src/MGRAST/Schema/mgrast_analysis_v4.cql @@ -1,5 +1,8 @@ -use MGRAST_analysis; +CREATE KEYSPACE IF NOT EXISTS mgrast_analysis + WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 2 }; + +use mgrast_analysis; CREATE TYPE source_info ( accession list, @@ -67,6 +70,7 @@ CREATE TABLE IF NOT EXISTS job_md5s ( organism map>>, PRIMARY KEY ((version, job), exp_avg, ident_avg, len_avg, md5) ); +COPY job_md5s (version, job, exp_avg, ident_avg, len_avg, md5, exp_stdv, ident_stdv, len_stdv, abundance, seek, length, is_protein, accession, function, organism) FROM '/mnt/src/job_data.1595'; CREATE TABLE IF NOT EXISTS job_lcas ( version int, From 30f80033ae8337a1289b2c1bfb83c3800b2008f8 Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Thu, 11 Jun 2015 11:43:12 -0500 Subject: [PATCH 3/6] testing changes --- src/MGRAST/Schema/mgrast_analysis_v4.cql | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/MGRAST/Schema/mgrast_analysis_v4.cql b/src/MGRAST/Schema/mgrast_analysis_v4.cql index 57ea5664..7d4bde93 100644 --- a/src/MGRAST/Schema/mgrast_analysis_v4.cql +++ b/src/MGRAST/Schema/mgrast_analysis_v4.cql @@ -23,6 +23,25 @@ CREATE TYPE lca_info ( level int ); +CREATE TABLE job_test ( + version int, + job int, + exp_avg float, + md5 text, + data text, + PRIMARY KEY ((version, job), exp_avg, md5) +); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 10, 50, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 10, 50, 'bar', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 10, 60, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 10, 70, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 10, 70, 'bar', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 20, 50, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 20, 50, 'bar', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 20, 60, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 20, 70, 'foo', 'hello world'); +INSERT INTO job_test (version, job, exp_avg, md5, data) VALUES (1, 20, 70, 'bar', 'hello world'); + CREATE TABLE IF NOT EXISTS job_md5s ( version int, job int, @@ -69,7 +88,7 @@ CREATE TABLE IF NOT EXISTS job_md5s ( function map>>, organism map>>, PRIMARY KEY ((version, job), exp_avg, ident_avg, len_avg, md5) -); +) WITH CLUSTERING ORDER BY (exp_avg DESC, ident_avg DESC, len_avg DESC); COPY job_md5s (version, job, exp_avg, ident_avg, len_avg, md5, exp_stdv, ident_stdv, len_stdv, abundance, seek, length, is_protein, accession, function, organism) FROM '/mnt/src/job_data.1595'; CREATE TABLE IF NOT EXISTS job_lcas ( From fa78bbc26be59f69aff6a79f81a0f390369bec03 Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Thu, 25 Jun 2015 11:45:10 -0500 Subject: [PATCH 4/6] add m5nr solr check before batch query --- src/MGRAST/lib/resources/annotation.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/MGRAST/lib/resources/annotation.pm b/src/MGRAST/lib/resources/annotation.pm index 5f2f4f9d..f0cca858 100644 --- a/src/MGRAST/lib/resources/annotation.pm +++ b/src/MGRAST/lib/resources/annotation.pm @@ -350,7 +350,16 @@ sub print_batch { } else { $fields = ['md5_id']; } - + + # test if m5nr-solr is up + my $ua = $self->agent; + $ua->timeout(10); + my $response = $ua->get($Conf::m5nr_solr); + unless ($response->is_success) { + print "\nERROR downloading: M5NR annotation service is unavailable.\n"; + exit 0; + } + # now query m5nr-solr my ($data, $row_count) = $self->get_solr_query("POST", $Conf::m5nr_solr, $Conf::m5nr_collect.'_'.$ann_ver, $solr_query_str, "", 0, 1000000000, $fields); my %md5s_to_annot = (); if ($type ne 'md5') { @@ -358,7 +367,7 @@ sub print_batch { $md5s_to_annot{$result->{md5_id}}{$result->{$solr_key}} = 1; } } - + my $hs = HTML::Strip->new(); my $seek_num = scalar(@$seeks); my $len_num = scalar(@$lens); From b0f80da1dcce1c572a44b65296ddef11b43cae7c Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Thu, 25 Jun 2015 12:02:22 -0500 Subject: [PATCH 5/6] don't filter out 'unclassified' taxa --- src/MGRAST/lib/WebPage/Analysis.pm | 86 +++++++++++++++--------------- src/MGRAST/lib/resources/matrix.pm | 9 ++-- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/src/MGRAST/lib/WebPage/Analysis.pm b/src/MGRAST/lib/WebPage/Analysis.pm index a688562a..6e57ac68 100644 --- a/src/MGRAST/lib/WebPage/Analysis.pm +++ b/src/MGRAST/lib/WebPage/Analysis.pm @@ -2346,21 +2346,21 @@ sub single_visual { push(@$vals, $exp_hash->{$key}->[$ii] || 0); } my $row = $spec_hash->{$key}; - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} push(@$expanded_data, [ @$row, $vals ] ); } } else { foreach my $row (@$data) { next if ($tree_domain_filter && $tree_domain_filter ne $row->[1]); - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} push(@$expanded_data, [ @$row[1..9] ] ); } } @@ -3168,21 +3168,21 @@ sub phylogeny_visual { push(@$vals, $exp_hash->{$key}->[$ii] || 0); } my $row = $spec_hash->{$key}; - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} push(@$expanded_data, [ @$row, $vals ] ); } } else { foreach my $row (@$data) { next if ($tree_domain_filter && $tree_domain_filter ne $row->[2]); - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} push(@$expanded_data, [ @$row[2..10] ] ); } } @@ -5231,36 +5231,36 @@ sub lca_visual { my $mg2num = {}; for (my $hh=0; $hh{$comp_mgs[$hh]} = $hh; + $mg2num->{$comp_mgs[$hh]} = $hh; } foreach my $row (@$data) { - $spec_hash->{$row->[8]} = [ @$row[1..8] ]; - unless (exists($exp_hash->{$row->[8]})) { - $exp_hash->{$row->[8]} = []; - } - $exp_hash->{$row->[8]}->[$mg2num->{$row->[0]}] = $row->[9]; + $spec_hash->{$row->[8]} = [ @$row[1..8] ]; + unless (exists($exp_hash->{$row->[8]})) { + $exp_hash->{$row->[8]} = []; + } + $exp_hash->{$row->[8]}->[$mg2num->{$row->[0]}] = $row->[9]; } foreach my $key (sort(keys(%$exp_hash))) { - my $vals = []; - for (my $ii=0; $ii{$key}->[$ii] || 0); - } - my $row = $spec_hash->{$key}; - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } - push(@$expanded_data, [ @$row, $vals ] ); + my $vals = []; + for (my $ii=0; $ii{$key}->[$ii] || 0); + } + my $row = $spec_hash->{$key}; + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} + push(@$expanded_data, [ @$row, $vals ] ); } } else { foreach my $row (@$data) { - foreach my $r (@$row) { - if ($r =~ /derived/) { - (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; - } - } - push(@$expanded_data, [ @$row[1..9] ] ); + #foreach my $r (@$row) { + # if ($r =~ /derived/) { + # (undef, $r) = $r =~ /^(unclassified \(derived from )(.+)(\))$/; + # } + #} + push(@$expanded_data, [ @$row[1..9] ] ); } } @$expanded_data = sort { $b->[8] <=> $a->[8] } @$expanded_data; diff --git a/src/MGRAST/lib/resources/matrix.pm b/src/MGRAST/lib/resources/matrix.pm index f1a81d63..69dadacb 100644 --- a/src/MGRAST/lib/resources/matrix.pm +++ b/src/MGRAST/lib/resources/matrix.pm @@ -488,12 +488,12 @@ sub prepare_data { # my ($self, $md5s, $sources, $eval, $ident, $alen, $with_taxid) = @_; my (undef, $info) = $mgdb->get_organisms_for_md5s($umd5s, [$source], int($eval), int($ident), int($alen), 1); # mgid, source, tax_domain, tax_phylum, tax_class, tax_order, tax_family, tax_genus, tax_species, name, abundance, sub_abundance, exp_avg, exp_stdv, ident_avg, ident_stdv, len_avg, len_stdv, md5s, taxid - @$matrix = map {[ $_->[9], $_->[0], $self->toNum($_->[$col_idx], $rtype) ]} grep {$_->[9] !~ /^(\-|unclassified)/} @$info; + @$matrix = map {[ $_->[9], $_->[0], $self->toNum($_->[$col_idx], $rtype) ]} @$info; map { $self->{org2tax}->{$_->[9]} = [ @$_[2..9] ] } @$info; map { $self->{org2tid}->{$_->[9]} = $_->[19] } @$info; } else { # my ($self, $level, $names, $srcs, $value, $md5s, $eval, $ident, $alen) = @_; - @$matrix = map {[ $_->[1], $_->[0], $self->toNum($_->[2], $rtype) ]} grep {$_->[1] !~ /^(\-|unclassified)/} @{$mgdb->get_abundance_for_tax_level($glvl, undef, [$source], $result_map->{$rtype}, $umd5s, int($eval), int($ident), int($alen))}; + @$matrix = map {[ $_->[1], $_->[0], $self->toNum($_->[2], $rtype) ]} @{$mgdb->get_abundance_for_tax_level($glvl, undef, [$source], $result_map->{$rtype}, $umd5s, int($eval), int($ident), int($alen))}; # mgid, hier_annotation, value } } elsif ($htype eq 'single') { @@ -501,7 +501,7 @@ sub prepare_data { my $info = $mgdb->get_organisms_unique_for_source($source, int($eval), int($ident), int($alen), 1); # mgid, tax_domain, tax_phylum, tax_class, tax_order, tax_family, tax_genus, tax_species, name, abundance, exp_avg, exp_stdv, ident_avg, ident_stdv, len_avg, len_stdv, md5s, taxid if ($leaf_node) { - @$matrix = map {[ $_->[8], $_->[0], $self->toNum($_->[$col_idx], $rtype) ]} grep {$_->[8] !~ /^(\-|unclassified)/} @$info; + @$matrix = map {[ $_->[8], $_->[0], $self->toNum($_->[$col_idx], $rtype) ]} @$info; map { $self->{org2tax}->{$_->[8]} = [ @$_[1..8] ] } @$info; map { $self->{org2tid}->{$_->[8]} = $_->[17] } @$info; } else { @@ -509,7 +509,7 @@ sub prepare_data { $lvl_idx += 1; my $merged = {}; foreach my $set (@$info) { - next if ($set->[$lvl_idx] =~ /^(\-|unclassified)/); + next if ($set->[$lvl_idx] =~ /^\-/); if (! exists($merged->{$set->[0]}{$set->[$lvl_idx]})) { $merged->{$set->[0]}{$set->[$lvl_idx]} = [ $self->toNum($set->[$col_idx], $rtype), 1 ]; } else { @@ -532,7 +532,6 @@ sub prepare_data { $lvl_idx += 1; my $merged = {}; foreach my $set (@$info) { - next if ($set->[$lvl_idx] =~ /^(\-|unclassified)/); if (! exists($merged->{$set->[0]}{$set->[$lvl_idx]})) { $merged->{$set->[0]}{$set->[$lvl_idx]} = [ $self->toNum($set->[$col_idx], $rtype), 1 ]; } else { From 617a1c2009fae71641c60a0d2146f693d7da416d Mon Sep 17 00:00:00 2001 From: Travis Harrison Date: Thu, 25 Jun 2015 12:14:53 -0500 Subject: [PATCH 6/6] update test script --- src/MGRAST/Schema/test_cass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MGRAST/Schema/test_cass.py b/src/MGRAST/Schema/test_cass.py index e8a3f7aa..e54be874 100755 --- a/src/MGRAST/Schema/test_cass.py +++ b/src/MGRAST/Schema/test_cass.py @@ -61,7 +61,7 @@ def main(args): found = set() for i in range(opts.count): ints = random_array(opts.batch) - query = "SELECT * FROM annot_by_id WHERE id IN ("+",".join(map(str, ints))+");" + query = "SELECT * FROM md5_id_annotation WHERE id IN ("+",".join(map(str, ints))+");" if mode == "sql": cursor = handle.cursor() cursor.execute(query)