ENCODING AND STORING TEXT USING DNA SEQUENCES
20220358290 · 2022-11-10
Assignee
Inventors
Cpc classification
H03M7/55
ELECTRICITY
International classification
Abstract
Text can be encoded into DNA sequences. Each word from a document or other text sample can be encoded in a DNA sequence or DNA sequences and the DNA sequences can be stored for later retrieval. The DNA sequences can be stored digitally, or actual DNA molecules containing the sequences can be synthesized and stored. In one example, the encoding technique makes use of a polynomial function to transform words based on the Latin alphabet into k-mer DNA sequences of length k. Because the whole bits required for the DNA sequences are smaller than the actual strings of words, storing documents using DNA sequences may compress the documents relative to storing the same documents using other techniques. In at least one example, the mapping between words and DNA sequences is one-to-one and the collision ratio for the encoding is low.
Claims
1. A system comprising: a processor; and a memory that stores executable instructions that, when executed by the processor, facilitate performance of operations, comprising: receiving a first word to be converted into a first DNA sequence; determining a first value of a first polynomial function based on the first word, wherein the determining the first value of the first polynomial function comprises converting each letter of the first word to a first letter number and calculating a first sum of a first position-th power of each first letter number for each letter of the first word multiplied by the first letter number; obtaining a first remainder of a first modulus of the first value of the first polynomial function; converting the first remainder of the first modulus of the first polynomial function into the first DNA sequence; synthesizing a first DNA molecule of the first DNA sequence; receiving a second word to be converted into a second DNA sequence; determining a second value of a second polynomial function based on the second word, wherein the determining the second value of the second polynomial function comprises converting each letter of the second word to a second letter number and calculating a second sum of a second position-th power of each second letter number for each letter of the second word multiplied by the second letter number; obtaining a second remainder of a second modulus of the second value of the second polynomial function; converting the second remainder of the second modulus of the second polynomial function into the second DNA sequence; and synthesizing a second DNA molecule of the second DNA sequence.
2. The system of claim 1, the operations further comprising: storing the second DNA molecule.
3. The system of claim 1, wherein the second DNA sequence comprises a nucleotide sequence of a length corresponding to a power of two used to determine the second modulus.
4. The system of claim 3, wherein the nucleotide sequence further comprises a mapping of two-digit groups from a binary value of the second remainder.
5. The system of claim 1, wherein the determining the second value of the second polynomial function based on the second word further comprises converting each letter of the second word to uppercase.
6. The system of claim 1, wherein the converting the second remainder of the second modulus into the second DNA sequence comprises: separating a binary value of the second remainder into a plurality of two-digit groups; and mapping the plurality of two-digit groups into a nucleotide sequence.
7. The system of claim 3, wherein the converting the second remainder of the second modulus into the second DNA sequence comprises: separating a binary value of the second remainder into a plurality of two-digit groups; and mapping the plurality of two-digit groups into the nucleotide sequence.
8. A method comprising: receiving, by a system including a processor, a word to be converted into a DNA sequence; determining, by the system, a value of a polynomial function based on the word, wherein the determining the value of the polynomial function comprises converting each letter of the word to a letter number and calculating a sum of a position-th power of each letter number for each letter multiplied by the letter number; obtaining, by the system, a remainder of a modulus of the value of the polynomial function; converting, by the system, the remainder of the modulus into the DNA sequence; and synthesizing, by the system, a DNA molecule from the DNA sequence.
9. The method of claim 8, wherein the converting the remainder of the modulus into the DNA sequence comprises: separating a binary value of the remainder into a plurality of two-digit groups; and mapping the plurality of two-digit groups into the DNA sequence.
10. The method of claim 8, further comprising: receiving, by the system, a second word to be converted into a second DNA sequence; determining, by the system, a second value of a second polynomial function based on the second word, wherein the determining the second value of the polynomial function comprises converting each letter of the second word to a second letter number and calculating a second sum of a second position-th power of each second letter number for each letter multiplied by the second letter number; obtaining, by the system, a second remainder of a second modulus of the value of the second polynomial function; converting, by the system, the second remainder of the second modulus into the second DNA sequence; and synthesizing a second DNA molecule from the second DNA sequence.
11. The method of claim 10, wherein the second DNA sequence comprises a nucleotide sequence of a length corresponding to a power of two used to determine the second modulus.
12. The method of claim 11, wherein the nucleotide sequence further comprises a mapping of two-digit groups from a binary value of the second remainder.
13. The method of claim 8, wherein the determining the value of the polynomial function based on the word further comprises converting each letter of the word to uppercase.
14. A non-transitory computer-readable medium including computer program code executable by a processor to cause the processor to perform operations, the operations comprising: receiving a first word; converting the first word into a first DNA sequence; synthesizing a first DNA molecule from the first DNA sequence; receiving a second word to be converted into a second DNA sequence; determining a value of a polynomial function based on the second word, wherein the determining the value of the polynomial function comprises converting each letter of the second word to a letter number and calculating a sum of a position-th power of each letter number for each letter multiplied by the letter number; obtaining a remainder of a modulus of the value of the polynomial function; converting the remainder of the modulus into the second DNA sequence; and synthesizing a second DNA molecule from the second DNA sequence.
15. The non-transitory computer-readable medium of claim 14, wherein the converting the remainder of the modulus into the second DNA sequence comprises: separating a binary value of the remainder into a plurality of two-digit groups; and mapping the plurality of two-digit groups into a nucleotide sequence.
16. The non-transitory computer-readable medium of claim 14, the operations further comprising: storing the second DNA molecule.
17. The non-transitory computer-readable medium of claim 14, wherein the second DNA sequence comprises a nucleotide sequence of a length corresponding to a power of two used to determine the modulus.
18. The non-transitory computer-readable medium of claim 17, wherein the nucleotide sequence further comprises a mapping of two-digit groups from a binary value of the remainder.
19. The non-transitory computer-readable medium of claim 14, wherein the determining the value of the polynomial function based on the second word further comprises converting each letter of the second word to uppercase.
20. The non-transitory computer-readable medium of claim 14, wherein the converting the remainder of the modulus into the second DNA sequence comprises: separating a binary value of the remainder into a plurality of two-digit groups; and mapping the plurality of two-digit groups into a nucleotide sequence.
Description
BRIEF DESCRIPTION OF THE FIGURES
[0008] These and other features, aspects, and advantages of the present disclosure are better understood when the following Detailed Description is read with reference to the accompanying drawings.
[0009]
[0010]
[0011]
[0012]
[0013]
DETAILED DESCRIPTION
[0014] Certain aspects of this disclosure relate to programmatically analyzing a word from a document or other text sample, encoding the word in a DNA sequence using a polynomial function of a numerical representation of the word, and storing the DNA sequence for later retrieval. The DNA sequence can be stored digitally, or an actual DNA molecule of the sequence can be synthesized and stored to take advantage of the fact that DNA molecules exhibit longevity under readily achievable conditions. Capturing and encoding words in a document in this fashion allows the document to be encoded into and stored as a collection of DNA sequences. Using DNA sequences to represent words, entire documents can be stored, retrieved, compared, analyzed, and visualized in more effective ways than would be possible with more traditional storage techniques.
[0015] In certain aspects, the encoding technique makes use of a polynomial function to transform words based on the Latin alphabet into k-mer DNA sequences of length k. Because the whole bits required for the DNA sequences are smaller than the actual strings of words, storing documents using DNA sequences may compress the documents relative to storing the same documents using other techniques. In certain aspects, the mapping between words and DNA sequences is one-to-one and the collision ratio for the encoding is very low, making for fast, efficient, and certain retrieval of the encoded text from storage.
[0016] Detailed descriptions of certain examples are discussed below. These illustrative examples are given to introduce the reader to the general subject matter discussed here and are not intended to limit the scope of the disclosed concepts. The following sections describe various additional aspects and examples with reference to the drawings in which like numerals indicate like elements, and directional descriptions are used to describe the illustrative examples but, like the illustrative examples, should not be used to limit the present disclosure.
[0017] Referring now to the drawings,
[0018] The system 100 of
[0019] Still referring to
[0020] The numbers of devices depicted in
[0021] Any computing device that implements DNA encoding according to at least some aspects of the present disclosure may contain many of the same elements as described with respect to server 102 of
[0022] A memory device storing computer program instructions executable by the processing device can include any type of memory device that retains stored information when powered off. A computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processing device with computer-readable instructions or other program code. Such a medium may store the instructions on a server prior to installation in or programming of a proximity-based security mechanism. Non-limiting examples of a computer-readable medium include (but are not limited to) magnetic disk(s), memory chip(s), read-only memory (ROM), random-access memory (“RAM”), an ASIC, a configured processing device, optical storage, or any other medium from which a computer processing device can read instructions.
[0023] The processes discuss below are examples illustrating DNA encoding of English words. The techniques illustrated can be used with little or no modification to encode words in any language that uses the Latin alphabet. The techniques can be applied to words in other languages, including languages that are not based on the Latin alphabet with appropriate modifications.
[0024]
[0025] Still referring to
[0026] For purposes of
[0027] Continuing with
For the word “music”:
F=12*26.sup.0+20*26.sup.1+18*26.sup.2+8*26.sup.3+2*26.sup.4=1067260.
[0028] A DNA sequence consists of four nucleotides represented by the letters A, T, C and G. Each nucleotide character, A, T, C and G, needs two bits for storage.
R=mod(F,2.sup.20).
For the word “music” the remainder is 18684.
[0029] At block 404 of
[0030] A code unit size is generally equivalent to the bit measurement for the particular encoding. For example, an ASCII character in 8-bit ASCII encoding is 8 bits (1 byte) long. If an English word contains m ASCII characters, then the storage space needed for the word is 8 m. For example, the word communication contains 13 characters and would need 104 bits storage space in ASCII computer files. By using 10-mer DNA encoding as described above, an English word needs 20 bits for storage, regardless of its length. DNA encoding as described herein therefore provides compression resulting in less storage space being used even when the DNA sequences are maintained in digital format rather than being synthesized into DNA.
[0031]
[0032] The system discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provides a result conditioned on one or more inputs. Suitable computing devices include multipurpose microprocessor-based computing systems accessing stored software that programs or configures the computing system from a general-purpose computing apparatus to a specialized computing apparatus implementing one or more aspects of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages may be used to implement the teachings contained herein in software to be used in programming or configuring a computing device.
[0033] Aspects of the methods disclosed herein may be performed in the operation of such computing devices. The order of the blocks presented in the examples above can be varied—for example, blocks can be re-ordered, combined, or broken into sub-blocks. Certain blocks or processes can be performed in parallel.
[0034] The use of “configured to” herein is meant as open and inclusive language that does not foreclose devices configured to perform additional tasks or steps. Additionally, the use of “based on” is meant to be open and inclusive, in that a process, step, calculation, or other action “based on” one or more recited conditions or values may, in practice, be based on additional conditions or values beyond those recited. Headings, lists, and numbering included herein are for ease of explanation only and are not meant to be limiting.
[0035] The foregoing description of the examples, including illustrated examples, of the subject matter has been presented only for the purpose of illustration and description and is not intended to be exhaustive or to limit the subject matter to the precise forms disclosed. Numerous modifications, adaptations, and uses thereof will be apparent to those skilled in the art without departing from the scope of this subject matter. The illustrative examples described above are given to introduce the reader to the general subject matter discussed here and are not intended to limit the scope of the disclosed concepts.