[main_samview] fail to read the header from “-“.

[main_samview] fail to read the header from “-“.


I am attempting to run a file through an algorithm I have been using, HLA*LA. On running the samtools command within the algorithm, I have unfortunately been getting this error. After trying to debug this following other guides, I am seeking assistance here as I have yet to find a solution.

The script is attempting to run the following command:

samtools view -@ 3  IN.cram '*' | awk '{if ($3 == "*") print $0}' | samtools view -bo UNMAPPED.bam -

The specific error that I am getting is the following:

[main_samview] fail to read the header from "-".

When I print out the header using samtools, there is output and the error is not reproduced. When I solely run the first samtools command and the awk command, there is no error or output meaning the issue is with the last samtools command.

Update: Outside of the algorithm, I was able to produce a bam output without issues when using:

samtools -b IN.cram > OUT.bam




updated 1 hour ago by


written 2 hours ago by


Read more here: Source link