Skip to content

Reconsider start and stop in the IO methods #25

Open
@camilogarciabotero

Description

@camilogarciabotero

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions