-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add command to propagate annotations #89
Conversation
cff4620
to
e6af10d
Compare
3669223
to
83aca0b
Compare
src/annotations/gff.rs
Outdated
|
||
let mut path_mappings_by_name = HashMap::new(); | ||
for (name, target_path) in target_paths_by_name.iter() { | ||
let source_path = source_paths_by_name.get(name).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we assume the 2 sample groups need the same paths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The paths are associated with block group name (eg "chr22"). I just changed the variable names to make that clearer (eg source_paths_by_name
-> source_paths_by_bg_name
). So the two associated paths are the latest paths for block groups with the same name. Those pairs of paths are what we propagate annotations on. Let me know if I can do more to clarify that
// Replaced (15, 25) with a 2 bp sequence | ||
// New gene annotation is (5, 15) | ||
assert_eq!(record.start().get(), 5); | ||
assert_eq!(record.end().get(), 15); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if we throw an insert into a gene? wondering if we split it up or just extend it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We "bridge" the annotation across the split up parts. The first check is on a region-wide annotation and confirms it still spans the region across a replaced part. I edited the comments to make that clearer. If you want a check on a gene annotation specifically, I can put one in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only question is about requiring paths to match. I think that lookup can be on-demand cache in an anonymous function.
83aca0b
to
433276e
Compare
No description provided.