@xmath0department of electrical and computer engineering , university of illinois , urbana , il 61801    @xmath1department of chemical and biomolecular engineering , university of illinois , urbana , il 61801    @xmath2department of bioengineering , university of illinois , urbana , il 61801    @xmath3institute for genomic biology , university of illinois , urbana , il 61801    @xmath4these authors contributed equally to the work .
@xmath5to whom correspondences should be addressed : olgica milenkovic , e - mail : milenkov@illinois.edu    addressing the emerging demands for massive data repositories , and building upon the rapid development of technologies for dna synthesis and sequencing , a number of laboratories have recently outlined architectures for archival dna - based storage  @xcite . the architecture in  @xcite achieved a storage density of @xmath6 tb / gram , while the system described in  @xcite raised the density to @xmath7 pb / gram .
the success of the latter method may be largely attributed to three _ classical coding schemes : _ huffman coding , differential coding , and single parity - check coding  @xcite .
huffman coding was used for data compression , while differential coding was used for eliminating homopolymers ( i.e. , repeated consecutive bases ) in the dna strings .
parity - checks were used to add controlled redundancy , which in conjunction with four - fold coverage allows for mitigating assembly errors .    due to dynamic changes in biotechnological systems ,
none of the three coding schemes represents a suitable solution from the perspective of current dna sequencer designs : huffman codes are fixed - to - variable length compressors that can lead to catastrophic error propagation in the presence of sequencing noise ; the same is true of differential codes .
homopolymers do not represent a significant source of errors in illumina sequencing platforms  @xcite , while single parity redundancy or rs codes and differential encoding are inadequate for combating error - inducing sequence patterns such as long substrings with high gc content  @xcite . as a result ,
assembly errors are likely , and were observed during the readout process described in  @xcite .
an even more important issue that prohibits the practical wide - spread use of the schemes described in  @xcite is that accurate partial and random access to data is impossible , as one has to reconstruct the whole text in order to read or retrieve the information encoded even in a few bases .
furthermore , all current designs support read - only storage .
the first limitation represents a significant drawback , as one usually needs to accommodate access to specific data sections ; the second limitation prevents the use of current dna storage methods in architectures that call for moderate data editing , for storing frequently updated information and memorizing the history of edits . moving from a read - only to a rewritable dna storage system requires a major implementation paradigm shift , as :    * 1 .
* editing in the compressive domain may require rewriting almost the whole information content ;    * 2 .
* rewriting is complicated by the current data dna storage format that involves reads of length @xmath8 bps shifted by @xmath9 bps so as to ensure four - fold coverage of the sequence ( see figure  [ fig : system ] ( a ) for an illustration and description of the data format used in  @xcite ) . in order to rewrite one base , one needs to selectively access and modify four `` consecutive '' reads ;    * 3 . * addressing methods used in  @xcite only allow for determining the position of a read in a file , but can not ensure precise selection of reads of interest , as undesired cross - hybridization between the primers and parts of the information blocks may occur . to overcome the aforementioned issues
, we developed a new , random - access and rewritable dna - based storage architecture based on dna sequences endowed with specialized address strings that may be used for selective information access and encoding with inherent error - correction capabilities .
the addresses are designed to be _ mutually uncorrelated _ and to satisfy the _ error - control running digital sum constraint _
given the address sequences , encoding is performed by stringing together properly terminated prefixes of the addresses as dictated by the information sequence .
this encoding method represents a special form of _ prefix - synchronized coding _
given that the addresses are chosen to be uncorrelated and at large hamming distance from each other , it is highly unlikely for one address to be confused with another address or with another section of the encoded blocks .
furthermore , selection of the blocks to be rewritten is made possible by the prefix encoding format , while rewriting is performed via two dna editing techniques , the gblock and oe - pcr ( overlap - extension polymerase chain reaction ) methods  @xcite . with the latter method , rewriting is done in several steps by using short and cheap primers .
the first method is more efficient , but requires synthesizing longer and hence more expensive primers .
both methods were tested on dna encoded wikipedia entries of size @xmath10 kb , corresponding to six universities , where information in one , two and three blocks was rewritten in the dna encoded domain .
the rewritten blocks were selected , amplified and sanger sequenced  @xcite to verify that selection and rewriting are performed with @xmath11 accuracy .
the main feature of our storage architecture that enables highly sensitive random access and accurate rewriting is _
addressing_. the rational behind the proposed approach is that each block in a random access system must be equipped with an address that will allow for unique selection and amplification via dna sequence primers .        instead of storing blocks mimicking the structure and length of reads generated during high - throughput sequencing , we synthesized blocks of length @xmath12 bps tagged at both ends by specially designed address sequences . adding addresses to short blocks of length @xmath8 bps would incur a large storage overhead , while synthesizing blocks longer than @xmath12 bps using current technologies is prohibitively costly .
more precisely , each data block of length @xmath12 bps was flanked at both ends by two unique , yet different , address blocks of length @xmath13 bps .
these addresses are used to provide specificity of access ( see figure  [ fig : system ] ( b ) and the supplementary information for details ) .
the remaining @xmath14 bases in a block are divided into @xmath15 sub - blocks of length @xmath16 bps , with each block encoding six words of the text .
the `` word - encoding '' process may be seen as a specialized compaction scheme suitable for rewriting , and it operates as follows .
first , different words in the text are counted and tabulated in a dictionary .
each word in the dictionary is converted into a binary sequence of length sufficiently long to allow for encoding of the dictionary . for our current implementation and texts of choice , described in the supplementary information section ,
this length was set to @xmath17 .
encodings of six consecutive words are subsequently grouped into binary sequences of length @xmath18 .
the two - bit @xmath19 is appended as a word marker to the left hand side of each binary sequence of length @xmath18 , resulting in sequences of length @xmath20 bits .
the binary sequences are subsequently translated into dna blocks of length @xmath16 bps using a new family of dna prefix - synchronized codes described in the methods section .
our choice for the number of jointly encoded words is governed by the goal to make rewrites as straightforward as possible and to avoid error propagation due to variable codelengths .
furthermore , as most rewrites include words , rather than individual symbols , the word encoding method represents an efficient means for content update .
details regarding the counting and grouping procedure may be found in the supplementary information .
for three selected access queries , the @xmath12 bps blocks containing the desired information were identified via primers corresponding to their unique addresses , pcr amplified , sanger sequenced , and subsequently decoded .
two methods were used for content rewriting .
if the region to be rewritten had length exceeding several hundreds , new sequences with unique primers were synthesized as this solution represents a less costly alternative to rewriting .
for the case that a relatively short substring of the encoded string had to be modified , the corresponding @xmath12 bps block hosting the string was identified and the changes were generated via dna editing .
both the random access and rewriting protocols were tested experimentally on two jointly stored text files .
one text file , of size @xmath21 kb , contained the history of university of illinois , urbana - champaign ( uiuc ) based on its wikipedia entry retrieved on @xmath22 .
the other text file , of size @xmath23 kb , contained the introductory wikipedia entries of berkeley , harvard , mit , princeton , and stanford , retrieved on @xmath24 .
encoded information was converted into dna blocks of length @xmath12 bps synthesized by idt ( integrated dna technologies ) , at a cost of @xmath25 per @xmath12 bps ( see http://www.idtdna.com/pages/products/genes/gblocks-gene-fragments ) .
the rewriting experiments encompassed :    * 1 . * _ pcr selection and amplification of one @xmath12 bps sequence and simultaneous selection and amplification of three @xmath12 bps sequences in the pool . _
all @xmath26 linear @xmath12 bps fragments were mixed , and the mixture was used as a template for pcr amplification and selection .
the results of amplification were verified by confirming sequence lengths of @xmath12 bps banks via gel electrophoresis ( figure  [ fig : electro ] ( a ) ) and by randomly sampling @xmath27-@xmath28 sequences from the pools and sanger sequencing them ( figure  [ fig : electro ] ( b ) ) . * 2 . *
_ experimental content rewriting via synthesis of edits located at various positions in the @xmath12 bps blocks .
_ for simplicity of notation , we refer to the blocks in the pool on which we performed selection and editing as b1 , b2 , and b3 .
two primers were synthesized for each rewrite in the blocks , for the forward and reverse direction .
in addition , two different editing / mutation techniques were used , gblock and overlap - extension ( oe ) pcr .
gblocks are double - stranded genomic fragments used as primers or for the purpose of genome editing , while oe - pcr is a variant of pcr used for specific dna sequence editing via point editing / mutations or splicing . to demonstrate the plausibility of a cost efficient method for editing , oe - pcr was implemented with general primers ( @xmath29 bps ) only .
note that for edits shorter than @xmath30 bps , the mutation sequences were designed as overhangs in primers .
then , the three pcr products were used as templates for the final pcr reaction involving the entire @xmath12 bps rewrite .
figure [ fig : system ] ( c ) illustrates the described rewriting process .
in addition , a summary of the experiments performed is provided in table  [ tab : summary ] .
.[tab : summary ] selection , rewriting and sequencing results .
each rewritten @xmath12 bps sequence was ligated to a linearized pcrtm - blunt vector using the zero blunt pcr cloning kit and was transformed into _
_ the _ e. coli _ strains with correct plasmids were sequenced at acgt , inc .
sequencing was performed using two universal primers : m13f_20 ( in the reverse direction ) and m13r ( in the forward direction ) to ensure that the entire block of @xmath12 bps is covered . [ cols="^,^,^,^",options="header " , ]
to encode information on dna media , we employed a two - step procedure . first , we designed address sequences of short length which satisfy a number of constraints that makes them suitable for highly selective random access  @xcite .
_ constrained coding _ ensures that dna patterns prone to sequencing errors are avoided and that dna blocks are accurately accessed , amplified and selected without perturbing or accidentally selecting other blocks in the dna pool .
the coding constraints apply to address primer design , but also indirectly govern the properties of the fully encoded dna information blocks .
the design procedure used is semi - analytical , in so far that it combines combinatorial methods with computer search techniques .
we required the address sequences to satisfy the following constraints :    * ( c1 ) constant gc content ( close to @xmath31 ) of all their prefixes of sufficiently long length .
dna strands with @xmath31 gc content are more stable than dna strands with lower or higher gc content and have better coverage during sequencing . since encoding user information is accomplished via prefix - synchronization , it is important to impose the gc content constraint on the addresses as well as their prefixes , as the latter requirement also ensures that all fragments of encoded data blocks have balanced gc content . * ( c2 ) large mutual hamming distance , as it reduces the probability of erroneous address selection . recall that the hamming distance between two strings of equal length equals the number of positions at which the corresponding symbols disagree .
an appropriate choice for the minimum hamming distance is equal to half of the address sequence length ( @xmath32 bps in our current implementation which uses length @xmath13 address primers ) . *
( c3 ) uncorrelatedness of the addresses , which imposes the restriction that prefixes of one address do not appear as suffixes of the same or another address and vice versa .
the motivation for this new constraint comes from the fact that addresses are used to provide unique identities for the blocks , and that their substrings should therefore not appear in `` similar form '' within other addresses . here , `` similarity '' is assessed in terms of hybridization affinity .
furthermore , long undesired prefix - suffix matches may lead to read assembly errors in blocks during joint informational retrieval and sequencing . *
( c4 ) absence of secondary ( folding ) structures , as such structures may cause errors in the process of pcr amplification and fragment rewriting .
addresses satisfying constraints c1-c2 may be constructed via error - correcting codes with small running digital sum  @xcite adapted for the new storage system .
properties of these codes are discussed in section  [ sub : balanced ] . the novel notion of _ mutually uncorrelated sequences
_ is introduced in  [ sub : correlation ] .
constructing addresses that simultaneously satisfy the constraints c1-c4 and determining bounds on the largest number of such sequences is prohibitively complex  @xcite . to mitigate this problem , we resort to a _ semi - constructive _ address design approach , in which balanced error - correcting codes are designed independently , and subsequently expurgated so as to identify a large set of mutually uncorrelated sequences .
the resulting sequences are subsequently tested for secondary structure using  _ mfold _ and  _ vienna _
we conjecture that the number of sequences satisfying c1-c4 grows exponentially with their length : proofs towards establishing this claim include results on the exponential size of codes under each constraint individually . given two uncorrelated sequences as flanking addresses of one block , one of the sequences
is selected to encode user information via a new implementation of _ prefix - synchronized encoding _
@xcite , described in  [ sub : prefix ] . the asymptotic rate of an optimal single sequence prefix - free codes is one .
hence , there is no asymptotic coding loss for avoiding prefixes of one sequence ; we only observe a minor coding loss for each finite - length block . for multiple sequences of arbitrary structure ,
the problem of determining the optimal code rate is significantly more complicated and the rates have to be evaluated numerically , by solving systems of linear equations  @xcite as described in  [ sub : prefix ] and the supplementary information .
this system of equations leads to a particularly simple form for the generating function of mutually uncorrelated sequences , as explained in the supplementary information .
an important criteria for selecting block addresses is to ensure that the corresponding dna primer sequences have prefixes with a gc content approximately equal to @xmath31 , and that the sequences are at large pairwise hamming distance . due to their applications in optical storage , codes that address related issues
have been studied in a different form under the name of _ bounded running digital sum _ ( brds ) codes
@xcite . a detailed overview of this coding technique may be found in  @xcite .
consider a sequence @xmath33 over the alphabet @xmath34 .
we refer to @xmath35 as the running digital sum ( rds ) of the sequence @xmath36 up to length @xmath37 , @xmath38 .
let @xmath39 denote the largest value of the running digital sum of the sequence @xmath36 .
for some predetermined value @xmath40 , a set of sequences @xmath41 is termed a brds code with parameter @xmath42 if @xmath43 for all @xmath44 .
note that one can define non - binary brds codes in an equivalent manner , with the alphabet usually assumed to be symmetric , @xmath45 , and where @xmath46 . a set of dna sequences over @xmath47
may be constructed in a straightforward manner by mapping each @xmath48 symbol into one of the bases @xmath49 and @xmath50 into one of the bases @xmath51 , or vice versa .
alternatively , one can use brds over an alphabet of size four directly .    to address the constraints c1-c2
, one needs to construct a large set of brds codewords at sufficiently large hamming distance from each other . via the mapping
described above , these codewords may be subsequently translated to dna sequences with a gc content approximately equal to @xmath31 for all sequence prefixes , and at the same hamming distance as the original sequences .
let @xmath52 be the parameters of a brds error - correcting code , where @xmath53 denotes the number of codewords of length @xmath54 , @xmath55 denotes the minimum distance of the code , while @xmath56 equals the code rate .
for @xmath57 and @xmath58 , the best known brds - code has parameters @xmath59 , while for @xmath60 and @xmath61 , codes with parameters @xmath62 exist . for @xmath60 and @xmath58 ,
the best known brds code has parameters @xmath63  @xcite .
note that each of these codes has an exponentially large number of codewords , among which a ( sufficiently ) large number of sequences satisfy the required correlation property c3 , discussed next , and the folding property c4 .
codewords satisfying constraints c3-c4 were found by expurgating the brds codes via computer search .
we describe next the notion of autocorrelation of a sequence and introduce the related notion of mutual correlation of sequences .
it was shown in @xcite that the autocorrelation function is the crucial mathematical concept for studying sequences avoiding forbidden strings and substrings . in the storage context ,
forbidden strings correspond to the addresses of the blocks in the pool . in order to accommodate the need for selective retrieval of a dna block without accidentally selecting any undesirable blocks , we find it necessary to also introduce the notion of mutually uncorrelated sequences .
let @xmath64 and @xmath65 be two words , possibly of different lengths , over some alphabet of size @xmath66 .
the correlation of @xmath64 and @xmath65 , denoted by @xmath67 , is a binary string of the same length as @xmath64 .
the @xmath68-th bit ( from the left ) of @xmath67 is determined by placing @xmath65 under @xmath64 so that the leftmost character of @xmath65 is under the @xmath68-th character ( from the left ) of @xmath64 , and checking whether the characters in the overlapping segments of @xmath64 and @xmath65 are identical . if they are identical , the @xmath68-th bit of @xmath67 is set to @xmath69 , otherwise , it is set to @xmath70 .
for example , for @xmath71 and @xmath72 , @xmath73 , as depicted below .
note that in general , @xmath74 , and that the two correlation vectors may be of different lengths . in the example
above , we have @xmath75 .
the autocorrelation of a word @xmath64 equals @xmath76 . in the example below , @xmath77 .
@xmath78    _ a sequence x is self - uncorrelated if _ @xmath79 .
a set of sequences @xmath80 is termed mutually uncorrelated if each sequence is self - uncorrelated and if all pairs of distinct sequences satisfy @xmath81 and @xmath82 .
intuitively , correlation captures the extent to which prefixes of sequences overlap with suffixes of the same or other sequences .
furthermore , the notion of mutual uncorrelatedness may be relaxed by requiring that only sufficiently long prefixes do not match sufficiently long suffixes of other sequences .
sequences with this property , and at sufficiently large hamming distance , eliminate undesired address cross - hybridization during selection and cross - sequence assembly errors .
we proved the following bound on the size of the largest mutually uncorrelated set of sequences of length @xmath54 over an alphabet of size @xmath83 .
the bounds show that there exist exponentially many mutually uncorrelated sequences for any choice of @xmath54 , and the lower bound is constructive .
furthermore , the construction used in the bound `` preserves '' the hamming distance ( see the supplementary information ) .
[ thm : bounds ] suppose that @xmath84 is a set of @xmath85 pairwise mutually uncorrelated sequences of length @xmath54 .
let @xmath86 denote the largest possible value of @xmath85 for a given @xmath54 .
then [ lem : upper_bound ] @xmath87    as an illustration , for @xmath88 , the _ lower bound _ equals @xmath89 .
the proof of the theorem is give in the supplementary information .
it remains an open problem to determine the largest number of address sequences that jointly satisfy the constraints c1-c4 .
we conjecture that the number of such sequences is exponential in @xmath54 , as the numbers of words that satisfy c1-c2 , c3 and c4  @xcite are exponential .
exponentially large families of address sequences are important indicators of the scalability of the system and they also influence the rate of information encoding in dna .    using a casting of the address sequence design problem in terms of a simple and efficient greedy search procedure , we were able to identify @xmath90 sequences for length @xmath88 that satisfy constraints c1-c4 , out of which @xmath26 pairs were used for block addressing .
another means to generate large sets of sequences satisfying the constraints is via approximate solvers for the _ largest independent set problem
_  @xcite .
examples of sequences constructed in the aforementioned manner and used in our experiments are listed in the supplementary information .      in the previous sections
, we described how to construct address sequences that can serve as unique identifiers of the blocks they are associated with .
we also pointed out that once such address sequences are identified , user information has to be encoded in order to _ avoid _ the appearance of any of the addresses , sufficiently long substrings of the addresses , or substrings similar to the addresses in the resulting dna codeword blocks . for this purpose
, we developed new prefix - synchronized encoding schemes based on  @xcite .    to address the problem at hand ,
we start by introducing comma free and prefix - synchronized codes which allow for constructing codewords that avoid address patterns .
a block code @xmath91 comprising a set of codewords of length @xmath92 over an alphabet of size @xmath93 is called _ comma free _ if and only if for any pair of not necessarily distinct codewords @xmath94 and @xmath95 in @xmath91 , the @xmath92 concatenations @xmath96 are not in @xmath91  @xcite .
comma free codes enable efficient synchronization protocols , as one is able to determine the starting positions of codewords without ambiguity .
a major drawback of comma free codes is the need to implement an exhaustive search procedure over sequence sets to decide whether or not a given string of length @xmath54 should be used as a codeword or not .
this difficulty can be overcome by using a special family of comma free codes , introduced by gilbert  @xcite under the name _ prefix - synchronized codes_. prefix - synchronized codes have the property that every codeword starts with a prefix @xmath97 , which is followed by a constrained sequence @xmath98 .
moreover , for any codeword @xmath99 of length @xmath100 , the prefix @xmath101 _ does not appear _ as a substring of @xmath102 more precisely , the constrained sequences of prefix - synchronized codes avoid the pattern @xmath101 which is used as the address . due to the choice of mutually uncorrelated addresses at _ large hamming distance _
, we encode each information block by _ avoiding only one of the address sequences _ ,
used for that particular block . to explain how to perform encoding ,
assume that @xmath103 is a self - uncorrelated sequence .
this guarantees that @xmath104 without loss of generality , let @xmath105 and @xmath106 and define @xmath107 for all @xmath108 .
in addition , assume that the elements of @xmath109 are arranged in increasing order , say using the lexicographical ordering @xmath110 .
we subsequently use @xmath111 to denote the @xmath112-th smallest element in @xmath109 , for @xmath113 for example , if @xmath114 then @xmath115 and @xmath116    next , we define a sequence of integers @xmath117 that satisfies the following recursive formula @xmath118 for an integer @xmath119 and @xmath120 , let @xmath121 be a length-@xmath122 ternary representation of @xmath123 .
conversely , for each @xmath124 , let @xmath125 be the integer @xmath123 such that @xmath126 every integer @xmath127 can be mapped into a sequence of @xmath128 symbols @xmath129 via an encoding algorithm that consists of two parts : @xmath130 and @xmath131 .
algorithm @xmath130 calls @xmath131 and returns the concatenation of @xmath101 and @xmath131 .
the steps of the encoding procedure are listed in algorithm  1 , where @xmath132 , and where @xmath54 denotes the length of the sequence @xmath101 .
the decoding steps are described in the same chart .
@rrrrrrr & & & & & & & & & & & &    [ table : alg ]    the following theorems are proved in the supplementary information .
[ thm : encoding ] @xmath133 is a prefix - synchronized codeword .
[ thm : decoding ] [ thm : decodable]the algorithm outputs a uniquely decodable string , for any @xmath134    a simple example describing the encoding and decoding procedure for the short address string @xmath135 , which can easily be verified to be self - uncorrelated , is provided in the supplementary information .
the previously described @xmath130 algorithm imposes no limitations on the length of a prefix used for encoding .
this feature may lead to unwanted cross hybridization between address primers used for selection and the prefixes of addresses encoding the information .
one approach to mitigate this problem is to perturb long prefixes in the encoded information in a controlled manner . for
small - scale random access / rewriting experiments , the recommended approach is to first select all prefixes of length greater than some predefined threshold .
afterwards , the first and last quarter of the bases of these long prefixes are used unchanged while the central portion of the prefix string is cyclically shifted by half of its length .
for example , for the address primer @xmath136 , the suffix @xmath137 produced by @xmath130 maps to @xmath138 . the process of shifting applied to this string is illustrated below : @xmath139    for an arbitrary choice of the addresses , this scheme may not allow for unique decoding @xmath130 .
however , there exist simple conditions that can be checked to eliminate primers that do not allow this transform to be `` unique '' .
given the address primers created for our random access / rewriting experiments , we were able to uniquely map each modified prefix to its original prefix and therefore uniquely decode the readouts .
as a final remark , we would like to point out that prefix - synchronized coding also supports error - detection and limited error - correction .
error - correction is achieved by checking if each substring of the sequence represents a prefix or `` shifted '' prefix of the given address sequence and making proper changes when needed .
we described a new dna based storage architecture that enables accurate random access and cost - efficient rewriting .
the key component of our implementation is a new collection of coding schemes and the adaptation of random - access enabling codes from classical storage systems . in particular , we encoded information within blocks with unique addresses that are prohibited to appear anywhere else in the encoded information , thereby removing any undesirable cross - hybridization problems during the process of selection and amplification .
we also performed four access and rewriting experiments without readout errors , as confirmed by post - selection and rewriting sanger sequencing .
the current drawback of our scheme is high cost , as synthesizing long dna blocks is expensive .
cost considerations also limited the scope of our experiments and the size of the prototype , as we aimed to stay within a budget comparable to that used for other existing architectures . nevertheless , the benefits of random access and other unique features of the proposed system compensate for this high cost , which we predict will decrease rapidly in the very near future .
this work was partially supported by the strategic research initiative of university of illinois , urbana - champaign , and the nsf stc on science of information , purdue university . a provisional patent for rewritable
, random - access dna - based storage was filed with the university of illinois in november 2014 .
10 [ 1]#1 url@samestyle [ 2]#2 [ 2]l@#1=l@#1#2    c.  bancroft , t.  bowler , b.  bloom , and c.  t. clelland , `` long - term storage of information in dna . '' _ science ( new york , ny ) _ , vol .
293 , no . 5536 ,
pp . 17631765 , 2001 .
j.  davis , `` microvenus , '' _ art journal _ , vol .
55 , no .  1 , pp . 7074 , 1996 .
g.  m. church , y.  gao , and s.  kosuri , `` next - generation digital information storage in dna , '' _ science _ , vol .
6102 , pp . 16281628 , 2012 .
n.  goldman , p.  bertone , s.  chen , c.  dessimoz , e.  m. leproust , b.  sipos , and e.  birney , `` towards practical , high - capacity , low - maintenance information storage in synthesized dna , '' _ nature _ , 2013 .
r.  n. grass , r.  heckel , m.  puddu , d.  paunescu , and w.  j. stark , `` robust chemical preservation of digital information on dna in silica with error - correcting codes , '' _ angewandte chemie international edition _ , vol .
54 , no .  8 , pp . 25522555 , 2015 .    m.  g. ross , c.  russ , m.  costello , a.  hollinger , n.  j. lennon , r.  hegarty , c.  nusbaum , and d.  b. jaffe , `` characterizing and measuring bias in sequence data , '' _ genome biol _
14 , no .  5 , p. r51 , 2013 .
g.  d. cohen and s.  litsyn , `` dc - constrained error - correcting codes with small running digital sum , '' _ information theory , ieee transactions on _ , vol .
37 , no .  3 , pp .
949955 , 1991 .
m.  blaum , s.  litsyn , v.  buskens , and h.  c. van tilborg , `` error - correcting codes with bounded running digital sum , '' _ ieee transactions on information theory _ , vol .
39 , no .  1 , pp . 216227 , 1993 .
e.  gilbert , `` synchronization of binary messages , '' _ information theory , ire transactions on _ , vol .  6 , no .  4 , pp . 470477 , 1960 .
h.  packer , `` gblocks gene fragments , related decoded articles , '' 2014 .
a.  v. bryksin and i.  matsumura , `` overlap extension pcr cloning : a simple and reliable way to create recombinant plasmids , '' _ biotechniques _ , vol .
48 , no .  6 , p. 463
, 2010 .
s.  c. schuster , `` next - generation sequencing transforms today s biology , '' _ nature methods _ , vol .  5 , no .  1 , pp . 1618 , 2008 .
k.  a.  s. immink , _
codes for mass data storage systems_.1em plus 0.5em minus 0.4emshannon foundation publisher , 2004 .
h.  morita , a.  j. van wijngaarden , and a.  han  vinck , `` on the construction of maximal prefix - synchronized codes , '' _ information theory , ieee transactions on _ , vol .
42 , no .  6 , pp .
21582166 , 1996 .
o.  milenkovic and n.  kashyap , `` on the design of codes for dna computing , '' in _ coding and cryptography_.1em plus 0.5em minus 0.4em springer , 2006 , pp .
100119 .
rouillard , m.  zuker , and e.  gulari , `` oligoarray 2.0 : design of oligonucleotide probes for dna microarrays using a thermodynamic approach , '' _ nucleic acids research _ , vol .
31 , no .  12 , pp . 30573062 , 2003 .
l.  j. guibas and a.  m. odlyzko , `` maximal prefix - synchronized codes , '' _ siam journal on applied mathematics _ , vol .
35 , no .  2 ,
pp . 401418 , 1978 .
berman and m.  frer , `` approximating maximum independent set in bounded degree graphs . '' in _ soda _ , vol .  94 , 1994 , pp . 365371
.    r.  g. gallager , `` low - density parity - check codes , '' _ information theory , ire transactions on _ , vol .  8 , no .  1 , pp . 2128 , 1962 .
1 .   encoding wikipedia entries a working example ( section  [ sec : working ] ) .
2 .   proofs of theorems ( section  [ sec : proofs ] ) .
3 .   address sequences ( section  [ sec : addresses ] ) .
4 .   example of encoding and decoding procedure ( section  [ sec : encdec ] ) .
experimental synthesis , access and rewrite of dna storage sequences ( section  [ sec : experiments ] ) . 6 .
hybrid dna - based and classical storage ( section  [ sec : hybrid ] ) .
in this section we describe the data format used for encoding two files of size @xmath10 kb containing the introductory sections of wikipedia pages of six universities : berkeley , harvard , mit , princeton , stanford , and university of illinois urbana - champaign .
there were @xmath140 words in the text , out of which @xmath141 were distinct .
note that in our context , words are elements of the text separated by a space .
for example , university and university .
are counted as two different words , while urbana - champaign is counted as a single word .
these @xmath140 words were mapped to @xmath142 dna blocks of length @xmath12 bps , as we grouped six words into fragments , and combined @xmath15 fragments for prefix - synchronized encoding .
table [ tab:1_comp ] provides the word counts in the files and encoding lengths ( in bits ) of the of the outlined procedure .
assume that instead of using a prefix - synchronized code , we used classical ascii encoding without compression to encode the same wikipedia pages .
the total number of characters in the text equals @xmath143 , and each character is mapped to a binary string of length @xmath144 .
hence , one would need @xmath145 bits to represent the data , which is equivalent to @xmath146 dna blocks of length @xmath12 bps if we set aside two unique address flags for the blocks .
as one can see , prefix - synchronized codes offer an almost @xmath147-fold improvement in description length compared to ascii encoding .
this comes at the cost of storing a larger dictionary , as one encodes words rather than symbols of the alphabet . for the working example
, one would require roughly @xmath148-times larger dictionaries , as there are @xmath149 words with an average of @xmath150 symbols per word .
this increased in the dictionary is not a significant problem , as only one copy of the dictionary is ever needed .
bits / distinct symbol & # bits +   characters & @xmath151 & @xmath152 & @xmath153 & @xmath154 +   words & @xmath149 & @xmath141 & @xmath15 & @xmath155 +
_ proof of theorem [ thm : bounds]_. the proof consists of two parts .
first , we prove the upper bound on @xmath86 in lemma 1 , and then proceed to prove a lower bound in lemma 2 . recall that @xmath156 denotes the largest possible size for a set of mutually uncorrelated words of length @xmath54 .
* lemma 1 . *
[ lem : upper_bound ] _ let @xmath156 the largest set of distinct mutually uncorrelated sequences of length @xmath54 .
then @xmath157 _    _ proof : _ to prove the lemma , let us introduce some terminology .
let @xmath158 stand for the hamming distance between two words , and define the hamming ball of radius @xmath55 around a point @xmath159 in @xmath160 as @xmath161 furthermore , let @xmath162 denote the set of sequences correlated with @xmath159 that are also at most at hamming distance @xmath55 from @xmath159 .
we claim that for @xmath163 , one has @xmath164 to prove the result , assume without loss of generality that @xmath159 starts with the symbol @xmath165 , i.e. , @xmath166 .
next , consider two scenarios regarding the structure of @xmath166 :    * @xmath167 in this case , any word @xmath168 in @xmath169 that starts with @xmath170 or ends with @xmath165 is an element of @xmath171 + let @xmath172 and @xmath173 + clearly , @xmath174 and @xmath175 therefore , @xmath176 * @xmath177 in this case , any word @xmath168 in @xmath169 which starts or ends with @xmath165 is also an element of @xmath178 . using an argument similar to the one described for the previous scenario
, one can show that @xmath179 + moreover , it is straightforward to see that @xmath180    for any mutually uncorrelated set @xmath84 of size @xmath85 , we have @xmath181 , for @xmath182 this implies that @xmath183    at the same time , the previous claim suggests that @xmath184 therefore , @xmath185 , which completes the proof .
* lemma 2 . *
_ let @xmath156 the largest set of distinct mutually uncorrelated sequences of length @xmath54 .
then @xmath186 _    _ proof : _ for simplicity , assume that @xmath85 is even . given a mutually uncorrelated set @xmath187 with words of length @xmath54 and over the alphabet @xmath188 , partition @xmath84 into two arbitrary sets @xmath189 and @xmath190 of equal size , say @xmath191 and @xmath192 we argue that @xmath193 is a mutually uncorrelated set with words of length @xmath194 .    * first
, we show that the elements in @xmath53 are self - uncorrelated : for an arbitrary element @xmath195 , we have @xmath196 since the two sequences @xmath197 are mutually uncorrelated , one can easily verify that @xmath198 for @xmath199 moreover , since @xmath200 , it holds that @xmath201 this establishes the claim . *
next , we argue that any two distinct elements in @xmath53 are uncorrelated : for any two distinct elements @xmath202 and @xmath203 in @xmath53 , one can show that @xmath204 , for @xmath205 .
in addition , @xmath206 implies that @xmath207 this completes the proof .    as a result , given a mutually uncorrelated set @xmath208 , where @xmath209 one can construct another mutually uncorrelated set @xmath210 , where @xmath211 .
therefore , @xmath212 observing that for @xmath213 it is possible to construct the following set of @xmath15 mutually uncorrelated sequences @xmath214 establishes the base of a recursive procedure which gives @xmath215 note that this bound is constructive , and the concatenation procedure preserves normalized minimum hamming distances .
we now turn our attention to prefix - synchronized coding , and describe a number of results relevant for our subsequent discussion .
[ @xcite ] given a positive integer @xmath92 , chose the unique integer @xmath216 so that @xmath217 satisfies @xmath218 then , the maximal prefix - synchronized code of length @xmath92 has cardinality @xmath219 for a prefix of the form @xmath220 .    note that the above results indicate that codes avoiding one address sequence represent an exponentially large family of binary sequences .
we prove a similar result for the case of @xmath21-ary sequences that avoid a set of @xmath85 mutually uncorrelated sequences .
to establish the claim , we need the following definitions .
let @xmath221 be an integer sequence over a finite alphabet .
define the generating function of the sequence @xmath222    [ thm : generating ] suppose that @xmath84 is a set of mutually uncorrelated sequences of length @xmath54 over the alphabet @xmath223 .
let @xmath224 , with @xmath225 , be the number of strings of length @xmath92 over @xmath129 that do not contain substrings in @xmath208 . then @xmath226 where @xmath227 is the generating function of the sequence @xmath228 .
_ proof of theorem [ thm : generating]_. the result is a direct consequence of theorem 4.1 of  @xcite
. for @xmath229 let @xmath230 denote the number of strings of length @xmath54 over @xmath129 that contain no element of @xmath208 , except for a single copy of @xmath231 at the right - hand side of the string .
let @xmath232 be the generating function of @xmath230 .
then , we have the following system of equations that holds for the two sets of aforementioned functions : @xmath233 by using the fact that @xmath234 , for @xmath235 , and @xmath236 , for @xmath237 , one can show that @xmath238 the result follows by replacing ( [ eq:1 ] ) into the first line of ( [ eq:2 ] ) .
as the dominant pole of the generating function is close to @xmath21 , the number of sequences avoiding a set of mutually uncorrelated sequences grows roughly as @xmath239 .
_ proof of theorem [ thm : encoding]_. since @xmath101 is self - uncorrelated , we need to show that this string is not contained in the output of @xmath131 , where the output of @xmath131 equals @xmath240 for some input @xmath241 and @xmath242 .
consequently , if @xmath101 is a substring of the output of @xmath131 , then the last symbol of @xmath101 ( recall that we assumed this symbol to be @xmath243 ) has to appear in one of the following three positions :    * the symbol appears in @xmath244 for a unique @xmath245 in this case , there exists a suffix of @xmath101 appearing as a prefix of @xmath246 this contradicts our assumption that @xmath101 is self uncorrelated .
* the symbol appears in @xmath247 for a unique @xmath245 this contradicts our assumption that @xmath248 * the symbol appears in @xmath249 this contradicts our assumption that @xmath243 does not appear in @xmath250 .
therefore , the string @xmath101 does not appear as a substring in the output of @xmath251 , which completes the proof .
_ proof of theorem [ thm : decoding]_. it suffices to show that the output of @xmath131 is uniquely decodable .
we use induction arguments to establish this result . for the basis step , by the definition of the output of @xmath252 , it is straightforward to show that @xmath131 returns the encoding @xmath253 , which represents a one - to - one mapping from @xmath254 to @xmath255 whenever @xmath256 .
for the inductive step , we assume that the result is true for all @xmath257 , as well as for all @xmath258 , and show that it is consequently true for @xmath259 .    for @xmath259 ,
@xmath131 returns @xmath260 for some integer values @xmath261 and for some @xmath262 where @xmath263 therefore @xmath264 is uniquely decodable if and only if @xmath265 and @xmath266 are unique .
since sequences of the form @xmath267 are prefix - free one can uniquely identify both @xmath268 and @xmath269 moreover @xmath270 , hence by the induction hypothesis it follows that @xmath266 is also uniquely decodable from @xmath271 .
hence , @xmath264 can be uniquely decoded .
b1-forward & @xmath272 +   b1-reverse & @xmath273 +   gblock - b1-reverse & @xmath274 +   b1-su1-reverse & @xmath275 +   b1-sd1-forward & @xmath276 +   b2-forward & @xmath277 +   b2-reverse & @xmath278 +   gblock - b2-forward & @xmath279 +   b2-su1-reverse & @xmath280 +   b2-sd1-forward & @xmath281 +   b3-forward & @xmath282 +   b3-reverse & @xmath283 +   b3-su1-reverse & @xmath284 +   b3-su2-forward & @xmath285 +   b3-sd2-reverse & @xmath286 +   b3-sd2-forward & @xmath287 +
consider the following set of strings of length @xmath13 , @xmath288 with gc content equal to @xmath31 , i.e. , @xmath32 gc bases .
the sequences are mutually uncorrelated and at hamming distance exactly @xmath32 from each other .
the sequences do not exhibit secondary structures at room temperature , as verified by the mfold and vienna packages .
we used these addresses for a very small - scale , proof - of - concept random access / rewriting experiment of a @xmath21 kb file .    in the large scale random access / rewriting experiment described in section  [ sec : experiments ] , we used different address sequences for the two flanking ends of the @xmath12 bps blocks .
the sequences we synthesized include :    @xmath289    the pairs of sequences were used to flank the two ends of the data blocks .
only the addresses on the left were used for subsequent prefix - synchronized coding .
the sequences on the left - hand side of the pairing have `` interleaved '' @xmath290 and @xmath291 bases  for example , they all start with @xmath292 .
this ensures a gc balancing property for the prefixes of the addresses .
in this section , we illustrate the encoding and decoding procedure for the short address string @xmath135 , which can easily be verified to be self - uncorrelated .    more precisely , we explain how to compute a sequence of integers @xmath293 , described in the main body of the paper . as before , @xmath54 denotes the length of the address string , which in this case equals five .
one has @xmath294    the algorithm @xmath295 produces :    & 550=0g_5,7 + 550 & + & ( p,8,550)=(p,7,550 ) & + & 550=0g_5,6 + 550 & + & ( p,7,550)=(p,6,550 ) & + & 550=2g_5,5 + 0g_5,4 + 16 & + & ( p,6,550)=(p,4,16 ) , & + & 16=03 ^ 3 + 13 ^ 2 + 23 ^ 1 + 13 ^ 0 & + & ( p,4,16)= , & + & ( p,8,550)= & +    when running @xmath296 on the encoded output @xmath297 , the following steps are executed :    & ( p,)=0g_5,7 & + & + ( p , ) & + & ( p,)=0g_5,6 & + & + ( p , ) , & + & ( p,)=2g_5,5 + 0g_5,4 & + & + ( p , ) & + & ( p,)=16 & + & ( p , ) = 2g_5,5 + 16=550 &
a total of @xmath298 sequences of length @xmath12 bps each were designed to encode information retrieved from the berkeley , harvard , mit , princeton , stanford , and uiuc wikipedia page in 2014 . except for sequence # 4 , which was rejected due to the complexity of its secondary structure ,
all sequences were synthesized by idt ( integrated dna technologies ) .
in addition , @xmath298 corresponding address primers were synthesized by the same company .
the address sequences of the blocks are listed in section  [ sec : addresses ] .    as a proof of concept
, we performed a number of selection and editing experiments .
these include selecting individual blocks and rewriting one of its sections , selecting three blocks and rewriting three sections in each , two close to the flanking ends , and one in the middle .
the edits involved information about the budget of the institutions at a given year of operation .
detailed information about the original sequences and their rewritten forms is given in the following sections .
we denoted the blocks on which we performed selection and editing by b1 , b2 , and b3 .
the primers used for performing the edits in the blocks are listed in table  [ tab:2 ] .
note that two primers were synthesized for each rewrite , for the forward and reverse direction .
in addition , two different editing ( mutation ) techniques were used , gblock and overlap - extension ( oe ) pcr ; gblocks are double - stranded genomic fragments that are frequently used as primers , for gene construction or for mediated genome editing .
an illustration of editing via gblocks is shown in fig .
[ fig:2 ] . on the other hand ,
oe - pcr is a variant of pcr used for specific dna sequence editing via point mutations or splicing .
an illustration of the procedure is given in fig .
[ fig:2 ] . to demonstrate the plausibility of a cost efficient method for editing
, oe - pcr was used with general primers ( @xmath29 bps ) only .
for edits shorter than @xmath30 bps , the mutation sequences were designed as overhangs in primers .
then , the three pcr products were used as templates for the final pcr reaction involving the entire @xmath12 bps rewrite .
all @xmath298 linear @xmath12 bps fragments were mixed , and the mixture was used as a template for pcr amplification and selection of the b1 , b2 and b3 sequences . the results of selection are shown in fig [ fig:1 ] , where three banks of size @xmath12 bps are depicted .
these banks indicate that sequences of the correct length were isolated .
subsequent sequencing confirmed that the sequences were indeed the user requested b1 , b2 and b3 strands .
a summary of the experiments performed is provided in table  [ tab : summary ] .
sequence samples & length of the edited region ( in bps ) & selection accuracy / readout error percentage & description of editing method +   b1-m - gblock & @xmath28 & @xmath13 & @xmath299 & gblock method +   b1-m - pcr & @xmath28 & @xmath13 & @xmath299 & oe - pcr method +   b2-m - gblock & @xmath28 & @xmath300 & @xmath299 & gblock method +   b2-m - pcr & @xmath28 & @xmath300 & @xmath299 & oe - pcr method +   b3-m - gblock & @xmath28 & @xmath301 & @xmath299 & gblock method +   b3-m - pcr & @xmath28 & @xmath301 & @xmath299 & oe - pcr method +    a ) schematic depiction of the editing method using gblocks .
b ) detailed description of the generation of the mutation .
four sequences ( ranging in length from @xmath302 to @xmath303 bps ) containing the entire edit region were gblock synthesized from idt .
the remaining parts of the @xmath12 bps sequences were pcr amplified .
a homology in at least 30 bps between the flanking end sequence of the blocks and the corresponding end of the gblock fragment was created . by one oe - pcr
, the desired edits were generated in a one - pot matter . ]
the unedited b1_original ( b1 ) sequence is of the form : @xmath304 where the bases written in red represent the regions we edited .
pcr of 1000 bps sequences - b1 , b2 , b3 from a mixture of 26 sequences . ]    the edited b1_mutation ( b1_m ) sequence reads as : @xmath305 with rewrites listed in red .      since a gblock of length longer than @xmath306 bps was needed , it was more costly to synthesize the gblock and perform rewriting than to directly re - synthesizing the whole block .
hence , the gblock method was not used in this case .
illustration of the process of generating the b1 edit / mutation using general primers . ]
one pair of primers was designed to pcr amplify the first portion of the sequence b1-m . for the forward direction ,
the primer was @xmath307 while for the reverse direction , the primer was @xmath308 the second part of the sequence was pcr amplified by using the forward direction primer @xmath309 and reverse direction primer @xmath310    both pcr reactions used the sequence b1 as template .
two such pcr products are shown in fig .
[ fig:4 ] , indicating that the correct length products were isolated in each reaction .
oe - pcr was performed in a @xmath311 ul reaction volume containing the two aforementioned pcr products without primers for the first @xmath28 cycles and the products with primers ( b1 primers in table  [ tab:2 ] ) for the later @xmath312 cycles .
a single bank with correct size of @xmath12 bps was obtained ( see fig .
[ fig:4 ] ) .      the unedited b2_original ( b2 )
sequence is of the form : @xmath313    a schematic depiction of the process of generating the b2 mutation using standard 60 bps primers . ]
the edited b2_mutation ( b2_m ) sequence is : @xmath314 where , as before , red letters were used to indicate the rewritten region .      a @xmath302 bps sequence , containing the entire edited region and the b2 string , was gblock synthesized by idt .
another part of b2 was pcr amplified using the forward primer @xmath315 and reverse primer @xmath316 the b2 sequence served as a template .
see fig .
[ fig:4 ] for an illustration .      over extension pcr ( oe - pcr ) was performed in a @xmath311 ul reaction volume containing the above @xmath302 bps gblock product and pcr products without primers for the first @xmath28 cycles and with b2 forward and reverse primers listed in table [ tab:2 ] for the subsequent @xmath312 cycles .
the pcr product was deposited on a gel substrate and the correct @xmath12 bps band was obtained as shown in fig .
[ fig:5 ] .
one pair of primers was designed to pcr amplify the first part of the sequence b2-m , with forward primer @xmath317 and reverse primer @xmath318 the second part was pcr amplified by the forward primer @xmath319 and reverse primer @xmath320 both pcrs used b2 as a template .
two pcr products are shown in fig .
[ fig:5 ] .
pcr products of b1 and b2 . ]    pcr products of b3 . ]
the unedited original b3 sequence equals : @xmath321    scheme for generating the b3 edits using standard 60 bps primers . ]
the edited sequence b3_m mutation sequence is : @xmath322      two sequences , the @xmath323 bps sequence containing the first mutation region and the second @xmath323 bps sequence containing the second mutation region , were gblock synthesized by idt .
there was a @xmath324 bps overlap between the two gblocks .
oe - pcr was performed in a @xmath311 ul reaction volume containing the above two @xmath323 bps gblock products without primers for the first @xmath28 cycles and additional b3 forward and reverse primers listed in table [ tab:2 ] for the subsequent @xmath312 cycles .
the pcr product was deposited on a gel substrate and the correct @xmath12 bps band was obtained .
one pair of primers was designed to pcr amplify the first part of the sequence b2-m , using @xmath325 in the forward direction and @xmath326 in the reverse direction .
the second part was pcr amplified in the forward direction by using the primer @xmath327 and in the reverse direction by using the primer @xmath328 the third part was pcr amplified by the forward direction primer @xmath329 and reverse direction primer @xmath330 all three pcrs used the sequence b3 as the template .
all three pcr products are shown in fig .
[ fig:8 ] .
oe - pcr was performed in a @xmath311 ul reaction volume containing the above three pcr products without primers for the first @xmath28 cycles and with b3 primers listed in table [ tab:2 ] for the subsequent @xmath312 cycles .
a single bank of correct size @xmath12 bps was obtained ( see fig .
[ fig:9 ] ) .
the generated pcr products of @xmath12 bps edits from the gblock method , involving b1-gblock , b2-gblock and b3-gblock . ]    the generated pcr products of 1000bps sequence editing for the oe - pcr based method , and sequences b1-pcr , b2-pcr and b3-pcr .
]    correctness of the synthesized edited regions was confirmed via dna sanger sequencing as follows .
the pcr products of the gblock method and the oe - pcr method were named b1-m - gblock , b2-m - gblock , b3-m - gblock and b1-m - pcr , b2-m - pcr , b3-m - pcr , respectively .
all final mutations / edits of pcr products were purified using the qiagen gel purification kit .
the purified @xmath12 bps edited sequences were blunt - ligated to the vector named @xmath331-blunt ( fig .
[ fig:10 ] ) using the zero blunt pcr cloning kit and following the manufacturers protocol .
five colonies of each pcr - blunt - mutation were sent to actg , int .
sequencing was performed using two universal primers : m13f_20 ( for the reverse direction ) and m13r ( for the forward direction ) .
bi - directional sequencing was performed in order to ensure that the entire @xmath12 bps block was completely covered .
map and features of pcr - blunt vector ( life technologies ) . ]
in our small - scale experiments , sanger sequencing produced two erroneous symbols in one strand which we were able to correct using prefix matching .
one possible problem that may arise in large scale dna - storage systems involving millions of blocks is erroneous sequencing which may not be corrected via prefix matching . in current high throughput sequencing technologies , such as illumina hiseq or miseq , the dominant sources of errors are substitutions . due to our word grouping scheme
, such substitution errors can not cause catastrophic error propagation , but may nevertheless accumulate as the number of rewrite cycles increases . in this case
, prefix matching may not suffice to correct the errors and more sophisticated coding schemes need to be used .
unfortunately , adding additional parity - check symbols into the prefix - encoded data stream may cause problems as the parities may violate the prefix properties and dis - balance the gc content . furthermore , every time rewriting is performed , the parity - checks will need to be updated , which incurs additional cost for maintaining the system .
a simple solution to this problem is a hybrid scheme , in which the bulk of the information is stored in dna media , while only parity - checks are stored on a classical device , such as flash memory .
given that the current error - rate of short - read sequencing technologies roughly equals @xmath332 , the most suitable codes for performing this type of coding are low - density parity - check codes  @xcite .
these codes offer excellent performance in the presence of a large number of errors and are decodable in linear time .