arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
139 stars 86 forks source link

bedtools complement hangs when using -i <(cmd) #144

Closed outpaddling closed 5 years ago

outpaddling commented 5 years ago

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.

outpaddling commented 5 years ago

Ooops, wrong project. Reposted on bedtools2.