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

Amino Acid Sequence Dropped during DNASequence Dump #40

Open
melt6457 opened this issue May 23, 2020 · 0 comments
Open

Amino Acid Sequence Dropped during DNASequence Dump #40

melt6457 opened this issue May 23, 2020 · 0 comments
Labels

Comments

@melt6457
Copy link

melt6457 commented May 23, 2020

Describe the bug
The amino acid sequence information is lost when DNASequences are dumped to python dicts.

To Reproduce
Create a DNASequence object with a translation that contains amino acid information. Use the dump function on that sequence. See the code snippet below.

ex_seq = models.DNASequence(bases='atgcataa', 
                            translations=[{'start'=0,  
                                           'end'=8, 'strand'=1, 
                                           'aminoAcids': 'MHK'}])

print(ex_seq.translations)
print(ex_seq.dump())

From this you will see different output for the translationSchema.

Expected behavior
The amino acid sequence information follows the translation dict during the data dump. In this example, for the translationSchema's of the two print statements to match up.

Additional context
One hacky fix is you can restore the amino acid sequence by saving a temporary translation and replacing the translation in the dump.

@melt6457 melt6457 added the bug label May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant