Skip to content

Commit

Permalink
Fixes...
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeiferd committed Feb 25, 2025
1 parent 8c115ba commit 88d2db0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/metagene/genestrip/GSMaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,20 @@ protected void doMakeThis() {
registerGoal(krakenResCountGoal);
}

public MatchingResult cleanMatch(boolean lr, String key, String... pathsOrURLs) {
return match(lr, true, key, pathsOrURLs);
}

public MatchingResult match(boolean lr, String key, String... pathsOrURLs) {
return match(lr, false, key, pathsOrURLs);
}

public MatchingResult match(boolean lr, boolean clean, String key, String... pathsOrURLs) {
MatchGoal matchGoal = createGoalChainForMatch(lr, key, pathsOrURLs);

if (clean) {
matchGoal.cleanThis();
}
matchGoal.make();
return matchGoal.getMatchResults().get(key);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ public void testDB2FastqGoal() throws IOException {
goal.cleanThis();
goal.make();



for (int i = 0; i < taxids.length; i++) {
File file = goal.getOutputFile(taxids[i]);
MatchingResult result = maker.match(false, taxids[i], file.toString());
MatchingResult result = maker.cleanMatch(false, taxids[i], file.toString());
Map<String, CountsPerTaxid> map = result.getTaxid2Stats();

assertEquals(kmers[i], map.get(taxids[i]).getKMers());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected void testMatchReadHelp(boolean bitMap) {
maxContigLen[previousPos] = contigLen;
}
}
matcher.matchRead(entry, i, false);
matcher.matchRead(entry, 0, false);

ByteArrayUtil.print(entry.read, System.out);
System.out.println();
Expand Down

0 comments on commit 88d2db0

Please sign in to comment.