Skip to content

Commit

Permalink
FIX: In IlluminaRawRunDataProvider, fix handling of runs generated wi…
Browse files Browse the repository at this point in the history
…th MiSeq sequencers.
  • Loading branch information
jourdren committed Jul 14, 2024
1 parent 016a247 commit 80a8df7
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private List<RunData> listRuns(Collection<RunId> excludedRuns,
* @param runDirectory the path to the run directory
* @return true if the run is completed
*/
public static boolean runCompleted(Path runDirectory) {
private static boolean runCompleted(Path runDirectory) {

requireNonNull(runDirectory);
File dir = runDirectory.toFile();
Expand All @@ -202,29 +202,33 @@ public static boolean runCompleted(Path runDirectory) {
File runParameterFile = new File(dir, "RunParameters.xml");
if (runParameterFile.exists()) {

switch (getRTAVersionFast(runParameterFile)) {
int rtaVersion = getRTAVersionFast(runParameterFile);

// RTA 2 or MiSeq
case 2:
switch (rtaVersion) {

// MiSeq
case 1:
try {
var rp = RunParameters.parse(runParameterFile);

if ("miseq"
.equals(nullToEmpty(rp.getSequencerFamily()).toLowerCase())) {
return runMiSeqCompleted(rp, dir);
} else {

// Other cases with RTA 2
return fileExists(dir, "RTAComplete.txt", "RunCompletionStatus.xml")
&& completeFileExists(dir, "RTARead", "Complete.txt");

}

// Case not handled
return false;

} catch (ParserConfigurationException | SAXException | IOException e) {
return false;
}

// RTA 3 or RTA 4
// RTA 2
case 2:
return fileExists(dir, "RTAComplete.txt", "RunCompletionStatus.xml")
&& completeFileExists(dir, "RTARead", "Complete.txt");

// RTA 3 or RTA 4
case 3:
case 4:
return fileExists(dir, "CopyComplete.txt", "RTAComplete.txt",
Expand All @@ -245,6 +249,7 @@ && completeFileExists(dir, "Basecalling_Netcopy_complete_Read",
".txt");
}

// No parameter file
return false;
}

Expand Down Expand Up @@ -379,7 +384,6 @@ private static int getRTAVersionFast(File rtaFile) {
}

return -1;

}

}

0 comments on commit 80a8df7

Please sign in to comment.