-
Notifications
You must be signed in to change notification settings - Fork 8
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
NGM: Header does not match the data #50
Comments
Your command cannot work like this. You are piping Sam output into the sort command. I would do it stepwise to see if the mapping is a problem or the samtools command etc. Thanks |
|
could you send me the sam file with just the header and the read? |
Thanks for your answer! How can I send it? I can't attach .sam here. |
true sorry. Please send it to me : fritz.sedlazeck@gmail.com |
How can I extract just the header and the read? |
|
samtools view -H HK1.paired.sort.bam > my.sam yeah feel free to just post / upload a txt file. |
Thanks for your answers. I also tried to run the commands seperately, but got the same error message. Thanks, Jacqueline |
Hi @jhcaddisfly @fritzsedlazeck
|
Hello,
I really need help!
I mapped paired-end short reads to a fasta file using ngm and piped the output to samtools.
I used samtools sort to generate a sorted bamfile which I want to index with samtools index.
This is the command I used:
ngm -r HK1_racon1_nanopolished_genome.fa -1 cHK1_1.fq -2 cHK1_2.fq -t64 --max-read-length 150 --affine | samtools sort -l 9 -@ 10 -O BAM -o HK1.paired.sort.bam && samtools index HK1.paired.sort.bam
I got the following error message from samtools:
[bam_sort_core] merging from 310 files and 10 in-memory blocks...
[E::hts_idx_push] Region 589897413..589897563 cannot be stored in a bai index. Try using a csi index with min_shift = 14, n_lvls >= 6
samtools index: failed to create index for "HK1.paired.sort.bam": Numerical result out of range
It seems that one or more of the reads fall outside of the header reference. The maximum length of any reference sequence is 35803611, while the read that triggered the error starts at 589897413. It looks like the longest chromosome in the SQ headers is ~36Mb while the alignments are out to ~590Mb. This would appear to indicate the header does not match the data and therefore the indexing is not working. So, the issue might be with the ngm alignment.
Do you have any tipps?
The text was updated successfully, but these errors were encountered: