38 / d4-format

The D4 Quantitative Data Format
MIT License
156 stars 20 forks source link

Missing columns when merging multicolumn files depending on order #62

Closed mrvollger closed 1 year ago

mrvollger commented 2 years ago

Hello,

I have found that if you merge a multitrack d4 file with additional files the resulting file will only include columns up through the first multitrack d4 file in the merge result. I made an example here that recreates the issue: https://eichlerlab.gs.washington.edu/help/mvollger/tracks/fiberseq/merge_bug/

In this example I have three bedGraphs a, b, and c. I turn them all into d4 files and then I merge a and b in ab.d4. If I then merge ab.d4 with c.d4 into abc.d4 I only get the columns from ab.d4 in my output merged file:

d4tools merge ab.d4 c.d4 abc.d4

However if I merge with c.d4 first it will create the expected output:

d4tools merge c.d4 ab.d4 cab.d4

This is easy to work around for now if I just include the multitrack file as the last input argument, but I thought I should let you know.

Cheers, Mitchell

arq5x commented 2 years ago

Thanks for reporting this, @mrvollger. @38 is in the middle of a move so it will take a bit to address these.

mrvollger commented 2 years ago

Of course, also this is easy to work around so not urgent in anyway. I appreciate the tool and all the active development.

38 commented 2 years ago

Thanks for using D4. Just have a quick look at the issue - This is caused by how D4 find the tracks in a multiple track input. And this is a bug and I am going to have a fix once I have bandwidth - I am currently still in relocation process.

38 commented 1 year ago

Hi there, I just pushed a fix for this issue. Please let me know if the problem is fixed on your side. Feel free to reopen it if the bug still there. Thanks! Hao