How to Open and View DNA Files Online
Most searches for a DNA file viewer end up on plasmid software, which is the wrong tool unless you are doing molecular cloning. If you have personal genomic data, you have one of five file types, and each has a different right answer. For a 23andMe or Ancestry text export, a spreadsheet or a short Python script is enough. For a VCF of variant calls, use bcftools at the command line and IGV for visual inspection. For a BAM or CRAM of aligned reads, use IGV Desktop locally, because the file is too large to upload anywhere. For a Sanger .ab1 trace, use a chromatogram viewer such as SnapGene Viewer, which is free for viewing. For raw FASTQ, there is nothing useful to view: you align it first.
Below is how to tell which file you have, what to open it with, and the specific ways these files break.
Identify the file before choosing a viewer
The extension usually tells you, but not always, because vendors rename things. Check the first few lines instead. For a text-based file, head -5 yourfile answers the question immediately.
A consumer array export begins with comment lines starting with # and then tab-separated columns. The columns are rsid, chromosome, position, and genotype. It contains roughly 600,000 to 900,000 genotyped positions and is around 15 to 25 MB uncompressed. A VCF begins with ##fileformat=VCFv4.2 and a block of header lines. A single-sample whole-genome VCF holds roughly 4 to 5 million variants. A BAM is gzip-compressed binary, so head produces garbage. Use samtools view -H yourfile.bam to print the header. A CRAM header starts with the literal bytes CRAM. FASTQ files, usually .fastq.gz, have four lines per read starting with @.
Size is the other signal. A 30x whole-genome BAM is typically 80 to 120 GB. The same data as CRAM is roughly a third of that. Paired FASTQ files land in a similar range to BAM. These sizes are why the phrase “online viewer” breaks down for read-level data, and why most practical workflows keep the reads on local disk and stream only small regions 1.
Variant calls: VCF
The VCF is the file you will spend the most time with, because it is where the interpretable information lives. Every variant is one row with the fields below.
- the chromosome
- position
- reference allele
- alternate allele
- a quality score
- a filter status
- per-sample genotype fields
Get it indexed first. An index is what lets a tool jump to one gene instead of reading 1.5 GB of text.
bgzip -c sample.vcf > sample.vcf.gz # bgzip, not gzip
tabix -p vcf sample.vcf.gz
bcftools index --tbi sample.vcf.gz # equivalent
Then query regions and fields directly:
# all variants in a gene interval on GRCh38
bcftools view -r chr7:117479963-117668665 sample.vcf.gz | less -S
# passing, non-reference genotypes only, printed as a table
bcftools view -f PASS -g het,hom sample.vcf.gz \
| bcftools query -f '%CHROM\t%POS\t%REF\t%ALT\t%QUAL[\t%GT\t%DP]\n'
We prefer bcftools over any web viewer for VCFs. It is fast, scriptable, and does not require moving your genome to someone else’s server. The one field to watch is DP, the read depth at that site. Genotypes called from fewer than about 10 reads are noticeably less reliable, and heterozygous calls suffer first, since one of the two alleles can simply be missed by chance 2.
For a visual view, the UCSC Genome Browser accepts a VCF as a custom track. It renders the track against gene models, conservation, and regulatory annotation 3. Upload only a filtered subset, never the whole file.
Aligned reads: BAM and CRAM
When a variant call looks surprising, the way to check it is to look at the reads underneath it. IGV Desktop is the tool we use. It is free, runs locally, and memory-maps the index so it opens a 100 GB BAM in a second.
The index must sit next to the file, named sample.bam.bai. If it is missing:
samtools index -@ 4 sample.bam
CRAM adds one requirement: the reference FASTA used at alignment time. CRAM stores bases as differences from that reference, so the wrong reference produces silently wrong sequence. Point samtools at it explicitly.
samtools view -T GRCh38_full_analysis_set_plus_decoy_hla.fa \
sample.cram chr7:117559590-117559620
There is a browser version at igv.org/app that reads files from your local disk through the browser file API without uploading them. It works well for BAM plus BAI up to a few tens of gigabytes. For hosted data, IGV and similar genome browsers can stream byte ranges over HTTP, which is the same principle that lets a shared browser instance serve read-level data to collaborators without shipping whole files 4.
If you only need the sequence around a set of positions rather than a picture, SeqTailor extracts DNA or protein sequence windows around variants from next-generation sequencing data through a web interface, which saves writing a one-off script 5.
Array exports and Sanger traces
A 23andMe or Ancestry text file is small enough that pandas is the entire toolchain.
import pandas as pd
df = pd.read_csv("genome.txt", sep="\t", comment="#",
names=["rsid", "chrom", "pos", "genotype"], dtype=str)
Two cautions. These exports are on GRCh37 coordinates in most vendor versions, so positions will not match a GRCh38 VCF without liftover. And genotypes are reported on the plus strand of the reference, which does not always match the strand convention used in the literature for a given rsID. Check the strand before comparing to a published allele.
Sanger .ab1 files are a different category: four-channel fluorescence traces from a capillary sequencer, one file per reaction, covering 700 to 900 bases. SnapGene Viewer opens them free of charge and shows the chromatogram with called bases. Overlapping peaks at a position usually mean a heterozygous site or a mixed template.
The failure modes that cost the most time
Contig naming is the most common. A file using chr1 will silently return nothing when queried as 1. Check with samtools view -H or bcftools view -h and rename with bcftools annotate --rename-chrs.
Genome build mismatch is the most dangerous, because it fails quietly. GRCh37 and GRCh38 coordinates differ by hundreds to millions of bases depending on the chromosome. A position looked up in the wrong build lands in the wrong place and still returns a plausible-looking base. Record the build for every file you keep.
Compression matters: tabix requires bgzip, which writes a block-gzip stream. A file compressed with plain gzip will open fine in zcat and refuse to index.
Finally, coverage and sample source shape what you can trust. Repetitive regions, segmental duplications, and long homopolymers are where short-read calls go wrong. No viewer will flag that for you 6. Saliva-derived DNA also carries bacterial content and behaves differently from blood-derived DNA in variant detection 7. For structural and copy-number variation, reference databases built for that purpose are a better comparison point than a variant browser 8.
Viewing your data is measurement. Deciding what a variant means for your health is a clinical judgment, and it requires a clinician plus confirmation in an accredited laboratory.
Questions people also ask
How do I open DNA files? Match the tool to the format. Use a text editor or pandas for array exports, bcftools and IGV for VCF, and IGV Desktop and samtools for BAM and CRAM. For .ab1, use a chromatogram viewer. FASTQ needs alignment before it is viewable.
What is the best free software for DNA analysis? For personal genome data, the combination of samtools, bcftools, and IGV covers nearly everything, and all three are free and open source. Add the UCSC Genome Browser for annotation context around a region of interest 3.
Is SnapGene Viewer free? Yes. The viewer opens .dna, GenBank, FASTA, and .ab1 trace files at no cost, and the paid version adds cloning simulation and editing. It is built for plasmids and Sanger reads. It is not built for human whole-genome files.
Is there a free DNA database available? Several. The UCSC Genome Browser hosts reference assemblies and annotation tracks you can query or download 3. Specialized compendia exist for narrower questions, such as the Allen Ancient DNA Resource for published ancient human genomes 9.
Can I view a BAM file online without uploading it? Yes, with igv.org/app, which reads the BAM and its index from local disk in the browser. Nothing leaves your machine, and the practical limit is your own memory and disk speed.
Footnotes
-
Rachel L Goldfeder, Dennis P Wall, Muin J Khoury, et al. Human Genome Sequencing at the Population Scale: A Primer on High-Throughput DNA Sequencing and Analysis. American Journal of Epidemiology, 2017. https://doi.org/10.1093/aje/kww224 ↩
-
André Altmann, Peter Weber, Daniel Bader, et al. A beginners guide to SNP calling from high-throughput DNA-sequencing data. Human Genetics, 2012. https://doi.org/10.1007/s00439-012-1213-z ↩
-
W. J. Kent. The Human Genome Browser at UCSC. Genome Research, 2002. https://doi.org/10.1101/gr.229102 ↩ ↩2 ↩3
-
L. D. Stein. Using GBrowse 2.0 to visualize and share next-generation sequence data. Briefings in Bioinformatics, 2013. https://doi.org/10.1093/bib/bbt001 ↩
-
Peng Zhang, Bertrand Boisson, Peter D Stenson, et al. SeqTailor: a user-friendly webserver for the extraction of DNA or protein sequences from next-generation sequencing data. Nucleic Acids Research, 2019. https://doi.org/10.1093/nar/gkz326 ↩
-
D. C. Koboldt, L. Ding, E. R. Mardis, et al. Challenges of sequencing human genomes. Briefings in Bioinformatics, 2010. https://doi.org/10.1093/bib/bbq016 ↩
-
Brett Trost, Susan Walker, Syed A Haider, et al. Impact of DNA source on genetic variant detection from human whole-genome sequencing data. Journal of Medical Genetics, 2019. https://doi.org/10.1136/jmedgenet-2019-106281 ↩
-
J. Zhang, L. Feuk, G.E. Duggan, et al. Development of bioinformatics resources for display and analysis of copy number and other structural variants in the human genome. Cytogenetic and Genome Research, 2006. https://doi.org/10.1159/000095916 ↩
-
Swapan Mallick, Adam Micco, Matthew Mah, et al. The Allen Ancient DNA Resource (AADR) a curated compendium of ancient human genomes. Scientific Data, 2024. https://doi.org/10.1038/s41597-024-03031-7 ↩
Pothos builds longitudinal molecular profiles of individuals: whole-genome sequencing, single-cell RNA sequencing, and plasma proteomics, delivered as a detailed report, every data file, and stored cells. Build your profile.