Hi all,
I would like to investigate whether I have clones in my dataset. I have filtered my data first using filter secondaries, reproducibility, call rate loci and individuals, read depth, MAFs, monomorphic loci and imputed missing data using nearest neighbour function.
I saw that Simon asked the same question how to check for clonal genotypes in the dataset on April, 2022. I have tried using gl.propShared() as Luis suggested with the following code:
library(dartR)
# calculating the proportion of shared alleles
res <- gl.propShared(
platypus.gl)
# converting a matrix into columns
clones_temp <- as.data.frame(as.table(as.matrix(res)))
# filtering individuals using a threshold of 0.99
clones_temp_2 <- clones_temp[clones_temp$Freq>0.99,]
# getting pairs of individuals that are not the same
clones <- clones_temp_2[which(clones_temp_2$Var1!=clones_temp_2$Var2),]
I have downloaded and installed the library(Rcpp). However, I get the error message “Error xcrun: error: invalid active developer path”. I looked this up online and think in order to fix this I have to install Command Line Tools in Terminal (I’m using macOS). Unfortunately, I don’t have enough disk space to download this. It might be a long shot, but are there any other functions or ways to check if I have clones in my dataset that do not require the gl.propShared with C++ implementation?
I have a similar issue with function gl.nhybrids were I want to check for hybrids in my dataset but can’t seem to get it to work on my macbook.
Any advice is very welcome 😊
Thank you,
Chiara