Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Properly writing out the db-info file now.
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Mar 28, 2019
1 parent 9559ca3 commit 38a53c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,18 @@ private void writeDbInfos(Connection conn, BufferedWriter dbInfoWriter)
final PreparedStatement stmt = conn.prepareStatement(query);

try (ResultSet rs = stmt.executeQuery()) {
if (!rs.next()) {
return;
while (true) {
if (!rs.next()) {
return;
}
dbInfoWriter.write(
args.getRelease() + "\t" + rs.getString(1) + "\t" + rs.getString(2) + "\n");
}
dbInfoWriter.write(
args.getRelease() + "\t" + rs.getString(1) + "\t" + rs.getString(2) + "\n");
}
} catch (SQLException e) {
throw new VarfishAnnotatorException("Problem with querying database", e);
} catch (IOException e) {
throw new VarfishAnnotatorException("Could nto write TSV info", e);
throw new VarfishAnnotatorException("Could not write TSV info", e);
}
}

Expand Down Expand Up @@ -782,7 +784,7 @@ private DbInfo getDbInfo(
}
final DbInfo result = new DbInfo(rs.getDouble(1), rs.getInt(2), rs.getInt(3), rs.getInt(4));
if (rs.next()) {
throw new VarfishAnnotatorException("ExAC returned more than one result");
throw new VarfishAnnotatorException(prefix + " returned more than one result");
}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DbReleaseUpdater {
private final List<String> dbReleaseInfos;

/**
* Construct the <tt>HgmdPublicImporter</tt> object.
* Construct the <tt>DbReleaseUpdater</tt> object.
*
* @param conn Connection to database
* @param dbReleaseInfos Database release information.
Expand Down

0 comments on commit 38a53c6

Please sign in to comment.