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

Reconsider start and stop in the IO methods #25

Open
3 tasks
camilogarciabotero opened this issue Feb 13, 2024 · 0 comments
Open
3 tasks

Reconsider start and stop in the IO methods #25

camilogarciabotero opened this issue Feb 13, 2024 · 0 comments

Comments

@camilogarciabotero
Copy link
Owner

camilogarciabotero commented Feb 13, 2024

The ORF struct is normally defined with a location field that is of type UnitRange{Int64}. This has been used with the default step (i.e., 1) argument. So even if the strand field of ORF is - the start will always be determined by the "positive" strand range.

This is not an issue for the get_orfs_* methods since they use the following treatment:

Base.getindex(sequence::NucleicSeqOrView{A}, orf::ORF) where {A} = orf.strand == '+' ? (@view sequence[orf.location]) : reverse_complement(@view sequence[orf.location])

The inverted range is, for instance, how negative stranded ORF are displayed in PHANOTATE outputs (c.f source code).

The things to reconsider are:

  • Are the other ORF applications using this convention as well?
  • Would revamping this bring some benefits to the performance?
  • The write methods should at least advertise this. However, judging by the previous test with IGV it is found to have only positive ranges at start and stop.
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

No branches or pull requests

1 participant