This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error from samtools view -h

I'd like to convert bam to sam file by samtools and got an error.

$ samtools view –h CZ1_001.dedup.bam > CZ1_001_dedup.sam

[E::hts_open_format] fail to open file '–h'

samtools view: failed to open "–h" for reading: No such file or directory

Any ideas?

Thanks a lot~~

rna-seq

1 answer

You have a emdash instead of dash in there - are you copying and pasting this from a word processor or webpage? Observe the difference between:

samtools view –h
samtools view -h

(the first has a longer - line)

YEs, you're right~~ Thanks..

Log in to answer this question.