This is a test version of Biostars. For the public version, visit https://www.biostars.org.
merge individual runs after bcftools mpileup | bcftools call

Hello! I am running bcftools mpileup | bcftools call for variant calling and I have no problems getting the output file when I run 1 or 2 samples. When I try all samples (~50), I get the error message: "Failed to read from standard input: unknown file type" . I figure it has to do with memory.

I was wondering if I could run all the samples separately and merge the output files at the end? Any suggestions would be appreciated! Thank you!

This is my script :

  REF=/path/to/ref/reference.fasta

bcftools mpileup -a AD,DP,SP -Ou -f $REF /path/to/sorted/bam/files/*.bam | bcftools call -f GQ,GP -mO z -o /path/to/output/all-samples.vcf.gz
mpileup bcftools vcf

Issue solved: The error "Failed to read from standard input: unknown file type" was due to one of the files that was not a properly formatted bam file. I re-mapped that one file and ran bcftools mpileup | bcftools call again. It worked!

0 answers

No answers yet.

Log in to answer this question.