Skip to content
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

Inconsistancey between gia and bedtools for unionbedg #118

Open
mrvollger opened this issue May 17, 2024 · 1 comment
Open

Inconsistancey between gia and bedtools for unionbedg #118

mrvollger opened this issue May 17, 2024 · 1 comment

Comments

@mrvollger
Copy link
Contributor

mrvollger commented May 17, 2024

Hi @noamteyssier,

Thanks so much for adding unionbedg for me! It has been really useful.

However, I have found a corner case where the tool is not in sync with bedtools. Mainly, bedtools allows for empty input files, which sounds odd but is actually really useful when running big pipelines with lots of bedfiles that are sometimes legitimately empty (e.g. ATAC peaks on a very small chromosome).

So e.g. with bedtools I can do:

bedtools unionbedg -i <(printf "") <(printf "chrom1\t0\t1000\t10\n")

And still get the expected output, just with all zeros for the first file.

chrom1  0       1000    0       10

But with gia I get an error due to the empty input:

gia unionbedg -s -i <(printf "") <(printf "chrom1\t0\t1000\t10\n")
Error: Empty file or stream or buffer

I think, in general, not erroring on empty input is actually really valuable with bed files, but in this case in particular it would be extra nice if it did not.

Thanks in advance!
Mitchell

gia --version
gia 0.2.23
@noamteyssier
Copy link
Owner

Ah I didn't think this would be a useful feature - I'll look into this but should be an easy change to make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants