Skip to content

Cannot stream standard input to apply or apply_paste #93

@jluquette

Description

@jluquette

I am trying to use wiggletools to average a signal over a set of bins defined in a BED file by piping in output from a previous command into wiggletools' stdin. Based on the EBNF grammar, it looks like the following command should work, but instead it fails claiming that it cannot open the "-" file:

bash$ cat my_signal.bg | wiggletools apply_paste out.txt meanI bins.bed -
Cannot open input file -

The command works as expected if the signal bedGraph is not streamed:

bash$ wiggletools apply_paste out.txt meanI bins.bed my_signal.bg
bash$ head out.txt
22	0	100	0.000000
22	100	200	0.000000
22	200	300	0.000000
22	300	400	0.000000
22	400	500	0.000000
22	500	600	0.000000
22	600	700	0.000000
22	700	800	0.000000
22	800	900	0.000000
22	900	1000	0.000000

The situation is the same using apply directly (both the error above and the correct output when the file is directly specified). There are other tools for the use case of averaging over a BED, but I'd like to be able to build more complicated computations with wiggletools.

Why isn't "-" recognized as an iterator of type in_filename? Perhaps I'm missing something obvious - any feedback would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions