Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Show header of a read when input FASTQ sample has invalid format
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Aug 30, 2018
1 parent 7c637fd commit 80c38eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libra/common/sequence/Read.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ public void parseFasta(List<String> lines) throws IOException {
public void parseFastq(List<String> lines) throws IOException {
clear();

if(lines.size() == 0) {
return;
}

if(lines.size() != 4) {
throw new IOException(String.format("invalid fastq read format - line num is %d", lines.size()));
String header = lines.get(0);
throw new IOException(String.format("invalid fastq read format - a read (%s) has %d lines", header, lines.size()));
}

int lineNo = 0;
Expand Down

0 comments on commit 80c38eb

Please sign in to comment.