Hi Juan,
Just looking at the error, is it possible you have loci with lots of missing data and the bootstrap creates a sample that has only missing data.
So maybe can you filter
gl.filter.callrate(gl, method=”loc”, thresh=0.99) or so and see if the error disappears…
cheers, Bernd
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dartr+un...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/dartr/65a5e5a6-43e6-4e10-88a9-166226f1fe5cn%40googlegroups.com.
Hi Juan,
I ran the dataset you sent me without any issues.
Could you please install the developing version of dartR.base by running the commands below and then try again?
devtools::install_github("green-striped-gecko/dartR.base@dev")
library(dartRverse)
gl_scheme_81 <- readRDS("test.rds")
hets_report_scheme_81_Loc <- gl.report.heterozygosity(gl_scheme_81, error.bar = "CI", nboots = 10000, ncpus = 24, CI.type = "perc", boot.method = "loc" )
As you may know, we are no longer maintaining dartR and have transitioned to dartRverse (more details in the link below).
https://github.com/green-striped-gecko/dartRverse
Sometimes, installing a new version can be a bit tricky. Here are a couple of points to help avoid common issues:
RStudio Auto-Loading dartRverse packages:
When you open RStudio, it may automatically load dartRverse packages if a genlight object exists in your environment. This can interfere with the update and cause the installation to fail.
Solution:
1. Clear your environment (Menu > Session > Clear Workspace) and then install the updated version of the dartRverse package of interest. Note that cleaning your environment will remove all existing variables and objects.
2. Alternatively, create a new RStudio project and install the updated version there.
Conflict with genlight Objects Created by dartR:
If your genlight object was created using dartR, RStudio may automatically load dartR (instead of dartRverse) when you open your session. This means that functions you run might come from dartR rather than dartRverse.
To resolve this issue, you can choose one of the following approaches:
1. Read your input file using dartRverse functions:
Clear your workspace, restart R, load dartRverse, and then use one of its dedicated functions (e.g., gl.read.csv, gl.read.dart, gl.read.fasta, gl.read.PLINK, gl.read.silicodart, or gl.read.vcf) to import your data.
2. Change the class of your genlight object:
If you prefer to convert your existing genlight object, you can change its class to be compatible with dartRverse. Below is an example of how to do this:
library(dartRverse)
# genlight object created using dartR
t1 <- your_genllight
# Assign the class "dartR" to the genlight object
class(t1) <- "dartR"
# Save the modified "dartR" object
gl.save(t1, "test2.rds")
# Now, to use it with dartRverse:
# 1. Clean your workspace: Menu > Session > Clear Workspace
# 2. Restart R: Menu > Session > Restart R
# 3. Load dartRverse
library(dartRverse)
# Load the converted dartR object
t2 <- gl.load("test2.rds")
Cheers,
Luis
The first thing you need is to get the best results from your doctor or the best friend of the year and
To view this discussion visit https://groups.google.com/d/msgid/dartr/df0f221c-1d0b-4dd6-b717-d2ef04e22290n%40googlegroups.com.