<div dir="ltr"><div>Hi Ashley,<br><br></div><div>I suspect that the PLINK format has changed somewhat since this function was initially written (before 2014). If you have a VCF file, it would be better to use the {vcfR} package to convert to genlight or genclone (or even genind).</div><div><br></div><div>To do so, you can use:</div><div>vcf <- vcfR::read.vcfR("/path/to/my.vcf")<br></div><div><br></div><div>with <br></div><div><br></div><div>vcfR::vcfR2genlight(vcf) to return a genlight object <br></div><div><br></div><div>or <br></div><div><br></div><div>vcfR::vcfR2genind(vcf, return.alleles = TRUE) to return a genind object<br></div><div><br></div><div>I hope that helps. Sorry for the late reply.</div><div><br></div><div>Best,</div><div>Zhian<br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Date: Mon, 4 Dec 2023 19:40:39 -0800<br>
From: Ashley A Dickinson <<a href="mailto:Ashley.Dickinson@humboldt.edu" target="_blank">Ashley.Dickinson@humboldt.edu</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] read.PLINK error message<br>
Message-ID:<br>
<CAGM_n_=<a href="mailto:R5oWBJSA__aKGveZyyOn96qHxKEj8j_Q7L9ES8nv0rg@mail.gmail.com" target="_blank">R5oWBJSA__aKGveZyyOn96qHxKEj8j_Q7L9ES8nv0rg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
I am trying to use adagenet (v.2.1.10) to do DAPC, but I am receiving an<br>
error message I can't figure out. I used PLINK2 to convert a vcf file to a<br>
.raw file for SNP data obtained on 78 individuals using RADseq. I then<br>
tried to use the read.PLINK function to import into genlight objects<br>
<br>
> read.PLINK("myfile.raw", map.file = "myfile.map")<br>
<br>
Reading PLINK raw format into a genlight object...<br>
Reading loci information...<br>
Reading and converting genotypes...<br>
.Error in read.PLINK("myfile.raw", map.file = "myfile.map") :<br>
some individuals do not have -5 SNPs.<br>
<br>
<br>
I have tried again with multiple different vcf output files that I had<br>
created with different parameters and filtering steps just to make sure<br>
that it wasn't that one file, but I get the same error each time. The data<br>
set has >8000 SNPs within 730 loci.<br>
<br>
Any ideas or recommendations are appreciated!<br>
<br>
-Ashley<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%2F20231204%2F7594c7f1%2Fattachment-0001.htm&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7C68354a5d4b164e480afa08dbf58157c8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638373708708353960%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=%2FI9%2BAIxx8tGNK33dlJ2Rg2upxLU4MLHBjEacl%2BsCxgY%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%2F20231204%2F7594c7f1%2Fattachment-0001.htm&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7C68354a5d4b164e480afa08dbf58157c8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638373708708353960%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=%2FI9%2BAIxx8tGNK33dlJ2Rg2upxLU4MLHBjEacl%2BsCxgY%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%7C01%7Ckamvarz%40science.oregonstate.edu%7C68354a5d4b164e480afa08dbf58157c8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638373708708353960%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=aI1aa92PwCqeBs811%2B5SQJvvU6HWiXCQy8Dw9RW0pLI%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%7C01%7Ckamvarz%40science.oregonstate.edu%7C68354a5d4b164e480afa08dbf58157c8%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638373708708353960%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=aI1aa92PwCqeBs811%2B5SQJvvU6HWiXCQy8Dw9RW0pLI%3D&reserved=0</a><br>
<br>
<br>
------------------------------<br>
<br>
End of adegenet-forum Digest, Vol 153, Issue 1<br>
**********************************************<br>
</blockquote></div></div></div>