0

I don't understand what the error message is showing, what I have to do here.

cols <- brewer.pal(n = nPop(genlight.smelt), name = "Dark2")

Warning message: In brewer.pal(n = nPop(genlight.smelt), name = "Dark2") : minimal value for n is 3, returning requested palette with 3 different levels

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
Motia
  • 1
  • 1
    What does `nPop(genlight.smelt)` return? Is it at least three? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Oct 06 '20 at 04:06
  • #convert data from vcf object to genlight all(colnames(smelt.VCF@gt)[-1] == pop.data$AccessID) genlight.smelt <- vcfR2genlight(smelt.VCF) pop(genlight.smelt) <- pop.data$PopType genlight.smelt #create a pairwise genetic distance matrix for individuals or populations tree <- aboot(genlight.smelt, tree = "upgma", distance = bitwise.dist, sample = 100, showtree = F, cutoff = 0, quiet = T) cols <- brewer.pal(n = nPop(genlight.smelt), name = "Dark2" Here, I have 5 population types, but in my tree it shows 3 colrs for 3 poptypes, don't understand how to fix that code! – Motia Oct 07 '20 at 08:11
  • problem solved. Many thanks! – Motia Oct 07 '20 at 10:30

0 Answers0