
snpgdsDiss(gdsobj, sample.id=NULL, snp.id=NULL, autosome.only=TRUE, remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, num.thread=1, verbose=TRUE)
SNPGDSFileClass
,
a SNP GDS fileTRUE
, use autosomal SNPs only; if it is a
numeric or character value, keep SNPs according to the specified
chromosomeNA
, detect
the number of cores automaticallysnp.id
are calculated over all the samples in sample.id
.The details will be described in future.
Weir BS, Zheng X. SNPs and SNVs in Forensic Science. 2015. Forensic Science International: Genetics Supplement Series.
snpgdsHCluster
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())
pop.group <- as.factor(read.gdsn(index.gdsn(
genofile, "sample.annot/pop.group")))
pop.level <- levels(pop.group)
diss <- snpgdsDiss(genofile)
hc <- snpgdsHCluster(diss)
# close the genotype file
snpgdsClose(genofile)
# split
set.seed(100)
rv <- snpgdsCutTree(hc, label.H=TRUE, label.Z=TRUE)
# draw dendrogram
snpgdsDrawTree(rv, main="HapMap Phase II",
edgePar=list(col=rgb(0.5,0.5,0.5, 0.75), t.col="black"))
Run the code above in your browser using DataLab