-
Notifications
You must be signed in to change notification settings - Fork 311
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
Improve error message when we can't find a ReferenceRegion for a contig #582
Comments
Is this issue still open? I was looking for a starting point to help out and noticed this issue has an assignee but was also labeled "pick me up". |
@InvisibleTech go for it! We're not too strict about the Assignee label. |
Is there something that explains what defines a valid fragment? Also do you have perferences regarding how to fail at this point? Default quietly to an empty value? Raise a RuntimeException? Meaning what is the style of error processing you follow here in this project? Requirements question. I am looking at fixing this issue with some defensive coding in:
Looking at the code in:
I see that if any of the following referenced fields aren't valued we would get None because of the generators used in the for-comprehension:
So which of these fields is required to properly create a ReferenceRegion? Is this an error or is it more legit for me to silently create some empty Seq[(ReferenceRegion, String)] if ReferenceRegion(fragment) produces a None? |
Resolves bigdatagenomics#582. In the FragmentConverter, we had code that called .get on an optional ReferenceRegion. If a NucleotideContigFragment didn't have a contig associated with it, then we would call .get on the empty option, which would throw an error. This commit changes that code to call map on the Option[ReferenceRegion], and then changes the usage of that method so that it is called in a flatMap. Additionally, I've added a test to cover this case.
Seen on the mailing list. If calling
ReferenceRegion(contig: NucleotideContigFragment)
returnsNone
, we throw a nondescript error.The text was updated successfully, but these errors were encountered: