You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feedback about reference sequences: reference_start and restrict alignments options #2092
As part of the what-is-an-ARG paper, I thought it would be interesting to see if we could encode the Kreitman (1983) D. melanogaster ADH data (https://www.nature.com/articles/304412a0) as a tree sequence, including the reference sequence from FlyBase. This has brought up a few issues with reference sequences, which might be useful in the light of #1985 and use-case requirements. In particular, I'm only focussing on bases 14615494..14618223 of the genome, for which I am using the consensus sequence in Kreitman as the reference.
I think using part of the genome like this is likely to be something people are likely to want to do. Moreover, it is extremely helpful if the site positions are in the reference genome coordinate space. So in an attempt to solicit feedback, here are 2 possible suggestions to help with this
It might be useful for the reference sequence to have a start_position, by default 0, but it could be e.g in this instance 14615494. When outputting alignments, all bases before the start position (and after the last character in the reference) could simply be filled with N
It would be useful to be able to output the alignments restricted to a particular region, presumably with an extra parameter or two to the alignments method, specifying the start and end positions.
I think 2. is not at all controversial, but maybe 1 needs some discussion? I opened this as an issue rather than a discussion so that it could be closed when this is tackled, but I'd be happy to move it to the Githhub discussions area if that's a better place.
Both good ideas in my book. (1) would be something to consider as part of a bigger update I think, in case it conflicts with the url approach, but the general point on not storing a bunch of Ns at the start of the sequence for no reason is a good one.
2 is uncontroversial, but would be a bit of work to do in practise because we lack the underlying machinery to generate variants on an interval (but this is being worked on)
works well with URL as I can imagine that you might have a tree sequence that is a subset of a section of a common reference, this would let you refer to it by URL. I think it is something we tackle when we come to implement URL handling though.
2 is uncontroversial, but would be a bit of work to do in practise because we lack the underlying machinery to generate variants on an interval (but this is being worked on)
Thanks Jerome. I thought we could simply seek to the tree at the start of the region, and iterate over the trees from there, but now I recall that you can't simply get the variants from the trees, so yes, probably worth waiting on #605
Activity
jeromekelleher commentedon Jan 12, 2022
Both good ideas in my book. (1) would be something to consider as part of a bigger update I think, in case it conflicts with the
urlapproach, but the general point on not storing a bunch of Ns at the start of the sequence for no reason is a good one.2 is uncontroversial, but would be a bit of work to do in practise because we lack the underlying machinery to generate variants on an interval (but this is being worked on)
petrelharp commentedon Jan 13, 2022
Great test case, and great ideas.
benjeffery commentedon Jan 14, 2022
hyanwong commentedon Jan 19, 2022
Thanks Jerome. I thought we could simply seek to the tree at the start of the region, and iterate over the trees from there, but now I recall that you can't simply get the variants from the trees, so yes, probably worth waiting on #605