Skip to content

Commit

Permalink
while debugging, found some errors in the report generation which are…
Browse files Browse the repository at this point in the history
… now fixed (MongoDB compatibility not MySQL)
  • Loading branch information
jmatsumura committed Aug 24, 2016
1 parent abce786 commit be0952a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LGTView/www/twinblast/cgi/generateReport.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ my $db = $conf->val($chosen_db, 'dbname');
my $host = $conf->val($chosen_db, 'hostname');
my $mongo_conn = MongoDB->connect($host);
my $mongo_db = $mongo_conn->get_database($db);
my $mongo_coll = $mongo_conn->get_collection('bwa_mapping');
my $mongo_coll = $mongo_db->get_collection('bwa_mapping');

# Deal with the CGI inputs.
my $cgi = CGI->new;
Expand Down Expand Up @@ -87,6 +87,8 @@ if($qlist) {
# script to take on some additional functionality down the line.
if($print_report){

print "Content-Type: application/json\n\n";

my $format = 'blast';
my $searchio = Bio::SearchIO->new(-format => $format,
-file => $file);
Expand Down Expand Up @@ -165,17 +167,15 @@ if($print_report){
}

close $fh;
$dbh->disconnect();

print "Content-Type: application/json\n\n";
print to_json({message => "finished", success => 1, path => "$report_file"});
exit;
}

# Function to query the DB for the particular curation note given a sequence ID
sub getCurationNote {
my($query_id) = @_;
my $cur_res = $mongo_coll->( { 'read' => "$query_id" } );
my $cur_res = $mongo_coll->find( { 'read' => "$query_id" } );
my @arr = $cur_res->next; # grab doc from cursor
my $curation_note = $arr[0]->{'curation_note'};
if(not defined $curation_note){
Expand Down

0 comments on commit be0952a

Please sign in to comment.