The docs recommend piping samtools mpileup into mpileup2cns. However, it is possible for a empty or nearly empty bam file to produce no mpileup. In this case mpileup2cns will eventually time out, or hang indefinitely. It seems to be safe to use an intermediate file samtools mpileup >mpileup.tsv followed by java -jar varscan.jar mpileup2cns mpileup.tsv