DReichLab / DReichLab/AdmixTools

All D-stat values are zero

Open
#57 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
235
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Hi, I am trying to run a test on D-stat with a single chromosome (chr38) of dog using an output of PLINK. I am only considering autosomes.

I first ran convertf in this .par file:
genotypename: DATA/chr38.bed
snpname: DATA/chr38.bim
indivname: DATA/chr38.pedind
outputformat: EIGENSTRAT
genotypeoutname: testchr38.geno
snpoutname: testchr38.snp
indivoutname: testchr38.ind
numchrom: 38

Input pedind:
1 speciesO.ind1 0 0 1 1
2 species1.ind1 0 0 2 1
3 species1.ind2 0 0 1 1
4 species1.ind3 0 0 2 1
5 species1.ind4 0 0 2 1
6 species1.ind5 0 0 2 1
7 species1.ind6 0 0 1 1
8 species2.ind1 0 0 1 1
9 species2.ind2 0 0 1 1
...

Output was:
testchr38.geno
000000100000000100000010
111101101010010001000101
011001000110100000001100
000001001010000100011000
001001000101101100011000
000000000000000010000000
000000000000000000000001
200000000000000000000000
001101100000000000000000
...

testchr38.snp
chr38_5 38 0.000000 5 C T
chr38_6 38 0.000000 6 G A
chr38_7 38 0.000000 7 A T
chr38_8 38 0.000000 8 T C
chr38_10 38 0.000000 10 C T
chr38_38 38 0.000000 38 G C
chr38_43 38 0.000000 43 C A
chr38_242 38 0.000002 242 A G

testchr38.ind
1:speciesO.ind1 M Control
2:species1.ind1 F Control
3:species1.ind2 M Control
4:species1.ind3 F Control
5:species1.ind4 F Control
6:species1.ind5 F Control
7:species1.ind6 M Control
8:species2.ind1 M Control
9:species2.ind2 M Control
...

I am trying to see admixture from a species2 into a specific population of species1 (pop1) vs another (species1, pop2). I have speciesO as outgroup. species1.ind1 and .ind2 belong to pop1, species1.ind3 ind4 ind5 and ind6 belong to pop2.

I modified the .ind file to work with pops:
ind1 M speciesO
ind1 F species1.POP1
ind2 M species1.POP1
ind3 F species1.POP2
ind4 F species1.POP2
ind5 F species1.POP2
ind6 M species1.POP2
ind1 M species2
ind2 M species2
...

And set up a .popfile with pops (test of contribution of species.POP2 to species2 also included):
speciesO species2 species1.POP1 species1,POP2
speciesO species1.POP2 species2 species1.POP1

.par file is:
genotypename: testchr38.geno
snpname: testchr38.snp
indivname: testchr38.modified.ind
popfilename: popfile.divided.pops
numchrom: 38

when I run qpDstat -p dstat.testchr38.par:

THE INPUT PARAMETERS

##PARAMETER NAME: VALUE
genotypename: testchr38.geno
snpname: testchr38.snp
indivname: testchr38.modified.ind
popfilename: popfile.divided.groups
numchrom: 38

qpDstat version: 755

number of quadruples 3
0 speciesO 1
1 species2 1
2 species1.POP1 4
3 species1.POP2 2
jackknife block size: 0.050
snps: 27956 indivs: 8
number of blocks for jackknife: 1
nrows, ncols: 8 27956
result: speciesO species2 species1.POP1 species1.POP2 0.0000 0.000 0 0 0
result: speciesO species1.POP1 species2 species1.POP2 0.0000 0.000 0 0 0
##end of qpDstat: 0.306 seconds cpu 21.373 Mbytes in use


What could be failing?

  1. There are some additional species in the .bed and .bim not considered for ABBA-BABA
  2. I am using 38 chromosomes
  3. Original naming of the individuals when calling .bed and .bim in PLINK were species1.ind1, species1.ind2, species2.ind1, speciesO.ind1 ...

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the qpDstat command with dstat.testchr38.par, the converted .geno/.snp files, modified .ind file, and popfile.divided.pops. Check the reported population counts and the single jackknife block, then compare the input chromosome and population naming assumptions. Done means identifying why both reported D-statistics have zero usable counts and documenting a confirmed correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.