[adegenet-forum] adegenet not recognizing file extensions
Jombart, Thibaut
t.jombart at imperial.ac.uk
Tue Sep 29 12:01:48 CEST 2015
Hi Ella,
It looks like the path to your file is incorrect - can you double-check?
Cheers
Thibaut
________________________________
From: bowlese at gmail.com [bowlese at gmail.com] on behalf of Ella Bowles [ebowles at ucalgary.ca]
Sent: 28 September 2015 18:56
To: Jombart, Thibaut
Subject: Re: [adegenet-forum] adegenet not recognizing file extensions
Hi Thibaut,
I'm now using the line (all in one line)
data <- read.structure("C:/Users/Ella Bowles/Desktop/batch_1_8c9.str", n.ind = 186, n.loc = 4099, onerowperind = FALSE, col.lab = 1, col.pop = 2, col.others = NULL, row.marknames = 2, NA.char = "0", ask = TRUE)
for the attached dataset
and I'm still getting the error
Which other optional columns should be read (press 'return' when done)? 1:
Converting data from a STRUCTURE .stru file to a genind object...
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
cannot open file 'C:/Users/Ella Bowles/Desktop/batch_1_8c9.str': No such file or directory
Can you see what may be wrong?
Thank you for your time,
Ella
On Fri, Sep 25, 2015 at 7:16 PM, Ella Bowles <ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>> wrote:
Hi Thibaut,
I'm now using the line (all in one line)
data <- read.structure("C:/Users/Ella Bowles/Desktop/batch_1_8c9.str", n.ind = 186, n.loc = 4099, onerowperind = FALSE, col.lab = 1, col.pop = 2, col.others = NULL, row.marknames = 2, NA.char = "0", ask = TRUE)
for the attached dataset
and I'm still getting the error
Which other optional columns should be read (press 'return' when done)? 1:
Converting data from a STRUCTURE .stru file to a genind object...
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
cannot open file 'C:/Users/Ella Bowles/Desktop/batch_1_8c9.str': No such file or directory
Can you see what may be wrong?
With thanks,
Ella
On Fri, Sep 25, 2015 at 11:54 AM, Ella Bowles <ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>> wrote:
thank you!
On Fri, Sep 25, 2015 at 9:10 AM, Jombart, Thibaut <t.jombart at imperial.ac.uk<mailto:t.jombart at imperial.ac.uk>> wrote:
Hi there,
please check the forum archives, this has been answered several times. I think I even mention it in the tutorial. You need to remove 'system.file' and just indicate the path to your file.
Cheers
Thibaut
==============================
Dr Thibaut Jombart
MRC Centre for Outbreak Analysis and Modelling
Department of Infectious Disease Epidemiology
Imperial College - School of Public Health
Norfolk Place, London W2 1PG, UK
Tel. : 0044 (0)20 7594 3658
http://sites.google.com/site/thibautjombart/
http://sites.google.com/site/therepiproject/
http://adegenet.r-forge.r-project.org/
Twitter: @thibautjombart
________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org> [adegenet-forum-bounces at lists.r-forge.r-project.org<mailto:adegenet-forum-bounces at lists.r-forge.r-project.org>] on behalf of Ella Bowles [ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>]
Sent: 24 September 2015 20:07
To: adegenet-forum at lists.r-forge.r-project.org<mailto:adegenet-forum at lists.r-forge.r-project.org>
Subject: [adegenet-forum] adegenet not recognizing file extensions
Hello,
I'm trying to read files into adegenet and convert to genind objects, but am getting an error. After I have correctly specified/set the directory that the files are in I have used the line
data <- read.genetix(system.file("8c9.gtx", package = "adegenet"))
for many different permutations of filetype. These include read.genepop for genepop files, read.structure for structure filies. I keep getting the error
Converting data from GENETIX to a genind object...
Error in if (toupper(.readExt(file)) != "GTX") stop("File extension .gtx expected") :
argument is of length zero
The thing that I can see as the possible issue is that my files originally had different extensions (from the populations program of stacks). They were previously ".genepop" and ".strucuture", and I changed them manually to the ".gen" and ".stru" suffixes. Can you see a way around this?
With thanks,
Ella
--
Ella Bowles
PhD Candidate
Biological Sciences
University of Calgary
e-mail: ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>, bowlese at gmail.com<mailto:bowlese at gmail.com>
website: http://ellabowlesphd.wordpress.com/
--
Ella Bowles
PhD Candidate
Biological Sciences
University of Calgary
e-mail: ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>, bowlese at gmail.com<mailto:bowlese at gmail.com>
website: http://ellabowlesphd.wordpress.com/
--
Ella Bowles
PhD Candidate
Biological Sciences
University of Calgary
e-mail: ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>, bowlese at gmail.com<mailto:bowlese at gmail.com>
website: http://ellabowlesphd.wordpress.com/
--
Ella Bowles
PhD Candidate
Biological Sciences
University of Calgary
e-mail: ebowles at ucalgary.ca<mailto:ebowles at ucalgary.ca>, bowlese at gmail.com<mailto:bowlese at gmail.com>
website: http://ellabowlesphd.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150929/7ade4eeb/attachment.html>
More information about the adegenet-forum
mailing list