Skip to content

An association scan

You have a table from an association tool: PLINK, PLINK 2, REGENIE, SAIGE, GEMMA, BOLT-LMM or the GWAS Catalog.

karyon 1 gwas.assoc --threshold genome-wide -o scan.svg

A scan along chromosome 1, flat except for one peak whose markers rise above the dashed line at p = 5e-8 The same figure on the dark page

The place, 1, is the chromosome as the table names it. Each marker is as high as -log10 of its p-value, and the dashed line is p = 5e-8.

Change it

To Write
Zoom into the peak 1:700,000-820,000 in place of 1
Draw the line elsewhere --threshold 1e-5
Add the genes under the peak NC_000962.3:700,000-820,000 gwas.assoc --threshold genome-wide genes.gff3 --rename 1=NC_000962.3

--rename is for a table that names the chromosome 1 where the annotation calls it NC_000962.3.

Every chromosome at once

With no place, the table is drawn across every chromosome it names, end to end, in the order they are counted, each named under the scan:

karyon trait.assoc --threshold genome-wide -o genome.svg

A scan across twelve chromosomes in alternating shades, each named under it, flat except for two towers, on chromosomes 3 and 9, that rise above the dashed line at p = 5e-8 The same figure on the dark page

Each chromosome is as long as its furthest marker, since a table says where its markers are and not how long the chromosomes run, and the shades alternate so a tower is read against the chromosome it stands on. Name one to draw it alone, as karyon 3 trait.assoc. A depth, windows or a segment table named beside the scan is laid over the same chromosomes, as karyon trait.assoc tumour.bedgraph, with the files of a whole sequence.

Colour a peak by linkage

Zoomed into the peak, each marker coloured by its linkage with the strongest, as LocusZoom draws one, with the recombination rate laid over it:

karyon 1:661,000-861,000 gwas.assoc --ld lead.ld --threshold genome-wide \
  --with-recombination genetic_map.txt -o locus.svg

The markers of the peak coloured by their r-squared with the strongest in five bins, navy and light blue at the edges, green and orange up the sides and red at the top, the strongest a purple diamond labelled with its name, three at the far end that the linkage file has no r-squared for drawn grey, and behind them a recombination rate with two hotspots, read off a scale on the right The same figure on the dark page

lead.ld is PLINK's linkage of the lead with its neighbours, as plink --r2 --ld-snp snp00342 --ld-window-kb 100 --ld-window 99999 --ld-window-r2 0 writes it, and the lead is called by the name the scan gives it. The r² are LocusZoom's five bins in its colours, under 0.2 navy to 0.8 and over red, keyed under the scan with the lead's purple diamond. genetic_map.txt is a genetic map as HapMap writes one, laid over the scan by --with-recombination and read off the scale on the right; named on its own, it is drawn as a track of its own under the scan instead. A window that lies inside one interval of the map is drawn at that interval's one rate, flat from edge to edge, and karyon says so under the track, on the figure, and on standard error, since a flat line reads as a rate measured flat; a map of another sequence read under a --rename draws one too.

The example files: gwas.assoc, trait.assoc, lead.ld and genetic_map.txt. Every option: karyon help manhattan, or the command line reference.