SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd behavior using samtools mpileup, bcftools JimC Bioinformatics 7 05-21-2013 11:34 AM
samtools mpileup and bcftools not reporting dbSNP ids dmb Bioinformatics 2 08-13-2012 10:18 PM
Samtools mpileup/bcftools cristae8 Bioinformatics 3 05-02-2012 12:43 PM
samtools mpileup and bcftools command lines to compare individual differences? aslihan Bioinformatics 1 11-17-2011 02:20 PM
questions about samtools mpileup & bcftools chenjy Bioinformatics 0 07-26-2011 04:21 AM

Reply
 
Thread Tools
Old 08-22-2014, 03:09 AM   #1
linp5
Member
 
Location: China

Join Date: Aug 2014
Posts: 14
Default error when running samtools mpileup and bcftools

Hi all

I run the code below which is modified from [1]

samtools mpileup -uf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz

But I encounter such a error:

[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[vcf.c:753 bcf_hdr_read] invalid BCF2 magic string: only BCFv2.2 is supported.
Failed to open: -


but I can successfully run samtools mpileup separately:
samtools mpileup -f wg.fa ERR000589.srt.bam > ERR000589.bcf

the ERR000589.bcf file looks as:
chr10 60173 T 1 ^Z. H
chr10 60174 T 1 . H
chr10 60175 G 0
chr10 60176 G 1 . /
chr10 60177 G 1 . I
chr10 60178 T 1 . .
chr10 60179 T 1 . 8
chr10 60180 G 1 . G
chr10 60181 G 1 . I

Could anyone please give me some tips about what happened?


[1] https://github.com/samtools/bcftools/wiki/HOWTOs
linp5 is offline   Reply With Quote
Old 08-22-2014, 04:10 AM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Try:
Code:
 samtools mpileup -ugf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz
dpryan is offline   Reply With Quote
Old 08-22-2014, 04:23 AM   #3
linp5
Member
 
Location: China

Join Date: Aug 2014
Posts: 14
Default

Thank you dpryan!

But the problem still exists:

linp@wuserver:~/linpDisk4/DataSeq$ samtools mpileup -ugf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[vcf.c:753 bcf_hdr_read] invalid BCF2 magic string: only BCFv2.2 is supported.
Failed to open: -
linp5 is offline   Reply With Quote
Old 08-22-2014, 04:33 AM   #4
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

My only guess is that you have different versions of samtools and bcftools (make sure you're using the tagged 1.0 version of both if you got this from github). If that's not the case and no one else is able to give you an answer here then you should post this to the samtools-help email list.
dpryan is offline   Reply With Quote
Old 08-22-2014, 04:39 AM   #5
linp5
Member
 
Location: China

Join Date: Aug 2014
Posts: 14
Default

Thank you dpryan!

the versions are:

Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
Version: 1.0-15-gc15888a (using htslib 1.0-2-g1903fd4)
Program: samtools (Tools for alignments in the SAM format)
Version: 0.1.19-44428cd


Do you think they are in-compatible ?
linp5 is offline   Reply With Quote
Old 08-22-2014, 04:41 AM   #6
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Ah, yeah, you need to either use the version of bcftools that came with samtools 0.1.19 or use the newer version of samtools available here.
dpryan is offline   Reply With Quote
Reply

Tags
bcftools, mpileup, samtools

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO