<div dir="ltr"><div>This question was cross-posted an hour and a half later to <a href="https://github.com/thibautjombart/adegenet/issues/360">https://github.com/thibautjombart/adegenet/issues/360</a> where I saw it first and answered to the best of my ability there.</div><div><br></div><div>I receive a daily digest of messages from this forum, so it will likely take a day or more for me to answer them. Please refrain from cross-posting in the future.</div><div><br></div><div>Best,</div><div>Zhian <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 12, 2024 at 9:05 AM <<a href="mailto:adegenet-forum-request@lists.r-forge.r-project.org">adegenet-forum-request@lists.r-forge.r-project.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Date: Fri, 12 Apr 2024 11:04:56 -0500<br>
From: Laia Juliana Mu?oz <<a href="mailto:laiajulianamu@gmail.com" target="_blank">laiajulianamu@gmail.com</a>><br>
To: <a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
Subject: [adegenet-forum] Error with strata<br>
Message-ID:<br>
<CAHxmJvKFBJ+Qv_BEOrPf45mG=9XR8=<a href="mailto:KVPZRhPyH0sDX4ZXCtgg@mail.gmail.com" target="_blank">KVPZRhPyH0sDX4ZXCtgg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi I am trying to create a strata for running an AMOVA. I am using a<br>
Genlight object but for some reason I am having the error below.<br>
Can somebody help me, please?<br>
<br>
<br>
> strata(gl) <- data.frame(other(gl))Starting gl.read.dart Starting utils.read.dart Topskip not provided. Setting topskip to 6 . Reading in the SNP data Detected 2 row format.Number of rows per clone (should be only 2 s): 2 Added the following locus metrics:AlleleID CloneID AlleleSequence TrimmedSequence SNP SnpPosition CallRate OneRatioRef OneRatioSnp FreqHomRef FreqHomSnp FreqHets PICRef PICSnp AvgPIC AvgCountRef AvgCountSnp RepAvg .Recognised: 479 individuals and 76246 SNPs in a 2 row format using Report_DTu24-9051_2_moreOrders_SNP_1.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 479 matching ids out of 479 ids provided in the ind.metadata file. Added population a<br>
ssignments. Added latlon data. Added id to the other$ind.metrics slot.<br>
Added pop to the other$ind.metrics slot.<br>
Added lat to the other$ind.metrics slot.<br>
Added lon to the other$ind.metrics slot.Completed:<br>
utils.dart2genlight 479 rows and 76246 columns of data read Read<br>
depth calculated and added to the locus metrics Minor Allele<br>
Frequency (MAF) calculated and added to the locus metrics<br>
Recalculating locus metrics provided by DArT (optionally<br>
specified)Starting gl.compliance.check Processing genlight object<br>
with SNP data Checking coding of SNPs SNP data scored NA, 0, 1 or<br>
2 confirmed Checking for population assignments Population<br>
assignments confirmed Checking locus metrics and flags Recalculating<br>
locus metrics Checking for monomorphic loci No monomorphic loci<br>
detected Checking for loci with all missing data No loci with all<br>
missing data detected Checking whether individual names are unique.<br>
Checking for individual metrics Individual metrics confirmed<br>
Spelling of coordinates checked and changed if necessary to<br>
lat/lonCompleted: gl.compliance.check Completed: gl.read.dart Error<br>
in utils.check.datatype(x, verbose = verbose) :<br>
Fatal Error: inappropriate object passed to function, found list<br>
expecting genlight or SNP or SilicoDArT> strata(gi) <-<br>
data.frame(other(gi))Starting gl.read.dart Starting utils.read.dart<br>
Topskip not provided. Setting topskip to 6 . Reading in the SNP data<br>
Detected 2 row format.Number of rows per clone (should be only 2 s):<br>
2 Added the following locus metrics:AlleleID CloneID AlleleSequence<br>
TrimmedSequence SNP SnpPosition CallRate OneRatioRef OneRatioSnp<br>
FreqHomRef FreqHomSnp FreqHets PICRef PICSnp AvgPIC AvgCountRef<br>
AvgCountSnp RepAvg .Recognised: 479 individuals and 76246 SNPs in a 2<br>
row format using Report_DTu24-9051_2_moreOrders_SNP_1.csv Completed:<br>
utils.read.dart Starting utils.dart2genlight Starting<br>
conversion....Format is 2 rows.Please note conversion of bigger data<br>
sets will take some time!Once finished, we recommend to save the<br>
object using save(object, file="object.rdata")Adding individual<br>
metrics: meta2.csv . Ids for individual metadata (at least a subset<br>
of) are matching! Found 479 matching ids out of 479 ids provided in<br>
the ind.metadata file. Added population assignments. Added latlon<br>
data. Added id to the other$ind.metrics slot.<br>
Added pop to the other$ind.metrics slot.<br>
Added lat to the other$ind.metrics slot.<br>
Added lon to the other$ind.metrics slot.Completed:<br>
utils.dart2genlight 479 rows and 76246 columns of data read Read<br>
depth calculated and added to the locus metrics Minor Allele<br>
Frequency (MAF) calculated and added to the locus metrics<br>
Recalculating locus metrics provided by DArT (optionally<br>
specified)Starting gl.compliance.check Processing genlight object<br>
with SNP data Checking coding of SNPs SNP data scored NA, 0, 1 or<br>
2 confirmed Checking for population assignments Population<br>
assignments confirmed Checking locus metrics and flags Recalculating<br>
locus metrics Checking for monomorphic loci No monomorphic loci<br>
detected Checking for loci with all missing data No loci with all<br>
missing data detected Checking whether individual names are unique.<br>
Checking for individual metrics Individual metrics confirmed<br>
Spelling of coordinates checked and changed if necessary to<br>
lat/lonCompleted: gl.compliance.check Completed: gl.read.dart Error<br>
in utils.check.datatype(x, verbose = verbose) :<br>
Fatal Error: inappropriate object passed to function, found list<br>
expecting genlight or SNP or SilicoDArT<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.r-forge.r-project.org%2Fpipermail%2Fadegenet-forum%2Fattachments%2F20240412%2Ff344eec0%2Fattachment.htm&data=05%7C02%7Ckamvarz%40science.oregonstate.edu%7C86aba448d7cb4c06603a08dc5b0a5fa8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638485347321411944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=v6YjFWfniYkVMUpu3pyyK%2B7Xv8R7PRP0xDrBVSfupfU%3D&reserved=0" rel="noreferrer" target="_blank">https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.r-forge.r-project.org%2Fpipermail%2Fadegenet-forum%2Fattachments%2F20240412%2Ff344eec0%2Fattachment.htm&data=05%7C02%7Ckamvarz%40science.oregonstate.edu%7C86aba448d7cb4c06603a08dc5b0a5fa8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638485347321411944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=v6YjFWfniYkVMUpu3pyyK%2B7Xv8R7PRP0xDrBVSfupfU%3D&reserved=0</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.r-forge.r-project.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fadegenet-forum&data=05%7C02%7Ckamvarz%40science.oregonstate.edu%7C86aba448d7cb4c06603a08dc5b0a5fa8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638485347321411944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=VMsHDP2Shvf0mZZLou%2BaaXp4LGrPhDehVGTxd6acm7o%3D&reserved=0" rel="noreferrer" target="_blank">https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.r-forge.r-project.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fadegenet-forum&data=05%7C02%7Ckamvarz%40science.oregonstate.edu%7C86aba448d7cb4c06603a08dc5b0a5fa8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638485347321411944%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=VMsHDP2Shvf0mZZLou%2BaaXp4LGrPhDehVGTxd6acm7o%3D&reserved=0</a><br>
<br>
<br>
------------------------------<br>
<br>
End of adegenet-forum Digest, Vol 154, Issue 1<br>
**********************************************<br>
</blockquote></div></div>