Hello dartR community,
I’m encountering a persistent error when trying to import my DArT data and attach sample metadata in one step with gl.read.dart(..., ind.metafile=...). Below is a concise summary of what happened and what I’ve tried so far.
```{r}
#Extract my Final plate
library(dartR.base)
library(dartR.data)
final <- gl.read.dart(filename = "D:/Final_plates/dartR/All_plates_edited/Report_DCot24-9524_4_moreOrders_SNP_3.csv", ind.metafile = "D:/Final_plates/dartR/All_plates_edited/cleaned_metadata.csv")
```
Ids for individual metadata (at least a subset of) are matching! Found 318 matching ids out of 318 ids provided in the ind.metadata file.
Error: unable to find an inherited method for function ‘indNames’ for signature ‘x = "NULL"’
I made sure no white spaces or duplicates in the metadata file. The id names and genotypes exactly matches in both files.
Then, I tried an alternative method:
```{r}
gl <- gl.read.dart("D:/Final_plates/dartR/All_plates_edited/Report_DCot24-9524_4_moreOrders_SNP_3.csv")
gl <- gl.add.indmetrics(
gl,
ind.metafile = "D:/Final_plates/dartR/All_plates_edited/cleaned_metadata.csv")
```
This time it seems like it worked successfully but maybe there is an error I couldn't notice. I wanted to ask your opinion in regards to why I got the error in my first attempt. I couldn't find this error in the forum search.