This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools mpileup -g and -u flags throwing errors for a specific bam file

I'm trying to run to get variants called from a (merged) bam file (presumably using bfctools).

$ samtools mpileup merged.bamfile.bam

works fine, spitting out in pileup format.

However,

$ samtools mpileup -g merged.bamfile.bam

I get the following error message

   [mpileup] 1 samples in 1 input files
   <mpileup> Set max per-file depth to 8000
   Assertion failed: (q), function group_smpl, file bam_plcmd.c, line 287.
   Abort trap: 6

The same thing happens with -u or -v flags.

This is not a general problem, as I can use the flags on a different bam file.

samtools

1 answer

there is no such 'assertion' in bam_plcmd.c, line 287. https://github.com/samtools/samtools/blob/master/bam_plcmd.c#L287 , you should update your version of samtools.

otherwise, there is a problem with your read-groups. Did you add some Read-group in your bam ? Adding Read Groups To Bam Files

I didn't realize there was an update 2 months ago. I was using 1.3.1

I did have read-groups during alignment. How do I diagnose what the read-group problems are?

Treating the samples as different was not actually important to my project, so just using the -R flag to ignore the read group lines solved my particular problem.

Log in to answer this question.