arq5x/bedtools

bedtools complement hangs when using -i <(cmd)

Closed this issue · 1 comments

Hit an issue with the test suite, where bedtools complement doesn't work with a process substitution following -i.

Here's a minimal script that reproduces the issue:

#!/usr/bin/env bash

set -x

# This works
cat <(echo -e "chr1\t0\t1") <(echo -e "chr1\t20")

# This works
echo -e "chr1\t0\t1" > temp
bedtools complement \
	-i temp \
	-g <(echo -e "chr1\t20")

# This hangs, but if I determine the name of the fifo and manually run
# echo -e "chr1\t0\t1" > /tmp/fifo-name, it finishes successfully
bedtools complement \
	-i <(echo -e "chr1\t0\t1") \
	-g <(echo -e "chr1\t20")

Anyone else seeing this?

Any suggestions where in the source code it might be getting stuck? I can add some debug code to gather more info if I know where it's opening and reading the file.

So far I've found my way to addInputFile() and verified that the fifo name is correct.

Thanks.

Ooops, wrong project. Reposted on bedtools2.