Skip to content
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

QUAL for secondary alignments #458

Closed
sjin09 opened this issue Jul 29, 2019 · 7 comments
Closed

QUAL for secondary alignments #458

sjin09 opened this issue Jul 29, 2019 · 7 comments

Comments

@sjin09
Copy link

sjin09 commented Jul 29, 2019

Dear @lh3

I was wondering if minimap2 could have the option to include QUAL for secondary alignments. I am aware from #17 issue that this is currently not implemented. We generated HiFi reads from a cancer genome with many genomic rearrangements. If HiFi read contains the genomic rearrangement, it will have multiple secondary/supplementary alignments. The absence of QUAL for secondary/supplementary alignments create problems for downstream analysis.

deepvariant cannot accept alignments without QUAL score for mutation detection. deepvariant, hence, cannot use the secondary alignments for mutation detection.

Regards,
Sangjin Lee

@lh3
Copy link
Owner

lh3 commented Jul 29, 2019

By definition, secondary alignments always have mapping quality 0.

@lh3 lh3 closed this as completed Jul 29, 2019
@lh3 lh3 added the question label Jul 29, 2019
@sjin09
Copy link
Author

sjin09 commented Jul 29, 2019

I was referring to the QUAL:ASCII of Phred-scaled base QUALity+33 and not the MAPQ. In this case, would you suggest extracting the phred-quality score from the fastq and appending it to the secondary alignments?

@lh3
Copy link
Owner

lh3 commented Jul 31, 2019

Then, no. Minimap2 doesn't and won't output sequences or qualities for secondary mappings. Sorry.

@lh3
Copy link
Owner

lh3 commented Jul 31, 2019

Minimap2 already outputs SEQ and QUAL for supplementary alignments.

@cmdcolin
Copy link

late to the thread here but I made a little program that fetches the SEQ/QUAL from the primary alignment and adds it to the secondary mappings. hope that helps!

https://github.com/cmdcolin/secondary_rewriter

@jambler24
Copy link

Found my way here due to the following error:

Error in .normarg_at2(at, x) : 
  some ranges in 'at' are off-limits with respect to their corresponding
  sequence in 'x'

Seems like it is still causing issues with downstream analysis in places.

@enc-wmatern
Copy link

You should be able to get the sequences for secondary alignments written to the output bamfile using "-Y": #526

"-Y" also appears to output the Phred scores for each secondary alignment - tested with version 2.26-r1175.

This behavior appears to be undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants