[adegenet-forum] adegenet-forum Digest, Vol 135, Issue 1

Maria Eugenia D'Amato medamato at gmail.com
Mon Feb 3 14:28:35 CET 2020


Hi Zhian

I use the following (one example with my U2166dapc.csv file)
my data are haploid, with headers, 1colum for individual ID, 10 next
columns with microsatellite data


U2166 <- read.csv2(file = "U2166dapc.csv", header = TRUE, sep = ",")


then ,


U2166genind <- df2genind(U2166[,c(2:12)], sep = ",", ploidy = 1)

and then I find clusters on the genind object

hope it helps...
eugenia




On Sun, Feb 2, 2020 at 9:02 PM Zhian Kamvar <kamvarz at science.oregonstate.edu>
wrote:

> Hello,
>
> You can import your data with read.csv() and then use `as.genlight()` to
> convert the allele counts into a genlight object.
> Hope that helps.
>
> Best, Zhian
>
> On Sat, Feb 1, 2020 at 11:00 AM <
> adegenet-forum-request at lists.r-forge.r-project.org> wrote:
>
>> 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://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>>
>> 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. potato dosage SNP (weiya xue)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 31 Jan 2020 12:04:18 -0500
>> From: weiya xue <xueweiya at gmail.com>
>> To: adegenet-forum at lists.r-forge.r-project.org
>> Subject: [adegenet-forum] potato dosage SNP
>> Message-ID:
>>         <
>> CAK59EjBEo0sko7MY2AQvH+L+UOrTRAxxpMuDU_twsGbLvOz1Zg at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Dear Dr. Zhian N. Kamvar,
>>
>> I am potato postdoc researcher at Pennsylvania  state university. I
>> have a question when I use  adegenet R package for DAPC analysis .
>>
>> My SNP data were coded as dosage 0,1,2,3,4  in csv file(sample data
>> attached). When I used read.csv to read this data into R, which
>> function should I use to convert it into adegent format for next
>> steps?
>>
>>
>>
>> And when I use  read.structure,  I always get the below information.
>>
>>
>>
>> Error in mat[, (ncol(mat) - p + 1):ncol(mat)] :
>>
>>   only 0's may be mixed with negative subscripts
>>
>>
>>
>> Thanks a lot,
>>
>> Weiya Xue
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: sample.csv
>> Type: application/vnd.ms-excel
>> Size: 427 bytes
>> Desc: not available
>> URL: <
>> http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20200131/eb05570f/attachment-0001.xlb
>> >
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> adegenet-forum mailing list
>> adegenet-forum at lists.r-forge.r-project.org
>>
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>>
>> ------------------------------
>>
>> End of adegenet-forum Digest, Vol 135, Issue 1
>> **********************************************
>>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20200203/adef1284/attachment.html>


More information about the adegenet-forum mailing list