Generate genetic relationship scores
This procedure generates genetic relationship scores for individuals.
Options
--make-grm
Generates genetic relationship scores and save the output in gz (gzip) format. Two output files are generated under this option: .grm.gz, and .grm.id.
--make-grm-txt
Generates genetic relationship scores and save the output in text format. Two output files are generated under this option: .grm.txt, and .grm.id.
--grm-range
Specify the range of the individual pairs that the grm scores will be generated. For example, --grm-range 100,200 only generates grm scores for the 100th to the 200th pairs.
--ref-freq
Specifies the reference allele frequencies for generating genetic relatedness scores. The format for the frequency file reads below.
CHR | SNP | A1 | A2 | freq(A1) | NCHR |
---|---|---|---|---|---|
1 | rs0 | A | C | 0.488 | 1000 |
1 | rs1 | A | C | 0.477 | 1000 |
1 | rs2 | C | A | 0.469 | 1000 |
--maf-range
Specifies the range (inclusive) of the minor allele frequencies. Only SNPs within this range will be used for generating genetic relatedness scores. If the reference allele frequency, f, is greater than 0.5, say 0.65, it will be converted to 1-f.
--grm-partition
This option partitions the whole grm into k even subdivisions, each of which will be submitted to the HPC.
There are four columns in the grm, in either gz or grm format, is as defined below (no title line included).
ID1 | ID2 | Number of Markers | Genetic relatedness score |
---|---|---|---|
1 | 1 | 100 | 1.1 |
2 | 1 | 100 | 0.003 |
2 | 2 | 99 | 0.98 |
The first two columns point to the rows of this pair of individuals in the .grm.id file, in which their identifiers, as defined in the .fam, can be found.
--Example
gear --bfile test --make-grm --out test gear --bfile test --make-grm-txt --out test gear --bfile test --make-grm --ref-freq freq --out test gear --bfile test --make-grm --maf-range 0.4,0.6 --out test gear --bfile test --make-grm --grm-range 100,200 --out test
If use grm-partition option
gear --bfile test --make-grm --grm-partition 10 --out test --name test
It will generate 10 shell scripts, test.1.sh, test.2.sh, ..., test.10.sh.
In the first script, say test.1.sh, it reads as below
gear --bfile test --make-grm --grm-range x,y --out test.1
GEAR will automatically set the numbers to the option --grm-range.