SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools-mpileup aslihan Bioinformatics 3 01-18-2017 11:53 PM
samtools mpileup using -l or -r vplagnol Genomic Resequencing 3 05-08-2013 11:23 PM
samtools mpileup: -B or not to -B? yenhuahuang1 Bioinformatics 4 03-19-2013 04:21 AM
Many Ns in samtools mpileup mikheyev Bioinformatics 5 03-22-2012 10:56 AM
samtools mpileup bair Bioinformatics 2 03-03-2011 04:38 AM

Reply
 
Thread Tools
Old 02-03-2011, 06:29 AM   #1
bair
Member
 
Location: London

Join Date: Jan 2010
Posts: 65
Default samtools mpileup fails

Hello all,

I'm using asmtools mpileup for snp calling from eight bam files, I get this following error message

bam2bcf_indel.c:181: bcf_call_gap_prep: Assertion `n_types < 64' failed.
[bcf_sync] incorrect number of fields (7 != 5). Corrupted file?
[afs] 0:16195.241 1:1.758 2:87.006 3:1.843 4:16.294 5:0.378 6:3.137 7:0.193 8:4.107 9:0.037 10:0.005 11:0.000 12:3.000
13:0.000 14:2.008 15:0.118 16:10.874

Any helps?

Thanks
bair is offline   Reply With Quote
Old 02-03-2011, 05:10 PM   #2
lh3
Senior Member
 
Location: Boston

Join Date: Feb 2008
Posts: 693
Default

I thought this should never happen, but it happened... This says that at a position there are more than 64 types of indels. For now, you may use "-I" to disable indel calling.
lh3 is offline   Reply With Quote
Old 02-04-2011, 02:06 AM   #3
bair
Member
 
Location: London

Join Date: Jan 2010
Posts: 65
Smile

Quote:
Originally Posted by lh3 View Post
I thought this should never happen, but it happened... This says that at a position there are more than 64 types of indels. For now, you may use "-I" to disable indel calling.
Thank you heng,

But I still get outputs, there are SNPs and INDELs in vcf file, can I trust them? Does samtools ignores the problem INDELs and complete the job, or stop running?
bair is offline   Reply With Quote
Old 02-05-2011, 07:11 AM   #4
lh3
Senior Member
 
Location: Boston

Join Date: Feb 2008
Posts: 693
Default

No, your results are truncated.
lh3 is offline   Reply With Quote
Old 02-05-2011, 03:22 PM   #5
bair
Member
 
Location: London

Join Date: Jan 2010
Posts: 65
Default

Quote:
Originally Posted by lh3 View Post
No, your results are truncated.
Yes, you are right. I get more variants with -I option on chr:MT.
bair is offline   Reply With Quote
Old 02-20-2011, 04:42 PM   #6
gaffa
Member
 
Location: Gothenburg/Uppsala, Sweden

Join Date: Oct 2010
Posts: 82
Default

I am also getting this error. I wonder if it would be possible to somehow sort out positions with excessively many indels before running mpileup.
gaffa is offline   Reply With Quote
Old 03-18-2011, 05:09 PM   #7
Haiqing
Junior Member
 
Location: USA

Join Date: Jun 2010
Posts: 4
Default

Hi! lh3,

I got similar error:
[bcf_sync] incorrect number of fields (0 != 5). Corrupted file?
[afs] 0:0.000

What does this mean?

Thanks
Haiqing is offline   Reply With Quote
Old 03-18-2011, 06:08 PM   #8
Haiqing
Junior Member
 
Location: USA

Join Date: Jun 2010
Posts: 4
Default

Another error message when do the first step for SNP call using samtools:
samtools mpileup -uf reference.fna sample.sort.bam |bcftools view -bvcg - > var.raw.bcf
[mpileup] 1 samples in 1 input files
samtools: bam_plcmd.c:596: group_smpl: Assertion `id >= 0 && id < m->n' failed.
Aborted
:-(

Any suggestions?
Haiqing is offline   Reply With Quote
Old 03-19-2011, 09:24 AM   #9
lh3
Senior Member
 
Location: Boston

Join Date: Feb 2008
Posts: 693
Default

You have read groups undefined in the header
lh3 is offline   Reply With Quote
Old 03-21-2011, 04:31 PM   #10
Haiqing
Junior Member
 
Location: USA

Join Date: Jun 2010
Posts: 4
Default

Thanks! It works now!

BTW, I also tried the old "pileup" for SNP/INDEL call with my deep sequencing data (50000+). Somehow, the pileup out only count 8000 read depth (column eight of the pileup output) for the first reference base. And then add one more read for every next base(like 8001 for second reference base, 8002 for third reference base, and so on). Any suggestions(I already give the -d60000 option to increase the max read depth. It works for mpileup, but not for pileup)? Thanks.

Last edited by Haiqing; 03-21-2011 at 04:40 PM.
Haiqing is offline   Reply With Quote
Old 05-17-2011, 02:07 PM   #11
oudacontrol
Junior Member
 
Location: Bay Area

Join Date: Jan 2011
Posts: 3
Default

How did you fix the read group issue? I am getting the same error: "bam_plcmd.c:596: group_smpl: Assertion `id >= 0 && id < m->n' failed" ...
oudacontrol is offline   Reply With Quote
Old 05-17-2011, 02:36 PM   #12
Haiqing
Junior Member
 
Location: USA

Join Date: Jun 2010
Posts: 4
Default

I think I just removed these @RG header from SAM file(I do not use the read groups in my case).
Haiqing is offline   Reply With Quote
Old 07-13-2011, 10:07 AM   #13
Hkins552
Member
 
Location: Baltimore MD

Join Date: Jun 2011
Posts: 18
Default

Is there anyway to avoid using the -I option? I would still like to call the INDELs on my file. My error is:

[bcf_sync] incorrect number of fields (6 != 5) at 0:33736084
[afs] 0:27544.812 1:16105.314 2:36880.874
Hkins552 is offline   Reply With Quote
Old 07-28-2011, 01:31 PM   #14
jamminbeh
Member
 
Location: Los Angeles

Join Date: Aug 2009
Posts: 11
Default

How can I implement the -I option? I've tried:

/u/local/apps/samtools/0.1.11/samtools mpileup -I -uf hg19.fa accepted_hits.bam

and

/u/local/apps/samtools/0.1.11/samtools mpileup -ufI hg19.fa accepted_hits.bam

and I still get the same error:

[bcf_sync] incorrect number of fields (8 != 5). Corrupted file?
jamminbeh is offline   Reply With Quote
Old 11-22-2011, 05:04 PM   #15
aatu18
Junior Member
 
Location: chicago

Join Date: Nov 2011
Posts: 1
Default

Hi,

How did you solve this error, samtools: bam_plcmd.c:596: group_smpl: Assertion `id >= 0 && id < m->n' failed ? I am repeatedly getting this error! I have a merged and sorted bam file, which I am using to call SNPs using bcftools. i merged multiple sorted bam files using a "rg.txt" file I created..

Where should I look first ?

Thanks for any help!

aarti
aatu18 is offline   Reply With Quote
Old 11-29-2011, 11:53 PM   #16
vinodhsri
Junior Member
 
Location: usa

Join Date: Nov 2011
Posts: 2
Default [bcf_sync] incorrect number of fields Error:

Has anyone encountered this error ('[bcf_sync] incorrect number of fields (0 != 5)') and found a solution already:


vcfutils.pl splitchr -l 50000000 ucsc.hg19.fasta.fai | xargs -i echo samtools mpileup -I -C50 -m3 -F0.0002 -DSuf ucsc.hg19.fasta -r {} -b bam.list | bcftools view -bcvg - /> part-{}.bcf

[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000
xargs: echo: terminated by signal 13

Appreciate your advice.

vsri
vinodhsri is offline   Reply With Quote
Old 02-21-2012, 08:43 AM   #17
rubi
Junior Member
 
Location: North Carolina

Join Date: Apr 2011
Posts: 6
Default

Hi vinodhsri,

Did you manage to solve the [bcf_sync] incorrect number of fields (0 != 5) problem?

I'm facing the same problem myself.

Thanks,
rubi
rubi is offline   Reply With Quote
Old 04-14-2013, 09:04 AM   #18
tahamasoodi
Success
 
Location: India

Join Date: May 2012
Posts: 130
Default

Hi,

I'm getting the same error message. How it can be sorted out?

samtools: bam_plcmd.c:612: group_smpl: Assertion `id >= 0 && id < m->n' failed
__________________
Thanks,
tahamasoodi is offline   Reply With Quote
Reply

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:54 AM.


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