It explains the steps of script **2.2.0.1.maf2circos.sh** and documents progression from the whole genome alignment of the *de novo* *Hypoplectrus puella* genome assembly with the *Gasterosteus aculeatus* reference genome.
No newline at end of file
The Figure can be recreated by using runing the **R** script F1.R:
```sh
cd $WORK/3_figures/F1
Rscript --vanilla F1.R
rm Rplots.pdf
```
## Details of F1.R
In the following, the individual steps of the R script are documented. Is an executable R script that depends on a variety of image manipulation and geodata packages.
Aditionally, the supporting R script (**F1.functions.R**) in needed:
```{r head,results='hide',message=FALSE}
library(sp)
library(maptools)
library(scales)
library(PBSmapping)
library(RColorBrewer)
library(tidyverse)
library(ggforce)
library(cowplot)
library(scatterpie)
library(hrbrthemes)
library(cowplot)
library(grid)
library(gridSVG)
library(grImport2)
library(grConvert)
library(ggmap)
library(marmap)
source("../../0_data/0_scripts/F1.functions.R")
```
### Fig. 1 a)
First, we load the data sheet containing the sampling location as well as the population specifics for each sample and subsample it to include only the samples included in the resequencing study.
The Coordinates need to be transformed from (deg min sec) to decimal degrees.
The sample inventory is summarised over populations and merged with the coordinates later used for the sample pointers.
Next, we read in the shappe files containg the distribution of the halet species.
One file contains the overlap of the distribution ranges of *H. nigricans*, *H. puella* and *H. unicolor*, while the other contains the distribution range of the whole genus (*Hypoplectrus*).
These distributions rely on the data provided by the [*Smithsonian Tropical Research Institute*](http://biogeodb.stri.si.edu/caribbean/en/research/index/range) that were processed using [`gimp`](https://www.gimp.org/) and [`qgis`](https://qgis.org/en/site/) (including the [`Georeferencer Plugin`](https://docs.qgis.org/2.8/en/docs/user_manual/plugins/plugins_georeferencer.html))