-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Samtools error:[E::bam_hdr_write] Header too long for BAM format #181
Comments
Hi Monica, Are the mutations you're trying to make close together e.g. within 1000bp of each other? If so, try setting the -z option to something around your read length (~100-150bp probably). It would also help troubleshoot if you post the output from addsnv. Good luck! |
Hi Adam,
I tried using -z option as well, but I still see the error. I can try post
the details of addsnv.
[E::bam_hdr_write] Header too long for BAM format
samtools merge: failed to write header to
"addsnv.b0ed8228-36ee-43d0-8cde-8e1a5a48fc15.muts.bam": No such file or
directory
INFO 2021-06-09 12:35:59,164 done making mutations, merging mutations into
BM.bam --> BM.withamperrors.bam
Traceback (most recent call last):
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/bamsurgeon/20200925-python-3.8.1/bin/addsnv.py",
line 4, in <module>
…__import__('pkg_resources').run_script('bamsurgeon==1.2', 'addsnv.py')
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/setuptools/45.1.0-python-3.8.1/lib/python3.8/site-packages/setuptools-45.1.0-py3.8.egg/pkg_resources/__init__.py",
line 667, in run_script
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/setuptools/45.1.0-python-3.8.1/lib/python3.8/site-packages/setuptools-45.1.0-py3.8.egg/pkg_resources/__init__.py",
line 1470, in run_script
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/bamsurgeon/20200925-python-3.8.1/lib/python3.8/site-packages/bamsurgeon-1.2-py3.8.egg/EGG-INFO/scripts/addsnv.py",
line 523, in <module>
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/bamsurgeon/20200925-python-3.8.1/lib/python3.8/site-packages/bamsurgeon-1.2-py3.8.egg/EGG-INFO/scripts/addsnv.py",
line 520, in run
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/bamsurgeon/20200925-python-3.8.1/lib/python3.8/site-packages/bamsurgeon-1.2-py3.8.egg/EGG-INFO/scripts/addsnv.py",
line 466, in main
File
"/opt/cesga/easybuild-cesga/software/Compiler/gcccore/6.4.0/bamsurgeon/20200925-python-3.8.1/lib/python3.8/site-packages/bamsurgeon-1.2-py3.8.egg/EGG-INFO/scripts/addsnv.py",
line 78, in replace
File "pysam/libcalignmentfile.pyx", line 742, in
pysam.libcalignmentfile.AlignmentFile.__cinit__
File "pysam/libcalignmentfile.pyx", line 947, in
pysam.libcalignmentfile.AlignmentFile._open
ValueError: file does not contain alignment data
as the header is too long it does not generate bam file I think.
On Mon, Jun 7, 2021 at 7:16 AM adamewing ***@***.***> wrote:
Hi Monica,
Are the mutations you're trying to make close together e.g. within 1000bp
of each other?
If so, try setting the -z option to something around your read length
(~100-150bp probably).
It would also help troubleshoot if you post the output from addsnv.
Good luck!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIOM2DJ5V4VOX7ECLTEJVFDTRRIZFANCNFSM456HGGIA>
.
--
Monica Valecha, PhD Student
Phylogenomics Lab,
University of Vigo
http://darwin.uvigo.es/
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
When I run bamsrugeon-20200925-python-3.8.1, I get this error
[E::bam_hdr_write] Header too long for BAM format
, which I suspect coming from samtools/1.10. So I tried using samtools/1.9 instead and I don't get any errors, but I don't even see spike-in mutations in the data. When I use a small number of spike-in mutations they do run without any errors and with spike-in.As I want to insert a huge number of mutations, bamsurgeon fails with the above error. Any suggestions that may help with this issue?
Thanks.
Monica
The text was updated successfully, but these errors were encountered: