brentp / mosdepth

fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for streaming

multimeric opened this issue · comments

Hi, it seems that mosdepth doesn't support reading from stdin:

$ mosdepth output - < foo.bam
[E::hts_hopen] Failed to open file -
[E::hts_open_format] Failed to open file "-" : Exec format error
[hts-nim] could not open '-'. Exec format error
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
$ mosdepth output < foo.bam
Usage: mosdepth [options] <prefix> <BAM-or-CRAM>
error parsing arguments

Is it possible to add this feature? Or is the ability to randomly access reads in the alignment a requirement for mosdepth?

Unfortunately, this is not supported and will not be. The file must be on disk and indexed.