d4-format icon indicating copy to clipboard operation
d4-format copied to clipboard

Missing columns when merging multicolumn files depending on order

Open mrvollger opened this issue 1 year ago • 3 comments

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

mrvollger avatar Aug 27 '22 21:08 mrvollger

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

arq5x avatar Aug 31 '22 20:08 arq5x

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

mrvollger avatar Aug 31 '22 23:08 mrvollger

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 avatar Sep 08 '22 06:09 38

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

38 avatar Feb 18 '23 08:02 38