cran / stockR

:exclamation: This is a read-only mirror of the CRAN R package repository. stockR — Identifying Stocks in Genetic Data
0 stars 0 forks source link

plot.stockBOOT.object does NOT show colour legend or plot title #1

Open ishtar83 opened 3 years ago

ishtar83 commented 3 years ago

Hi, I have just started using stockR, and I must say I find the whole package and its functions a bit cryptic...I have read both the manual and the "Introduction to stockR" tutorial associated with the R package, but I am still quite confused. I have also read the main publications associated Foster et al., 2018 and Corander et al., 2003, but I did not find them super helpful in understanding how to actually run the analysis and how to interpret the meaning of each result...(especially for example it's not clear to me when to choose sampling groups and when to leave those as single individuals).

Anyways, I have tried to follow the tutorial and tried several K values with sampling group=individuals. I am trying now to plot the results of the bootstrap assignment probability but the plot does not show any color legend so it's hard for me to understand which color correspond to which probability ...are also the populations assigned a colour??

By the way, the plotTitle option does not work...the plot is legendless & titleless...also there are no axes or axes labels...

Also, I wanted to ask about the "locations" option...I dont understand if I assign to each of the K populations modeled a name correspending to my original sample populations and how do I make sure each individual is labeled with the original population name...I am really quite confused about this.

Also, I wanted to ask about the stockSTRUCTURE function. I ran this code (following the tutorial): ThirdFILT_MAF0.01_STOCKstructure= stockSTRUCTURE(SNPdata = ThirdFILT_MAF0.01_stockR, sample.grps = as.factor(1:ncol(ThirdFILT_MAF0.01_stockR)), K = 10, weights = rep(1, nlevels(sample.grps)), start.grps=NULL, control=list(quiet=FALSE, method="Kmeans.EM"))

But like this I miss the individuals original names...so I tried to replace sample.grps with sample.grps=as.factor(colnames(ThirdFILT_MAF0.01_stockR)) in this way I can maintain the individuals original names, which appear also in the posterior probabilities list and in the bootstrap probabilities list....BUT the plot when I use this version of sample.grps instead of the default one, is very different....am I doing something wrong or missing something?

I would really appreciate some clarifications... Thanks a lot for your kind assistance and for your time. Best, Gabriella

PS. Is there a Forum for this package where to ask questions and discuss related topics?

gaborcsardi commented 3 years ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!