[adegenet-forum] df2genind ignoring ind.names
Jombart, Thibaut
t.jombart at imperial.ac.uk
Mon Sep 7 15:39:47 CEST 2015
Hi there,
I am not sure which version of adegenet you are using, but it would be worth updating everything just to make sure.
@ind.names disappeared in adegenet 2.0.0, alongside other slots that were no longer useful. See ChangeLog for more info:
https://github.com/thibautjombart/adegenet/blob/master/ChangeLog
You basically want to use accessors instead, e.g. indNames(dataset.gen) etc.
They are all documented in the new 'basics' tutorial.
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 Stephen Attwood [swahuaxi at yahoo.com]
Sent: 07 September 2015 14:32
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] df2genind ignoring ind.names
Apologies for bothering you all, but I suddenly started getting this error (the script below used to work ok on same dataset and I reinstalled with latest package adegenet after problem appeared but error persisted):
R
library(PopGenReport)
dataset.df <- read.csv("/home/.../dataset.csv",head = FALSE, sep = ",")
dataset.gen <- df2genind(dataset.df[, -c(1, 2)], ind.names = dataset.df[[1]], pop = dataset.df[[2]], loc.names = c("locusA","locusB","locusC","locusD","locusE","locusF","locusG","locusH","locusJ"), type = "codom", ploidy = 2, sep="/")
dataset.gen at ind.names # returns "Error: no slot of name "ind.names" for this object of class "genind""
dataset.gen at pop # returns the populations correctly
dataset.gen at tab # returns the genotypes correctly
dataset.df[[1]] # returns the ind.names correctly
Can anyone advise as to how to fix the above code so that the ind.names are correctly slotted into the genind object?
I run R on linux Mint.
I also noticed that PopGenReport began to return the error "could not find function "pairwise.fst"" in computation of Nei’s pairwise Fst, and that this error began to appear from the same time as above. Are both these problems likely to be due to changes in adegenet?
These are great tools by the way - I use them often.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150907/dbbdb871/attachment.html>
More information about the adegenet-forum
mailing list