-
Notifications
You must be signed in to change notification settings - Fork 309
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
Consolidate ReferenceRegion, Position, etc. #601
Comments
+1 on the first two points, and the fourth. Need to think about the third? |
Will this really allow us to consolidate AlignmentRecord, Variant, etc? Wouldn't the ideal be that those (generated) classes all inherit from a common ReferenceRegion superclass? Is that possible with Avro? (Isn't this what sparked our discussion of Thrift on the call a week or two ago?) |
I don't think it'd be ideal to have them inherit from a common class, because they all have different implementations. E.g., variants have a single required mapping. Reads (in the fragment model, which I prefer) have multiple optional mappings. Contigs have a single optional mapping. |
I'll open a PR against bdg-formats showing what I'm talking about. |
That'd be great. |
I agree with @tdanford. Bullet 3 seems like a more complex issue, which I'm more ok to punt on at the moment. I agree that there are advantages to having a non-Avro |
Frank, can you rewrite the issue description above to use a number list rather than bullets? :-) |
Fixed! |
Closed via #624. |
We had discussed this a bit on another thread; this winds up being a consolidation of #511, #517, #592, Here's what I propose:
ReferencePosition
. AReferencePosition
is just a special case of aReferenceRegion
(region with width = 1). For the cost of 1Long
field, we could eliminate a lot of duplicated code.*WithOrientation
models. We have aStrand
enum: https://github.com/bigdatagenomics/bdg-formats/blob/master/src/main/resources/avro/bdg.avdl#L720.ReferenceRegion
to Avro. This will allow us to consolidate fields inAlignmentRecord
,Variant
, andNucleotideContigFragment
. I think we'd keep theorg.bdgenomics.adam.models.ReferenceRegion
object, and consolidate anapply
method, as well as theoverlaps
,isAdjacent
, etc methods there.Ordering
forReferenceRegion
.The text was updated successfully, but these errors were encountered: