thibautjombart/adegenet

Strata for running AMOVA

laiajulianamu opened this issue · 1 comments

Hi, I received my SNPs data set from Dart. I am trying to do an AMOVA but my genind object does not have STRATA. I am following this tutorial for adding a new strata to my object but I have been having this error. Could you help me please

strata_df <- data.frame(other(geni)) # Create a data frame from the list.
Starting gl.read.dart

Starting utils.read.dart
Topskip not provided. Setting topskip to 6 .
Reading in the SNP data
Detected 2 row format.
Added the following locus metrics:
AlleleID AlleleSequence TrimmedSequence Chrom_Bacterias_NCBI ChromPos_Bacterias_NCBI AlnCnt_Bacterias_NCBI AlnEvalue_Bacterias_NCBI SNP SnpPosition CallRate OneRatioRef OneRatioSnp FreqHomRef FreqHomSnp FreqHets PICRef PICSnp AvgPIC AvgCountRef AvgCountSnp RepAvg .
Number of rows per clone (should be only 2 s): 2
Recognised: 198 individuals and 86911 SNPs in a 2 row format using YFT2.csv
Completed: utils.read.dart
Starting utils.dart2genlight
Starting conversion....
Format is 2 rows.
Please note conversion of bigger data sets will take some time!
Once finished, we recommend to save the object using save(object, file="object.rdata")
Adding individual metrics: meta2.csv .
Ids for individual metadata (at least a subset of) are matching!
Found 198 matching ids out of 198 ids provided in the ind.metadata file.
Added population assignments.
Added latlon data
Added id to the other$ind.metrics slot.
Added pop to the other$ind.metrics slot.
Added lat to the other$ind.metrics slot.
Added lon to the other$ind.metrics slot.
Completed: utils.dart2genlight
Data read in. Please check carefully the output above
Read depth calculated and added to the locus metrics
Minor Allele Frequency (MAF) calculated and added to the locus metrics
Recalculating locus metrics provided by DArT (optionally specified)
Completed: gl.read.dart
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 86911, 198, 1

head(strata_df)
Error in head(strata_df) : object 'strata_df' not found

Given the function name of gl.read.dart, I think you might need to contact the maintainer or help forum for the dartR package for help.