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

dna ambiguity #3

Open
biomendi opened this issue Mar 15, 2021 · 1 comment
Open

dna ambiguity #3

biomendi opened this issue Mar 15, 2021 · 1 comment

Comments

@biomendi
Copy link

Hi Feliixx,

I have encountered an error when running gotranseq in my data. The error is the following:

WARNING: invalid char in sequence SAGAGTCATCTCCTATGCAGGCTGCCTGACTCAGATGTCTCTCTTTGCCATTTKTGGAGGCATGGAAGAGAGACATGCTCCTGAGTGTGATGGCCTATGGCCGGTTTGTAGCCATCTGTCACCCTCTATATCGTTCAGCCATCTTGAACCCATGTTTCTGTGGCTTCCTAGATTTGTTGTCTTCGTTTTGTTTTGTTTTGTTTTTCTCAGTCTTTTAGACTCCCAGCTGCACAACTTGATTGCCTTACAAATGACCGGCTTCAAGGATGTGGAATTCCTAATTTCTTCTGGGAACCTTCTCAACTCCCCATCTTGCATGTTGTGACACCTTCACCAGGAACATCAACCTGTATTTCCCTGCTGCCGTATTTGGTTTTCTTCCCATCTTGGGGACCTTTTCTCTTACTGTAAAATTGTTTCCTCCATTCTGAGGGTTTCATCATCAGGTGGGAAGTATAAACCTTCTCCACCTGTGGGTCTCACCTGCCAGTTGTTTGCTGATTTTGTGGAACAGGTGTTGGAGGGTACCTTGGTTCAGATGTGTCATCTTCCCCAAGAAAGAGTGCAGTGCCCTCAGTGATGTACCCGGTGGTCACCTCC: S, ignoringWARNING: invalid char in sequence SKTGGAGGCATGGAAGAGAGACATGCTCCTGAGTGTGATGGCCTATGGCCGGTTTGTAGCCATCTGTCACCCTCTATATCGTTCAGCCATCTTGAACCCATGTTTCTGTGGCTTCCTAGATTTGTTGTCTTCGTTTTGTTTTGTTTTGTTTTTCTCAGTCTTTTAGACTCCCAGCTGCACAACTTGATTGCCTTACAAATGACCGGCTTCAAGGATGTGGAATTCCTAATTTCTTCTGGGAACCTTCTCAACTCCCCATCTTGCATGTTGTGACACCTTCACCAGGAACATCAACCTGTATTTCCCTGCTGCCGTATTTGGTTTTCTTCCCATCTTGGGGACCTTTTCTCTTACTGTAAAATTGTTTCCTCCATTCTGAGGGTTTCATCATCAGGTGGGAAGTATAAACCTTCTCCACCTGTGGGTCTCACCTGCCAGTTGTTTGCTGATTTTGTGGAACAGGTGTTGGAGGGTACCTTGGTTCAGATGTGTCATCTTCCCCAAGAAAGAGTGCAGTGCCCTCAGTGATGTACCCGGTGGTCACCTCC: K, ignoringpanic: runtime error: index out of range [4915971] with length 263173

goroutine 21 [running]:
github.com/feliixx/gotranseq/transeq.(*writer).translate3Frames(0xc000980000, 0xc00005e600, 0x2f6, 0x5b6)
	/home/runner/work/gotranseq/gotranseq/transeq/writer.go:99 +0x89a
github.com/feliixx/gotranseq/transeq.(*writer).translate(0xc000980000, 0xc00005e600, 0x2f6, 0x5b6)
	/home/runner/work/gotranseq/gotranseq/transeq/writer.go:60 +0x71
github.com/feliixx/gotranseq/transeq.Translate.func1(0xc00010c150, 0xc000280000, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5858585858585800, 0x10fe62d, ...)
	/home/runner/work/gotranseq/gotranseq/transeq/transeq.go:149 +0x318
created by github.com/feliixx/gotranseq/transeq.Translate
	/home/runner/work/gotranseq/gotranseq/transeq/transeq.go:135 +0x3da

I think the reason is that there are ambiguous characters in my data. In this case, the character "S" represents the possibility of finding cytosine or guanine. Is there any solution to this issue?

Here are the nucleotide sequences in fasta format:

test.fa.txt

feliixx added a commit that referenced this issue Mar 16, 2021
if ambiguous nucleotide, replace it with 'N'

updates #3
feliixx added a commit that referenced this issue Mar 16, 2021
if ambiguous nucleotide, replace it with 'N'

updates #3
@feliixx
Copy link
Owner

feliixx commented Mar 16, 2021

Hi @biomendi, thanks for the report

you're right, ambiguous nucleotides are curently not supported. However, the program should not crash.
I've published a new release with a fix for this bug ( for now, ambiguous nucleotides are replaces with N )

I may add support for ambiguous nucleotide later, but I'm not sure how to do it yet

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

2 participants