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
An error:[E::sam_hdr_create] Invalid header line: must start with @HD/@SQ/@RG/@PG/@CO #2024
Comments
Can you post the entire header as a text file? Can you also tell us what samtools command you were using. |
Thanks for your reply. |
Usually when I see such errors it's because there is something else being mixed in with stdout and you're using a pipe. Possibly related to nohup or sometimes caused by some batch submission systems. The full command line and what environment it is being ran under may well impact this. However I also see your header file uses spaces instead of tabs. This is an error. It may be how you saved it, or something like cut and paste. Or possibly it's what samtools is complaining about. However it looks to give different error with spaces, so I think this malformed headersam.txt is a second problem. |
Thank you for your detailed answer.I will try to regenerate the sam file and check the separator. |
When I tried to use samtools(version:1.19.2) to view sam files, it occured an error.
[E::sam_hdr_create] Invalid header line: must start with @HD/@SQ/@RG/@PG/@co
However, I have checked many times about the header of sam files, which are fit to the format.
A part of the sam file is as follow:
The code to get the sam files is as follow:
bowtie -x "$REF_GENOME_INDEX" -f "$FILE" -S "$SAM_FILE"
Does anyone know how to solve this problem? Is the sam file damaged when my bowtie is in use?
The text was updated successfully, but these errors were encountered: