Issues generating bcf file with samtools
I am using samtools to make a bcf file but I am having some issues. I am not really sure what is going on here and I was hoping to get some help! To generate my bam file I used trimmomatic, bwa, and picard. I am not too sure what is going on here because none of my other files are giving me any issues.
So the issue I am having here is that when I run the following command, the bcf file that is generated never gets larger over time. It just stays at 0 bytes. I am not sure why this is happening? I had no issues with my other samples.
samtools mpileup --redo-BAQ --min-BQ 30 --per-sample-mF -C 50 --output-tags DP,DV,DPR,INFO/DPR,DP4,SP -u -f Felis_catus.Felis_catus_9.0.dna_sm.toplevel.fa --BCF C04893_L001.sorted.dedup.bam > C04893.bcf
the output from samtools flagstat from the file that is giving me issues
690090027 + 0 in total (QC-passed reads + QC-failed reads)
7861265 + 0 secondary
0 + 0 supplementary
52950324 + 0 duplicates
688355595 + 0 mapped (99.75% : N/A)
682228762 + 0 paired in sequencing
341114381 + 0 read1
341114381 + 0 read2
657843484 + 0 properly paired (96.43% : N/A)
679649948 + 0 with itself and mate mapped
844382 + 0 singletons (0.12% : N/A)
19554958 + 0 with mate mapped to a different chr
16483263 + 0 with mate mapped to a different chr (mapQ>=5)
An example of a file that is working correctly
619420497 + 0 in total (QC-passed reads + QC-failed reads)
8721163 + 0 secondary
0 + 0 supplementary
89789840 + 0 duplicates
617477073 + 0 mapped (99.69% : N/A)
610699334 + 0 paired in sequencing
305349667 + 0 read1
305349667 + 0 read2
577735322 + 0 properly paired (94.60% : N/A)
608184428 + 0 with itself and mate mapped
571482 + 0 singletons (0.09% : N/A)
27685608 + 0 with mate mapped to a different chr
23986111 + 0 with mate mapped to a different chr (mapQ>=5)
• 222 views
•
link
0 answers
No answers yet.
Log in to answer this question.
What is the problem?
Sorry, when I go to generate the bcf file, there is just no output. I the size of the file stays at 0
samtools is deprecated for calling variants : use bcftools mpileup.
do you have any output without ' --redo-BAQ --min-BQ 30 --per-sample-mF -C 50 '
I can give bcftools a try but I am still not sure why I was able to get all my other samples to run.
When I run the following
I still get no output.
Why have you got the
--BCFflag? - you don't need that. Pileup format cannot be BCF, in any case, so you should not have .bcf as your output file extension.I think it can be in bcf format? Link "-o, --output FILE Write pileup or VCF/BCF output to FILE, rather than the default of standard output"
Regardless, I am not sure why this method has worked with other samples but not this particular sample. I am really trying to figure out what the issue with this one sample. I don't think it is samtools/bcftools because other samples finished fine. The
flagstatseems normal enough to meDid you not try BCFtools?
I have samtools v1.9 and it says:
I noticed that there was an extra number added to the read group. It said
but it should be
Do you think that could be the issue?
don't use picard for sorting when you can use 'samtools sort'
You seems to use a quite old version of samtools. I would suggest upgrade first and use bcftools mpileup as Pierre suggested.
Are you aware that the output of mpileup is not your final variant calling?
I guess I will give that a try. I am aware!