-
Notifications
You must be signed in to change notification settings - Fork 34
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
BED feature #45
Open
isovic
wants to merge
49
commits into
master
Choose a base branch
from
bed
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
BED feature #45
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ar apart using the original sequence.
…de into a separate function for scoping.
…o a new file util.hpp.
…lidating that there aren't any regions which overlap.
…ps outside of regions of interest.
… before the trees are constructed (will be useful later).
…ght now only generating empty windows for the BED regions.
…s_ and target_bed_trees_, and added the trees for the windows.
…dded a placeholder for a generic function to find window breaking points base on supplied windows.
…ld because these tests hijacked my unit tests.
…points in util.*. It breaks the alignment into supplied windows.
…ction generate_window_breakpoints.
…igar and Overlap::find_breaking_points which take a set of windows.
…n the new context (the window_id was wrong). Cleanup of unused legacy code in src/polisher.hpp.
…- the last window had an extra base. Interestingly, ASAN didn't complain. Also, fixed an off-by-1 error in src/util.cpp when predecessor windows were being skipped.
…eing calculated via division, while the windowing may actually begin at an arbitrary coordinate.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a BED feature to polish only the specified regions of the input draft.
The feature is very useful when an assembly was patched (for example manually or by scaffolding), and the user wants to target only those regions instead of potentially disrupting an already high quality assembly.
One could suggest that instead of this feature the user should simply filter and clip overlaps from the outside, but that has a very nasty side-effect: since the region can begin at an arbitrary position (e.g. 1237bp in target), and the current windowing splits windows in fixed intervals (e.g. 500bp), that would mean that the first 237bp of the window where the region begins would have coverage 0x and the heuristics would kick in to trim the window. The end result would be a severely deteriorated assembly.
Another argument might be to turn off window trimming, but then internal windows would have plenty of insertions at their ends.
The only way around this is to implement a proper region-based polishing which generalizes to the full contig size as well as specified regions.
To implement this, some refactoring had to be done. Here is a brief description of work:
Both the regions and the windows may be of an arbitrary size.