Related to issue #81 Bed file output using the 5th column (score) for counts#83
Open
duartemolha wants to merge 17 commits intobrentp:masterfrom
Open
Related to issue #81 Bed file output using the 5th column (score) for counts#83duartemolha wants to merge 17 commits intobrentp:masterfrom
duartemolha wants to merge 17 commits intobrentp:masterfrom
Conversation
Owner
|
some users rely on bedgraph format. (3 columns + 4th indicating depth). So we cannot inject a fake 4th column when they give a 3-column file. |
duartemolha
commented
Apr 29, 2019
duartemolha
commented
Apr 29, 2019
Author
|
ha ... I see |
Author
|
I can make the change... so that if input only has 3 columns the output is in bedgraph format but would it not make more sense adding a command line parameter --bedgraph-output to enforce that condition? |
Owner
|
no. do not add a command-line option. every additional option increases the number of emails I get about 2X. thanks for the work on this, by the way, I think if we get it right it will be a useful change. |
…as 3 columns so that output is consistent with bedgraph format
5198b39 to
30548ed
Compare
e397175 to
48eae5f
Compare
e1de6b4 to
9cdf4c0
Compare
8232329 to
893135e
Compare
This file contains hidden or 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
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.
You indicated you where willing to accept a PR for changing the behaviour of mosdepth so that it does not remove content present in input bed region file,
I am still very new to NIM, but I took your offer.
This change, makes sure that your output bed files have always at least 5 fields, no matter if input bed file only has 3 columns (chr, start and end).
if input has 3 bed columns, output is: chr, start, end, chr:start-end, counts
if input bed file is a full 6 or 12 column format, all fields are retained expect for the score column that gets updated with mosdepth counts.
I also added test bed files and tests for each input bed file format condition.
Forgive me if there is anything not ideal in terms of NIM code standards, as I said... still learning...
It builds fine on Travis CI but on my ubuntu 19.04 machine I am having trouble building ... not sure why yet
Best regards
Duarte
PS: I took the liberty of incrementing the version number and description on changes.md not sure if this is what should be done... but since this is a change that modified the default output of the program I guess it needs to be very clear to the users going forward as it might break their scripts