> colSums(DenisovaMat) allCount1 allCount ibdC posAll #SNPs #Nea 6.493840e+09 7.387063e+09 1.199864e+07 3.571732e+07 2.231842e+06 2.226101e+06 #Ref #Alt #New NeaR RefR AltR 1.960579e+06 2.404610e+05 2.506100e+04 1.137987e+05 1.043318e+05 8.444446e+03 NewR xAltCon xRefCon mAltCon mRefCon NeaPosC 1.182770e+03 1.476290e+05 1.164305e+05 1.607828e+05 1.254006e+05 1.852678e+08 AltPosC RefPosC 1.854617e+08 2.068585e+08 > All haploSNVs: 2,231,842 > source("count_snvs.R") [1] 680904 RARE: > a1 <- which(data[[10]]<0.05) > > length(a1) [1] 2591116 > Remove Zero and One: > a2 <- which(data[[10]]>(1/(2*1131-1))) > > a0 <- intersect(a1,a2) > length(a0) [1] 1864665 > > summary(data[[10]][a1]) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0000000 0.0004421 0.0017680 0.0054850 0.0057470 0.0499600 > > summary(data[[10]][a0]) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0008842 0.0013260 0.0030950 0.0074530 0.0092840 0.0499600 > Remove zero, one and two: > a3 <- which(data[[10]]>(2/(2*1131-1))) > > a01 <- intersect(a1,a3) > length(a01) [1] 1523089 Not considered: >95 % .... > > > > #---------------- > > mean(data[[10]]) [1] 0.06731395 > > length(data[[10]]) [1] 3167651 > > aT <- table(data[[10]]) > > sum(aT[1:114])+ sum(aT[(2263-114+1):2263]) [1] 2612261 Rare SNPs (0<=MAF<=0.05 OR 0.95<=MAF<=1.0): 2612261 Without zero and privat (and >95% considered): > sum(aT[3:114])+ sum(aT[(2263-114+1):(2263-2)]) [1] 1884383 All 3167651 rare 1884383 haplotypes: 680904 680904/3167651 680904/1884383 > 680904/3167651 [1] 0.2149555 > > 680904/1884383 [1] 0.3613406 > 21.5% of All 36.1% of Rare > print(allC) AFR AMR AFR/AMR ASN AFR/ASN 71026 399 28444 3333 389 AMR/ASN AFR/AMR/ASN EUR AFR/EUR AMR/EUR 202 616 639 1042 1034 AFR/AMR/EUR ASN/EUR AFR/ASN/EUR AMR/ASN/EUR AFR/AMR/ASN/EUR 4446 365 190 518 1320 > AFR: af <- allC[c(1,3,5,7,9,11,13,15)] > sum(af) [1] 107473 EUR: eu <- allC[8:15] sum(eu) > eu <- allC[8:15] > sum(eu) [1] 9554 ASN: as <- allC[c(4:7,12:15)] sum(as) > as <- allC[c(4:7,12:15)] > sum(as) [1] 6933 AFR: 71026 EUR: 639 ASN: 3333