Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check FASTQ fields 1 and 3 #18

Merged
merged 4 commits into from
Apr 28, 2023
Merged

Check FASTQ fields 1 and 3 #18

merged 4 commits into from
Apr 28, 2023

Conversation

mtomko
Copy link
Collaborator

@mtomko mtomko commented Apr 27, 2023

According to the spec, field 1 must begin with @ and field 3 must
begin with +. Checking for these helps prevent users from accidentally
deconvoluting files that have been corrupted or improperly concatenated.

According to the spec, field 1 must begin with `@` and field 3 must
begin with `+`. Checking for these helps prevent users from accidentally
deconvoluting files that have been corrupted or improperly concatenated.
@mtomko mtomko marked this pull request as ready for review April 27, 2023 19:00
if (line3 == null) {
throw InvalidFileException(file, "File contains an incomplete FASTQ read")
} else Read(line0, line1)
if (line0.charAt(0) != '@') { throw InvalidFileException(file, "Corrupt or incorrect FASTQ") }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor suggestion but helpful nonetheless: maybe you could augment these msgs to say, e.g. "no '@' prefix in line 1" or something.

tmgreen
tmgreen previously approved these changes Apr 27, 2023
Copy link
Member

@tmgreen tmgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍨 🫖 🩳

@mtomko mtomko self-assigned this Apr 27, 2023
@mtomko mtomko requested a review from tmgreen April 27, 2023 19:41
@mazugrin
Copy link

🦅 🐦

@mtomko mtomko merged commit a13d6ac into main Apr 28, 2023
@mtomko mtomko deleted the check-fastq branch April 28, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants