This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in SNP calling, samtools

Hello,

I have been following what most tutorials are suggesting (https://wikis.utexas.edu/display/bioiteam/Variant+calling+using+SAMtools), and I get:

@NCS ~/heterozygosity/TrimReads/bwa_Mapping_9iso_REF_GDR18/vcf/samtools_diploid $ samtools mpileup -uf gdr18_k75-85_NHC_conc.fasta ../../GDR-18.sort.grp.md.bam | bcftools view -vcg - > GDR18.vcf
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[E::cg] unknown type

The first part executed without a problem and I can generate a .bcf file, it's the second part (bcftools) that gives an error for some reason.

Adrian

EDIT:

Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs) Version: 0.2.0-rc9-29-gfcd7b41 (using htslib 0.2.0-rc9-20-gb7c2a46)

Program: samtools (Tools for alignments in the SAM format) Version: 0.2.0-rc9-11-g5ec815e (using htslib 0.2.0-rc9-20-gb7c2a46)

ngs bcftools vcf snp

Which version of samtools and bcftools are you using?

Sorry I didn't immediately add those, but I added that information into the original post after EDIT.

Thanks, worked!

[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[bcfview] 100000 sites processed.
[afs] 0:71676.849 1:28170.018 2:153.133
[bcfview] 200000 sites processed.
[afs] 0:74382.499 1:25350.294 2:267.207
[bcfview] 300000 sites processed.
[afs] 0:78517.541 1:20777.378 2:705.081
[afs] 0:37420.685 1:6159.299 2:823.016

Hi Adrian,

I have the same problem as you posted. You have figured out the error. Could you give me some help about this?

Best
ZQ

Hi,

I'm also having a similar problem, but I am not using the development version of sam/bcftools. So;

samtools mpileup -d8000 -IEuf hg19.fa input.bam | bcftools view -vg - > output.vcf

Gives the message;

[mpileup] 1 samples in 1 input files
[E::g] unknown type

Do you know what is happening here? I'm using;

samtools 1.1, htslib 1.1
bcftools 1.1, htslib 1.1

Thank you,
Callum

I think the guide is for older version of samtools, so some of the options you are using are likely obsolete.

Not sure where you can an updated guide.

I'm getting the same error using versions 1.1, did you have any luck finding a solution?

The error was actually related to the options for the command bcftools view -bvcg. It was expecting additional parameters after the flags.

type bcftools view to read the doc and decide what you need, if anything

0 answers

No answers yet.

Log in to answer this question.