
Input files:
- GLIMPSE imputed vcf
- Modern individuals vcf (e.g. 1000G)
- A poplabels file listing population labels for each individual. Individuals have to appear in the same order as in the merged vcf file. The file should contain four columns: ID POP GROUP SEX. The second column is used for population assignment.
- A second poplabels file used for the MDS analysis. The second column should now list IDs of all individuals plotted in the MDS. The outgroup should be grouped together into one population.
- File containing sample ages in generations, two lines per sample (diploid), e.g. for 3 samples of ages 0, 10, and 100 generations:
```
0
0
10
10
100
100
```

###########
1. Given imputed VCFs obtained from GLIMPSE, please run ```1_prep_vcf.sh``` to filter the imputed genotypes
2. Then please run ```2_prep_Relate.sh``` to prepare Relate input files
3. Now you can run ```3_run_Relate.sh``` to estimate genealogies 

Now you can use the Relate files for various analyses:
4. You can run Twigstats using ```Rscript 4_run_Twigstats.R```
5. You estimate coalescence rates and population sizes using ```Rscript ../scripts/5_plot_popsize.R```
6. You can run MDS using ```Rscript 6_plot_MDS.R```

