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

Keep Z bases as Z instead of transforming to N #327

Closed
avilella opened this issue Feb 9, 2019 · 4 comments
Closed

Keep Z bases as Z instead of transforming to N #327

avilella opened this issue Feb 9, 2019 · 4 comments

Comments

@avilella
Copy link

avilella commented Feb 9, 2019

Would it be possible for minimap2 to Keep Z bases as Z instead of transforming to N?

The nanopore flappie basecaller can call ZG bases in methylated CG (ZpG of methylated CpGs).

If minimap2 / samtools had the ability to preserve the Z bases, we could preserve this information after alignment.

I presume extending the alphabet for DNA modifications is something that may have been discussed in the past, so whichever way works best, I would like to know.

@jmarshall
Copy link
Contributor

How to store base modifications in SAM/BAM/CRAM is something that's under discussion at the moment — see samtools/hts-specs#362.

@lh3 lh3 added the noissue label Feb 9, 2019
@lh3
Copy link
Owner

lh3 commented Feb 9, 2019

Would it be possible for minimap2 to Keep Z bases as Z instead of transforming to N?

Minimap2 doesn't convert Z to N.

@ahcm
Copy link

ahcm commented Feb 11, 2019

Doesn't it need something like this?

diff --git a/sdust.c b/sdust.c
index 176dcb0..25a3f1b 100644
--- a/sdust.c
+++ b/sdust.c
@@ -27,9 +27,9 @@ unsigned char seq_nt4_table[256] = {
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
        4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4, 
-       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 1, 4,  4, 4, 4, 4, 
        4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4, 
-       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
+       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 1, 4,  4, 4, 4, 4, 
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4, 
diff --git a/sketch.c b/sketch.c
index f830693..cc5a8c4 100644
--- a/sketch.c
+++ b/sketch.c
@@ -12,9 +12,9 @@ unsigned char seq_nt4_table[256] = {
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
        4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4,
-       4, 4, 4, 4,  3, 3, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
+       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 1, 4,  4, 4, 4, 4, 
        4, 0, 4, 1,  4, 4, 4, 2,  4, 4, 4, 4,  4, 4, 4, 4,
-       4, 4, 4, 4,  3, 3, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
+       4, 4, 4, 4,  3, 4, 4, 4,  4, 4, 1, 4,  4, 4, 4, 4, 
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
        4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,

@lh3
Copy link
Owner

lh3 commented Feb 11, 2019

No, that is irrelevant to the request. Also, introducing additional bases requires the coordination of the ecosystem. Minimap2 only plays a small part in this.

I am closing this issue.

@lh3 lh3 closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants