[adegenet-forum] adegenet-forum Digest, Vol 152, Issue 1
Zhian Kamvar
kamvarz at science.oregonstate.edu
Sat Dec 16 15:00:24 CET 2023
Sorry for the late reply. You should use
ploidy(SNPs_Ploidy) <- c(4, 2, 4, 4, 4, 4, 2, 4, 4, 4)
The error you were getting was due to the fact that you were passing a
single character to the ploidy function. It expects a numeric or integer
vector.
On Tue, Feb 7, 2023 at 3:00 AM <
adegenet-forum-request at lists.r-forge.r-project.org> wrote:
> [This email originated from outside of OSU. Use caution with links and
> attachments.]
>
> Send adegenet-forum mailing list submissions to
> adegenet-forum at lists.r-forge.r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> 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%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bG8Wst5oV9ydVbOSht3bk9xkGVL30URVN4SYetZxVKM%3D&reserved=0
>
> or, via email, send a message with subject or body 'help' to
> adegenet-forum-request at lists.r-forge.r-project.org
>
> You can reach the person managing the list at
> adegenet-forum-owner at lists.r-forge.r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of adegenet-forum digest..."
>
>
> Today's Topics:
>
> 1. Changing Ploidy (Swati...)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 6 Feb 2023 13:06:12 +0100
> From: "Swati..." <swatipuraanik at gmail.com>
> To: adegenet-forum at lists.r-forge.r-project.org
> Subject: [adegenet-forum] Changing Ploidy
> Message-ID:
> <CAD-12nFrXh1F7DdP=
> b34T0q5q8QqLToyLaANQOQ2W591HjLMmQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I have a Genlight object as below:
>
> > SNPs_Ploidy /// GENLIGHT OBJECT /////////
>
> // 78 genotypes, 8,368 binary SNPs, size: 33.2 Mb
> 23935 (3.67 %) missing data
>
> // Basic content
> @gen: list of 78 SNPbin
> *@ploidy: ploidy of each individual (range: 2-2)*
>
> // Optional content
> @ind.names: 78 individual labels
> @loc.names: 8368 locus labels
> @loc.all: 8368 alleles
> @position: integer storing positions of the SNPs
> @pop: population of each individual (group size range: 3-50)
> @other: a list containing: loc.metrics ind.metrics
> loc.metrics.flags verbose history
>
>
> As you can see @ploidy: ploidy of each individual (range: 2-2). However the
> 78 individuals in my dataset have all different ploidies ranging from 2X to
> 6X. I tried using these commands:
>
> > head(ploidy(SNPs_Ploidy), 10)
>
> Ac-3 Ac-359 Ac-25 Ac-75 Ac-182 Ac-210 Ac-272 Ac-317 Ac-333 Ac-344
>
> 2 2 2 2 2 2 2 2 2 2
>
>
>
> > ploidy(SNPs_Ploidy) <- paste("4", "2", "4", "4", "4", "4", "2", "4", "4",
> "4", sep=" ")
>
>
> But I get this error message:
>
> Error in `ploidy<-`(`*tmp*`, value = "4 2 4 4 4 4 2 4 4 4") :
> (converted from warning) NAs introduced by coercion
>
> Is it possible to change the ploidy and what could be the appropriate
> commands?
>
> Best Regards
> Swati
> --------------------------------------------------------------- _
> ---------- ----------------------
> *SWATI PURANIK , Ph.D., MSCA Fellow*
> Junior Researcher
> Global Change Research Institute (CzechGlobe), Czech Academy of Sciences
> Bělidla 986/4a, 603 00 Brno; Czech Republic
> E-mail: s <manoj_prasad at nipgr.ac.in>watipuraanik at gmail.com
> Google Scholar
> <
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscholar.google.cz%2Fcitations%3Fhl%3Den%26user%3DQTwp1YMAAAAJ%26view_op%3Dlist_works%26gmla%3DAJsN-F4LFxJUHZv94qOgQg1ss_nyV9cNg6V6j_dF1gJ583sGeqPI69W6l7-SoBBTETQnD57xSf7SBGngfv45kzo-m7yqUWmTLP2FKlR5zx6LQ6ANEkrQ5wo&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dph0kFoO%2BP32bALC%2Fba24gbrsn%2Fy%2B5NJPS7eVHruYwg%3D&reserved=0
> >
> | ResearchGate <
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.researchgate.net%2Fprofile%2FSwati_Puranik&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=r2FvcpfdjCWZS1kB46fVVvX5%2FTdELgKGjOdIuFR8UPw%3D&reserved=0
> >
> ORCID ID: *
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Forcid.org%2F0000-0003-1787-1550&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7XutS2%2BtWAJPl%2FaS3wCSRxBEcdL1pv6WLJPnqosDghI%3D&reserved=0
> <
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Forcid.org%2F0000-0003-1787-1550&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7XutS2%2BtWAJPl%2FaS3wCSRxBEcdL1pv6WLJPnqosDghI%3D&reserved=0
> >*
>
> ----------------------------------------------------------------------------------
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.r-forge.r-project.org%2Fpipermail%2Fadegenet-forum%2Fattachments%2F20230206%2F5ffac6fe%2Fattachment-0001.html&data=05%7C01%7Ckamvarz%40science.oregonstate.edu%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vB2hNspTUtHHWpnGnPVu4VhBxNFNFhmTtDwzX2rgS94%3D&reserved=0
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
>
> 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%7Ccee51a0028bb4d8abe4908db08fa78ac%7Cce6d05e13c5e4d6287a84c4a2713c113%7C0%7C0%7C638113644094436648%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bG8Wst5oV9ydVbOSht3bk9xkGVL30URVN4SYetZxVKM%3D&reserved=0
>
> ------------------------------
>
> End of adegenet-forum Digest, Vol 152, Issue 1
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20231216/542c4995/attachment.htm>
More information about the adegenet-forum
mailing list