Skip to content

Instantly share code, notes, and snippets.

@allgenesconsidered
Created December 12, 2017 18:56
Show Gist options
  • Select an option

  • Save allgenesconsidered/9b6021e0bebf3431081c5ea7fd475362 to your computer and use it in GitHub Desktop.

Select an option

Save allgenesconsidered/9b6021e0bebf3431081c5ea7fd475362 to your computer and use it in GitHub Desktop.
Generate dendrogram from samples
library("SNPRelate")
snpgdsVCF2GDS(vcf.fn = "~/Desktop/dom_neg_genes_chr11_only/domneg_filtered_variants.vcf", out.fn = "~/Desktop/my.gds")
snpgdsSummary("~/Desktop/my.gds")
genofile <- openfn.gds("~/Desktop/my.gds")
ibs.hc <- snpgdsHCluster(snpgdsIBS(genofile, num.thread=2))
rv <- snpgdsCutTree(ibs.hc)
plot(rv$dendrogram, leaflab="textlike", main="DN Sample Clustering From Chr11 Varients")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment