[adegenet-forum] isolate individuals from a Genind object

Roman Lustrik roman.lustrik at biolitika.si
Fri Dec 4 21:04:54 CET 2015


Sure, try 



> library(adegenet) 
> data(nancycats) 
> 
> my.names <- indNames(nancycats)[1:5] 
> my.names 
[1] "N215" "N216" "N217" "N218" "N219" 
> 
> nancycats[my.names, ] 
/// GENIND OBJECT ///////// 

// 5 individuals; 9 loci; 108 alleles; size: 24 Kb 

// Basic content 
@tab: 5 x 108 matrix of allele counts 
@loc.n.all: number of alleles per locus (range: 8-18) 
@loc.fac: locus factor for the 108 columns of @tab 
@all.names: list of allele names for each locus 
@ploidy: ploidy of each individual (range: 2-2) 
@type: codom 
@call: .local(x = x, i = i, j = j, drop = drop) 

// Optional content 
@pop: population of each individual (group size range: 5-5) 
@other: a list containing: xy 




> indNames(nancycats[my.names, ]) 
[1] "N215" "N216" "N217" "N218" "N219" 




Cheers, 

Roman 

---- 
In god we trust, all others bring data. 

----- Original Message -----

From: "Ronald Moura" <ronaldmoura1989 at gmail.com> 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Friday, December 4, 2015 6:15:25 PM 
Subject: [adegenet-forum] isolate individuals from a Genind object 

Hi, 

Is there any way to extract a subset of individuals from a Genind object? To isolate markers the command is: 

obj <- nancycats [ loc= c ( "fca23" , "fca90" ) ] 

Is there a similar command for individuals? 

thanks for helping. 

-- 
Yours sincerely, 
Ronald Moura 

Department of Genetics, Federal University of Pernambuco 

_______________________________________________ 
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/20151204/7d5819cd/attachment.html>


More information about the adegenet-forum mailing list