Create map of allele

Creating a map of allele distribution in Finland

From Sandbox v10.3 onwards the Map of allele distribution in Finland is provided automatically within Genotype Browser's Interactive Filters view. It can also be loaded on a separate internet browser page in Sandbox.

Alternatively, you can also use ready-made R code by Sini Kerminen (developer of Changes in Genetic Ancestry within Finland during 1900s) to produce the Map of Allele with R/RStudio. Drawing the map in R/RStudio will allow you to change colors and make other modifications. To draw the map with R/RStudio follow the steps below.

Due to the population history of Finland, alleles often have a unique distribution, e.g. this LGR5 variant is more common in Ostrobothnia.

Generating a map

Step 1:

Search for your variant in the Genotype Browser (imputed or raw data is fine)

Step 2:

Save all the genotypes to a file (it will appear in your Downloads folder, /home/ivm/Downloads)

Step 3:

The filenames from GenotypeBrowser have a lot of information in them and are very long, so it is best to rename the file to the rsID you are looking at, e.g. rs1305153461.tsv

Step 4:

Copy the map code and accessory files to your IVM from the shared directory: /finngen/shared/map_of_alleles/20210531_194847/

Step 5:

In RStudio, open the file Plot_map_example.R

Step 6:

Edit the path to the variant data to be the location of the file you renamed in Step 3. The location in setwd will determine where your files are written to.

Step 7:

You can also add labels to the different regions by uncommenting one of the following options:

Step 8:

Select Source in RStudio to run the whole script

Step 9:

The pdf map file will then be available where you have indicated in “setwd”

NB: If you get a map that is only one color then most likely you have not downloaded the “All” option in the GenotypeBrowser

Step 10:

You can open the pdf by double-clicking on it in the File Browser, or you can open it at the command line using the command “xpdf <yourfilename.pdf>”

Step 11:

To extract the map from the sandbox you will then need to copy it to /finngen/red/… and request a download.

Step 12:

When data security has approved your download you will then be able to download it from FinnGen green downloads bucket.

Last updated