Allows specifying bam files directly #1
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.
Hi guys,
I thought it a little suboptimal to have to copy all the bam files into the same directory to run Fragle. So I added the option of specifying the bam file paths directly.
I wanted to change as little as possible, but to ensure it worked with all the "
--mode"s, I did end up making significant changes to the code base.Here are my changes:
--inputpaths. Then parses them for whether it's a single directory, a list of bam files, or the data.pkl file. NOTE: This actually breaks specifying the previous output directory as input directory for--mode 'F'(now you need to adddata.pklto the path. If you think this needs to be possible, I can quickly add it. I just think it's cleaner this way.main.pyto reduce repeated code.feature_generation.pyandpredict.py(easier to pass multiple bam file paths this way and reduces bug risks).predict.pyfor whether the output directory exists (when--mode 'F'and--output != --input).--modeto have it check the value automatically.I have tested all but the targeted version (
--mode 'T').I would totally understand if there are too many changes in this PR. I do think there are some good improvements here even if you don't want to support specifying bam files directly though.
Best,
Ludvig