At its core, digital DNA is surprisingly low-tech. A genome is written down as a long string of four ordinary letters, the same characters you could type on a phone. But the letters alone aren’t enough, because each one comes with the sequencing machine’s own rating of how likely it is to be wrong.1Wikipedia. Phred quality score The same idea works in reverse, which is why researchers can now write movies and software into actual DNA molecules.2PubMed. DNA Fountain enables a robust and efficient storage architecture
From Molecule to Letters
DNA is a chain of four chemical units called bases: adenine, cytosine, guanine and thymine, shortened to A, C, G and T. So any stretch of DNA can be written as a string of those four letters. A human genome is about 3 billion letters long, inherited as two copies, one from each parent. Machines can’t read a whole chromosome in one go, so they read millions of short fragments called reads.
Before any letter exists, the machine has only physical signals. Illumina-style machines copy each fragment many times in place, then add labeled chemical building blocks one position at a time, photographing the glow after each step. Each of the four letters is tagged to produce a distinguishable signal, and software turns the pattern of signals at each spot into one letter call. A messy or ambiguous signal at a spot is what later leads to a low confidence score.
What a Raw DNA File Looks Like
The standard file of sequenced DNA is called FASTQ. Each read is stored as a four-line text record:
- Line 1: starts with ‘@’ and holds a name for the read, plus any free-form notes.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
- Line 2: holds the DNA letters themselves, usually in capitals.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
- Line 3: is a ‘+’ sign marking where the letters end.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
- Line 4: is a string of keyboard symbols, one per letter, giving the confidence for each.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
That last line is what makes a FASTQ file more than a list of letters. It must be exactly as long as the letter line, with one score per letter.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants Each score is a quality score, a rating of how likely that letter was misread.1Wikipedia. Phred quality score A score of 30 means about a 1 in 1,000 chance the letter is wrong.1Wikipedia. Phred quality score The scale is stepped, so every 10 points means a tenfold lower chance of error: 20 is 1 in 100, and 40 is 1 in 10,000. To save space, each number is stored as a single printable character, such as a letter or punctuation mark.3PubMed Central. The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants The confidence line looks like random punctuation such as #, I and F, while an N in the letter line means the machine couldn’t decide.
Each symbol stands for a number through a fixed table: its position in the standard keyboard character order, minus an offset. The offset is usually 33 in modern files, so ‘!’ means 0 and ‘I’ means 40. Older files used a different offset, so software needs to know which version it is reading or the confidence values come out wrong.
These scores matter to results. Low-confidence letters can look like real genetic differences if they aren’t filtered, so software discards or down-weights doubtful letters before drawing conclusions.
FASTQ grew out of an older format, FASTA, that held only the letters.4PubMed Central. Standardization and quality management in next-generation sequencing No official body ever declared FASTQ a standard. It became one because nearly every machine and lab accepted it.4PubMed Central. Standardization and quality management in next-generation sequencing
Placing Reads on a Map of the Genome
A reference genome is a standard, agreed-upon human genome sequence used as a shared coordinate system. So each read can be described as matching at a numbered position on a given chromosome. These placements are stored in the SAM format, built for both short and very long reads from different machines.5PubMed Central. The Sequence Alignment/Map format and SAMtools SAM is compact and lets software jump straight to any region, and it was used to release data from the 1000 Genomes Project.5PubMed Central. The Sequence Alignment/Map format and SAMtools
Each read gets one line of tab-separated text fields, so SAM is still readable in a text viewer. The line gives the read’s name, the chromosome it matched, and the starting position on that chromosome. It also includes a mapping quality, a separate confidence that the read was placed in the right spot, which is different from the confidence in each letter. The read’s letters and per-letter scores are carried along too, so the original information isn’t lost.
A read rarely lines up perfectly, so SAM includes a compact code called a CIGAR string that describes the alignment. It strings together counts and operations in order along the read, such as “100 letters aligned” or “2 letters deleted.” Software can then see where a read has extra or missing letters compared with the reference without rereading the sequence.
Genes and other features are stored separately, as intervals. Annotation files mark where genes start and end on the map, and a gene is a chromosome name plus start and end positions. Software finds what a read overlaps by comparing those positions.
The same files now carry chemical tags on DNA. Letters can carry small chemical add-ons, such as methylation, that help switch genes on or off. SAM files can list these as edits to the original letters, each with its own confidence score.6PubMed Central. Sequence Alignment/Map Optional Fields Specification Both major long-read machine makers, Oxford Nanopore and PacBio, now include this information in their output files.7bioRxiv. Base modification analysis in long-read sequencing data using minimod
Recording Only the Differences
Any two people share roughly 99.9% of their DNA letters. Storing only the differences is therefore far smaller than storing everything. The variant call format, VCF, is the standard file for sharing these differences.8PubMed Central. Analysis-ready VCF at Biobank scale using Zarr
Each line of a VCF answers the same eight questions:
- Chromosome: which one the difference is on.9PubMed Central. The variant call format and VCFtools
- Position: The position, counted from 1.9PubMed Central. The variant call format and VCFtools
- ID: an ID, if the variant is already known.9PubMed Central. The variant call format and VCFtools
- Reference: the reference letter or letters.9PubMed Central. The variant call format and VCFtools
- Alternative: the alternative letters this person has.9PubMed Central. The variant call format and VCFtools
- Score: a confidence score on the same stepped scale as FASTQ.9PubMed Central. The variant call format and VCFtools
- Filter: whether it passed quality filters.9PubMed Central. The variant call format and VCFtools
- Info: extra notes in a flexible field.9PubMed Central. The variant call format and VCFtools
A typical line might read chromosome 7, position 117,559,590, reference G, alternative A. A consumer DNA report is ultimately built from lines like this. Each line also notes whether the person carries one copy or two.
The lines can describe different kinds of changes. A single-letter swap is one reference letter and one alternative letter, such as G and A. An insertion or deletion uses several letters, with the reference and alternative differing in length. The lines stay in a fixed order by chromosome and position, so software can scan or search them efficiently.
A single reference has blind spots. Some highly varied regions, such as immune-system genes, can’t be described well against one reference.10PubMed Central. The design and construction of reference pangenome graphs with minigraph Newer pangenome references store many people’s genomes together as a branching graph.11PubMed Central. Pangenome graph construction from genome alignments with Minigraph-Cactus Variation once ignored can then be given proper coordinates.10PubMed Central. The design and construction of reference pangenome graphs with minigraph
Why DNA Files Get So Big and How They Shrink
Each letter is read many times, often around 30 times for a human genome, to catch errors. With about 3 billion letters, that is roughly 90 billion letters of raw data. Each letter also carries a score character, so the file roughly doubles before any compression. Heavily overlapping reads repeat the same information, which is useful for accuracy but costly for storage. One genome’s raw FASTQ files commonly run to tens or hundreds of gigabytes.
Confidence scores are the bulky part: they can take up to 80% of a compressed file.12PubMed Central. Performance evaluation of lossy quality compression algorithms for RNA-seq data Letters follow patterns, since reads overlap the same genome and repeated stretches recur, and compressors exploit that. Scores are closer to noise, because each comes from the physical measurement at that spot and varies from letter to letter. With little pattern to find, they stay large even after compression.
The letters themselves can be compressed below two bits each.13Genome Informatics. Biological Sequence Compression Algorithms Simplifying scores saves more. Lossy compression, which rounds scores into a few coarse levels, cut RNA data a further 1.2 to 3 times compared with exact compression in some cases.12PubMed Central. Performance evaluation of lossy quality compression algorithms for RNA-seq data Some detail is permanently lost, but the letters stay exact.
Massive studies strain even this. Biobanks hold hundreds of thousands of genomes, and text-based variant files become slow at that scale. Newer chunked formats let computers load only the parts they need.8PubMed Central. Analysis-ready VCF at Biobank scale using Zarr
Storing Computer Files in Real DNA
The trip can run in reverse: ordinary digital files can be written into DNA. Software converts computer bits into DNA letters in a way that allows recovery despite errors.14IEEE Transactions on Molecular, Biological, and Multi-Scale Communications. Survey for a Decade of Coding for DNA Storage In one demonstration, a full operating system, a movie and other files, about 2.14 megabytes total, were stored in DNA and recovered perfectly.2PubMed. DNA Fountain enables a robust and efficient storage architecture Error-correcting codes, the same family used on CDs and QR codes, repair misread letters and missing fragments.15PubMed Central. Efficient DNA-based data storage using shortmer combinatorial encoding
Turning bits into letters starts simply. Four letters can each carry two bits, so a basic scheme maps the pairs 00, 01, 10 and 11 to A, C, G and T. Real schemes add rules, such as avoiding long runs of the same letter, because those are harder to write and read accurately. The data is also split into many short pieces, because synthesis machines make only short strands, and each piece carries an address so the order can be restored.
To write, a synthesis machine builds each strand by adding one chemical letter at a time in the order the software specifies. The result is a pool of many short strands, often with many copies of each. The pool can be dried and kept in a small tube, which is the actual data storage.
To read, the pool goes through an ordinary DNA sequencer, the same kind of machine used for genomes. The sequencer produces reads, and software uses the addresses to sort the pieces and put them in order. Because there are many copies of each strand, the software can compare reads and vote on the correct letter. Letters can be miswritten during synthesis or misread during sequencing, and whole fragments can go missing, which is why the error-correcting codes matter.
The appeal is density and longevity. DNA packs enormous amounts of data into tiny volume, and kept dry and cool it lasts thousands of years. Writing and reading are still slow and costly, so it suits archives rather than daily use.
Keeping Digital DNA Private
The international genomics alliance GA4GH writes common formats and tools for sharing genetic data.16PubMed Central. International federation of genomic medicine databases using GA4GH standards With them, a single search can run across many independent databases at once, each deciding how much it reveals.16PubMed Central. International federation of genomic medicine databases using GA4GH standards A researcher can ask, for example, whether any database holds a particular variant. One database might answer only yes or no, another give a count, another nothing without approval. The underlying files stay where they are, which reduces the number of copies that could leak.
Analysis can also run where the data lives, avoiding transfers across countries.17PubMed Central. GA4GH: International policies and standards for data sharing across genomic research and healthcare The researcher sends software to the place where the data is stored, and only the results come back. That helps with laws restricting the movement of genetic data across borders, and it means fewer people hold a full copy of a person’s genome.
Encryption helps, but isn’t total protection. Encrypted methods can test whether two DNA profiles are related without revealing who they belong to.18PubMed Central. Privacy Challenges and Research Opportunities for Genomic Data Sharing Still, a genome is hard to anonymize. It is unique to a person, apart from identical twins, so removing the name doesn’t remove the identifier. Relatives share large parts of it, so one person’s data can reveal something about family members who never agreed to share. That is why shared genetic data is usually handled with access controls rather than simply stripped of names.
If you’ve had a consumer test, the raw download is usually a plain text file of letters at known positions. Anyone with the file can read it, so store it like a medical record. You can also ask the company whether your data is shared with researchers and how to opt out.

