[adegenet-forum] extracting clusters

Jombart, Thibaut t.jombart at imperial.ac.uk
Fri Jan 14 13:38:22 CET 2011


Dear Tommaso, 

I assume you're using the function find.clusters to define groups. Here is an example using nancycats:
###
library(adegenet)
data(nancycats)
res=find.clusters(nancycats, n.pc=100, n.clu=6)
res # groups are in res$grp
grp=res$grp
out=data.frame(id=names(grp), grp=grp) # form the output data.frame
write.table(out, file="myGroups.txt",row.names=FALSE, col.names=TRUE, quote=FALSE) # write to file
###

Best

Thibaut.


________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of Dragani Tommaso [Tommaso.Dragani at istitutotumori.mi.it]
Sent: 14 January 2011 12:28
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] extracting clusters

Dears,
I am using adegenet to define genetic clusters.
I would like to know how to export the individual cluster assignments in a .txt file containing two columns where the cluster number is flanking the ID number of each subject.

With many thanks for your help.

Sincerely,

Tommaso A. Dragani






Il tuo 5 per mille per finanziare la ricerca e la cura.
Inserisci il nostro Codice Fiscale 800 182 301 53 nel riquadro “Finanziamento della Ricerca Sanitaria” della Tua dichiarazione dei redditi.
Da oltre 80 anni all’avanguardia nella ricerca e nella cura dei tumori.
La presente comunicazione, che potrebbe contenere informazioni riservate e/o protette da segreto professionale, è indirizzata esclusivamente ai destinatari della medesima qui indicati. Ogni informazione qui contenuta, che non sia relativa alla nostra attività caratteristica, deve essere considerata come non inviata. Nel caso in cui abbiate ricevuto per errore la presente comunicazione, vogliate cortesemente darcene immediata notizia, rispondendo a questo stesso indirizzo di e-mail, e poi procedere alla cancellazione di questo messaggio dal Vostro sistema. E' strettamente proibito e potrebbe essere fonte di violazione di legge qualsiasi uso, comunicazione, copia o diffusione dei contenuti di questa comunicazione da parte di chi la abbia ricevuta per errore o in violazione degli scopi della presente. Ricordiamo che la tecnologia di trasmissione utilizzata non consente di garantire l’autenticità del mittente né l’integrità dei dati

This communication, which may contain confidential and/or legally privileged information, is intended solely for the use of the intended addressees. All information or advice contained in this communication is subject to the terms and conditions provided by the agreement governing each particular client engagement. If you have received this communication in error, please notify us immediately by responding to this email; then please delete it from your system. Any use, disclosure, copying or distribution of the contents of this communication by a not-intended recipient or in violation of the purposes of this communication is strictly prohibited and may be unlawful. The transmission technology used to send this mail can grant neither the sender identity nor the data integrity
_______________________________________________
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


More information about the adegenet-forum mailing list