Label groups with samples names in snpgdsDrawTree (SNPRelate package)

Hello everyone,

I have drawn a dendrogram with the snpgdsDrawTree from the SNPRelate R package.
There are 8 samples in my dataset, and I wish to label them on the dendrogram.

However the R script create only a single group, and I think it is the reason samples are not labelled individually.

Has anyone encountered this problem before?


# vcf to GDS with snpgdsVCF2GDS

# convert VCF in GDS:
snpgdsVCF2GDS( "GVCF_SNPs.vcf", "my.gds", method=c("biallelic.only", "copy.num.of.ref"), snpfirstdim=FALSE, compress.annotation="ZIP_RA.max", compress.geno="", ref.allele=NULL, ignore.chr.prefix="chr", verbose=TRUE)

# Getting summary of the GDS file content: 

# open GDS file in R as dataframe:
genofile <- openfn.gds("my.gds")

dissMatrix  <-  snpgdsDiss(genofile ,,, autosome.only=FALSE,remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, num.thread=10, verbose=TRUE)
snpHCluster <-  snpgdsHCluster(dissMatrix,, need.mat=TRUE, hang=0.25)
cutTree <- snpgdsCutTree(snpHCluster, z.threshold=15, outlier.n=5, n.perm = 5000,,col.outlier="red", col.list=NULL, pch.outlier=4, pch.list=NULL,label.H=FALSE, label.Z=TRUE, verbose=TRUE)

snpgdsDrawTree(cutTree, edgePar=list(col=rgb(0.5,0.5,0.5, 0.75), t.col="black", leaflab="textlike"))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.