Anatomy of a Raw DNA File - Reading It Line by Line
Open your raw DNA export and understand every column - rsid, chromosome, position, and genotype - plus the odd values like no calls and indels.
Your raw DNA file looks intimidating at first: hundreds of thousands of rows of letters and numbers. It is actually simple once you know what each column means. Here is a line by line tour of a typical text export.
The comment header
Most files open with metadata lines that begin with a #. They record who generated the file, the reference genome build, and often a description of the columns.
# This data file generated by a testing service
# build 37
# rsid chromosome position genotype Tools skip these lines when parsing. But one of them usually names the columns, so it is worth reading before you assume anything about the layout.
The four core columns
After the header, each row describes one position in your genome:
rs4477212 1 82154 AA - rsid - a stable public identifier for the variant, like
rs4477212. You can look this up in reference databases to learn what is known about it. - chromosome - which chromosome the variant sits on, from
1to22, plusX,Y, andMTfor mitochondrial DNA. - position - the coordinate along that chromosome, counted in base pairs. This number only makes sense against a specific genome build.
- genotype - the two letters you inherited at that spot, one from each parent, such as
AA,AG, orGG.
Some services split the genotype into two columns, allele1 and allele2, instead of a single AA field. Same information, slightly different shape.
Why the build matters
That position number is meaningless without knowing the reference build. Older exports use GRCh37, also called hg19. Newer ones use GRCh38. The same variant can have different coordinates in each. If you ever compare positions across files or tools, confirm both use the same build first.
The strange values
Not every row is a tidy pair of letters. You will run into:
--or00- a no call, meaning the test could not read that position reliablyII,DD, orDI- insertions and deletions, where DNA was added or removed rather than swapped- Single letters on the
X,Y, orMTchromosomes, since those are not always present in pairs
These are normal. Good analysis tools simply skip rows they cannot interpret rather than failing on them.
Looking up a single row
You do not need special software to inspect your file. A plain text search works:
grep '^rs4477212' my_raw_dna.txt If a line comes back, you will see your genotype at that position. If nothing appears, that variant is not in your file - consumer tests only report a curated subset of positions, not your whole genome.
From rows to meaning
A single row rarely means much on its own. Traits and ancestry signals emerge from many positions read together, and the letters you see depend on which DNA strand the service reported. That strand detail trips up a lot of people, so it is worth understanding next in our guide to forward and reverse strand. For a gentler primer on the variants themselves, see what are SNPs.
When you are ready to turn these rows into readable results, you can do it privately with on device DNA analysis - your file never leaves your browser.
This article is educational and is not medical advice.