-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GPos getindex #25
Comments
Okay, I see there is no such scalar type implemented for GenomicPosistions like GenomicFeatures.Interval for GenomicRanges. |
Hi @Marlin-Na , thank you for your interest in this project. I return an integer here on purpose. This is the nucleotide position in the concatenated genome. I use such values often. I'm open to design changes, though. Returning an integer here is a bit inconsistent because a slice of a GPos should probably return a shorter GPos. Slice and index should return the same type. Probably I need syntax to do either. I don't know which (returning an index or a GPos) would use the standard syntax (get index and friends) and which would use an alternative syntax. |
Hi @phaverty , thanks for your explanation. I am mostly interested in putting GenomicVectors into a DataFrame. I see there is GenomicDataFrame, but there are cases that we want to put more than one GPos/GRanges to a DataFrame (e.g. when working with structural variants), plus it is more generalized. Currently, GenomicPositions in a DataFrame is shown as Int64, which is kind of weird. And getting one row of the DataFrame it will become a real Int64, which is inconsistent with getting multiple rows.
I believe index should return I see your point on returning an integer. But as I said above, I am hoping to have an Integer-like type as
But I don't know how much performance degradation would this introduce. I don't know if Julia will store a copy of Similarly, index on I am actually quite new to Julia, so these are just my thoughts. Let me know what's your opinion on this. |
I think I'll have |
Hi Pete, thanks for your work on this. Currently getindex on GPos returns an Integer instead of GPos. I wonder if this is intentional or not? For example
I believe it can be fixed here
GenomicVectors.jl/src/GenomicPositions_type.jl
Line 54 in 72995d4
The text was updated successfully, but these errors were encountered: