Label groups with samples names in snpgdsDrawTree (SNPRelate package)
0
0
Entering edit mode
3.8 years ago

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?

enter image description here

# 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: 
snpgdsSummary("my.gds")

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

#dendogram
dissMatrix  <-  snpgdsDiss(genofile , sample.id=NULL, snp.id=NULL, autosome.only=FALSE,remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, num.thread=10, verbose=TRUE)
snpHCluster <-  snpgdsHCluster(dissMatrix, sample.id=NULL, need.mat=TRUE, hang=0.25)
cutTree <- snpgdsCutTree(snpHCluster, z.threshold=15, outlier.n=5, n.perm = 5000, samp.group=NULL,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"))
SNPRelate • 636 views
ADD COMMENT

Login before adding your answer.

Traffic: 3131 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6