How do we handle reads that don't have original quality scores when converting to FASTQ with original qualities? #818

Closed
fnothaft opened this Issue Sep 8, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@fnothaft
Member

fnothaft commented Sep 8, 2015

In #745 we added the ability to convert X->FASTQ where the original base qualities are written out. Right now, if the base qualities aren't defined, this will throw a NPE. There are several alternatives:

  • Throw a better exception (IllegalArgument?)
  • Write * quality string
  • Write the values from qual instead.
@arahuja

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Sep 8, 2015

Contributor

From the discussion #815 and looking at the code, it looks like a NPE won't be thrown, which is the worst of all cases, and instead we are doing 3 from above

My vote would be IllegalArgument, I think, though I imagine I want to be configurable. 2 use cases I see are generating the original fastqs (would want an error than if this isn't possible) or just generating some fastqs with the most original scores possible (would want to replace the scores with whatever was available?

If we put in the '*' there should be somewhat sort of warning logged at least otherwise you might end up with unexpected data (says the person who wrote the thing that gives unexpected data)

Contributor

arahuja commented Sep 8, 2015

From the discussion #815 and looking at the code, it looks like a NPE won't be thrown, which is the worst of all cases, and instead we are doing 3 from above

My vote would be IllegalArgument, I think, though I imagine I want to be configurable. 2 use cases I see are generating the original fastqs (would want an error than if this isn't possible) or just generating some fastqs with the most original scores possible (would want to replace the scores with whatever was available?

If we put in the '*' there should be somewhat sort of warning logged at least otherwise you might end up with unexpected data (says the person who wrote the thing that gives unexpected data)

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Sep 9, 2015

Member

Oops! Misread the code. I agree with you around configuration. We could use the validation strictness flags. strict could map to an IAE, and and lenient could make to whatever is available and log a warning.

Member

fnothaft commented Sep 9, 2015

Oops! Misread the code. I agree with you around configuration. We could use the validation strictness flags. strict could map to an IAE, and and lenient could make to whatever is available and log a warning.

@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh Nov 2, 2015

Member

See pull request #856

Member

heuermh commented Nov 2, 2015

See pull request #856

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jul 6, 2016

Member

Resolved by #856.

Member

fnothaft commented Jul 6, 2016

Resolved by #856.

@fnothaft fnothaft closed this Jul 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment