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

Hello, I am doing SNP calling, using the pipeline as follows: 1. index the reference fasta file using bwa. 2. align the read file using bwa aln command. 3. converted the .sai file to .sam file. 4. converted .sam to the .bam file using samtools. 5.constructed mpileup file using samtools. 6.called SNP in the form of .vcf file using bcftools.

but as a result, i m getting empty vcf file.and during the process, there is no error shown by the tools I have used. what may be the reason for this I m not getting. please help.

rna-seq snp software error

Steps what you are following looks fine. But if mention what commands you used then it would easy to solve your issue.

bcftools-1.2/bcftools call -Avc input.bcf -O v -o output.vcf

One thing you can just check is the mpileup file and see the columns what it contains for each position manually against your reference (if its small size).

Follow the link and read more about file formats here.

Also, u can use VarScan and know the read count for the reference and variants.

java -jar VarScan.v2.2.11.jar readcounts input.mpileup --min-coverage 20 --min-base-qual 30 --output-file output_readcound.txt

1 answer

Hello, You can use below commands

Generating variation BCF(binary) file for variation

~/Programs/samtools-0.1.17/samtools mpileup -ugf mtb_h37rv.fna aln_sorted.bam | ~/Programs/samtools-0.1.17/bcftools/bcftools view -bvcg - > var.raw.bcf

Converty BCF(binary) variation file to VCF(text) variations file

~/Programs/samtools-0.1.17/bcftools/bcftools view var.raw.bcf > var.raw.vcf

Log in to answer this question.