<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi again,
<br>
<br>
I think a quadruple check is in order ;) <br>
<br>
The extension of the file you sent is wrong. It is a .str.tsv file (?) while the correct extension should read .str. Seeing your command line, I suspect windows is hiding extensions by default on your computer, and so you are assuming there is a file called
<br>
<br>
<font size="1">C:/Users/Ella Bowles/Desktop/batch_1_8c9.str<br>
<br>
<font size="2">where there is none - your file must be, in fact</font><br>
</font><br>
<font size="1">C:/Users/Ella Bowles/Desktop/batch_1_8c9.str.tsv<br>
<br>
<br>
</font>After correcting the extension it all works for me:<br>
<br>
<font face="Courier New"><br>
> library(adegenet)<br>
Loading required package: ade4<br>
   /// adegenet 2.0.1 is loaded ////////////<br>
<br>
   > overview: '?adegenet'<br>
   > tutorials/doc/questions: 'adegenetWeb()' <br>
   > bug reports/feature resquests: adegenetIssues()<br>
<br>
<br>
> x=read.structure("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)<br>
<br>
 Which other optional columns should be read (press 'return' when done)? 1: <br>
<br>
 Converting data from a STRUCTURE .stru file to a genind object... <br>
<br>
> x<br>
/// GENIND OBJECT /////////<br>
<br>
 // 186 individuals; 4,099 loci; 8,198 alleles; size: 7.7 Mb<br>
<br>
 // Basic content<br>
   @tab:  186 x 8198 matrix of allele counts<br>
   @loc.n.all: number of alleles per locus (range: 2-2)<br>
   @loc.fac: locus factor for the 8198 columns of @tab<br>
   @all.names: list of allele names for each locus<br>
   @ploidy: ploidy of each individual  (range: 2-2)<br>
   @type:  codom<br>
   @call: read.structure(file = "batch_1_8c9.str", n.ind = 186, n.loc = 4099, <br>
    onerowperind = FALSE, col.lab = 1, col.pop = 2, col.others = NULL, <br>
    row.marknames = 2, NA.char = "0", ask = TRUE)<br>
<br>
 // Optional content<br>
   @pop: population of each individual (group size range: 12-20)<br>
<br>
<br>
<font face="Tahoma">And yes, in case you wonder, window$ is an evil system and probably hates all of us.<br>
 </font><br>
</font>
<div><font size="2">Cheers<br>
Thibaut<br>
</font>
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText"><br>
<br>
</div>
</span></font></div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF597447"><font face="Tahoma" size="2" color="#000000"><b>From:</b> bowlese@gmail.com [bowlese@gmail.com] on behalf of Ella Bowles [ebowles@ucalgary.ca]<br>
<b>Sent:</b> 29 September 2015 18:01<br>
<b>To:</b> Jombart, Thibaut<br>
<b>Subject:</b> Re: [adegenet-forum] adegenet not recognizing file extensions<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:large; color:#0000ff">Hi Thibaut,</div>
<div class="gmail_default" style="font-size:large; color:#0000ff"><br>
</div>
<div class="gmail_default" style="font-size:large; color:#0000ff">I checked, double and triple checked, and it is correct. Can you read it in?</div>
<div class="gmail_default" style="font-size:large; color:#0000ff"><br>
</div>
<div class="gmail_default" style="font-size:large; color:#0000ff">I don't think this should be an issue, but the only thing that seems potentially amiss is that after I use the read.structure line R always asks for which other optional columns should be read.
 I just press enter here, so no other columns are read. Just seems weird that I would be getting a warning that looks like it should be for a filepath. Also, I'm running R v 3.2.2. </div>
<div class="gmail_default" style="font-size:large; color:#0000ff"><br>
</div>
<div class="gmail_default" style="font-size:large; color:#0000ff">Will be good to know if you can read in the file.</div>
<div class="gmail_default" style="font-size:large; color:#0000ff"><br>
</div>
<div class="gmail_default" style="font-size:large; color:#0000ff">Cheers</div>
<div class="gmail_default" style="font-size:large; color:#0000ff"><br>
</div>
<div class="gmail_default" style="font-size:large; color:#0000ff">Thanks</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Sep 29, 2015 at 4:01 AM, Jombart, Thibaut <span dir="ltr">
<<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Ella,
<br>
<br>
<div><font size="2">It looks like the path to your file is incorrect  - can you double-check?<br>
<br>
Cheers<br>
Thibaut<br>
</font>
<div style="font-family:Tahoma; font-size:13px">
<div><font size="2"><span style="font-size:10pt">
<div><br>
</div>
</span></font></div>
</div>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b>
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a> [<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a>] on behalf of Ella Bowles [<a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>]<br>
<b>Sent:</b> 28 September 2015 18:56<br>
<b>To:</b> Jombart, Thibaut<br>
<b>Subject:</b> Re: [adegenet-forum] adegenet not recognizing file extensions<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="color:rgb(0,0,255)">
<div class="gmail_default" style="font-size:12.8px"><font size="1">Hi Thibaut,</font></div>
<div class="gmail_default" style="font-size:12.8px"><font size="1"><br>
</font></div>
<div class="gmail_default" style="font-size:12.8px"><font size="1">I'm now using the line (all in one line)</font></div>
<div class="gmail_default" style="color:rgb(34,34,34)">
<div class="gmail_default" style="font-size:12.8px; color:rgb(0,0,255)"><font size="1">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)</font></div>
<div style="font-size:12.8px; color:rgb(0,0,255)"><font size="1"><br>
</font></div>
<div style="font-size:12.8px; color:rgb(0,0,255)"><font size="1">for the attached dataset</font></div>
<div style="font-size:12.8px; color:rgb(0,0,255)"><font size="1"><br>
</font></div>
<div style="font-size:12.8px; color:rgb(0,0,255)"><font size="1">and I'm still getting the error </font></div>
<div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">Which other optional columns should be read (press 'return' when done)? 1: </font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff"><br>
</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff"> Converting data from a STRUCTURE .stru file to a genind object... </font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff"><br>
</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">Error in file(file, "r") : cannot open the connection</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">In addition: Warning message:</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">In file(file, "r") :</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">  cannot open file 'C:/Users/Ella Bowles/Desktop/batch_1_8c9.str': No such file or directory</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff"><br>
</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff">Can you see what may be wrong?</font></div>
<div style="font-size:12.8px"><font size="1" color="#0000ff"><br>
</font></div>
<div><font size="1"><span style="color:rgb(0,0,255)">​Thank you for your time,</span><br>
</font></div>
</div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_default" style="color:rgb(0,0,255)"><font size="1">Ella​</font></div>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 25, 2015 at 7:16 PM, Ella Bowles <span dir="ltr">
<<a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="color:rgb(0,0,255)"><font size="1">Hi Thibaut,</font></div>
<div class="gmail_default" style="color:rgb(0,0,255)"><font size="1"><br>
</font></div>
<div class="gmail_default" style="color:rgb(0,0,255)"><font size="1">I'm now using the line (all in one line)</font></div>
<div class="gmail_default">
<div class="gmail_default" style="color:rgb(0,0,255)"><font size="1">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)</font></div>
<div style="color:rgb(0,0,255)"><font size="1"><br>
</font></div>
<div style="color:rgb(0,0,255)"><font size="1">for the attached dataset</font></div>
<div style="color:rgb(0,0,255)"><font size="1"><br>
</font></div>
<div style="color:rgb(0,0,255)"><font size="1">and I'm still getting the error </font></div>
<div>
<div><font size="1" color="#0000ff">Which other optional columns should be read (press 'return' when done)? 1: </font></div>
<div><font size="1" color="#0000ff"><br>
</font></div>
<div><font size="1" color="#0000ff"> Converting data from a STRUCTURE .stru file to a genind object... </font></div>
<div><font size="1" color="#0000ff"><br>
</font></div>
<div><font size="1" color="#0000ff">Error in file(file, "r") : cannot open the connection</font></div>
<div><font size="1" color="#0000ff">In addition: Warning message:</font></div>
<div><font size="1" color="#0000ff">In file(file, "r") :</font></div>
<div><font size="1" color="#0000ff">  cannot open file 'C:/Users/Ella Bowles/Desktop/batch_1_8c9.str': No such file or directory</font></div>
<div><font size="1" color="#0000ff"><br>
</font></div>
<div><font size="1" color="#0000ff">Can you see what may be wrong?</font></div>
<div><font size="1" color="#0000ff"><br>
</font></div>
<div><font size="1" color="#0000ff">With thanks,</font></div>
<div><font size="1" color="#0000ff">Ella</font></div>
</div>
<div style="color:rgb(0,0,255); font-size:large"><br>
</div>
</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 25, 2015 at 11:54 AM, Ella Bowles <span dir="ltr">
<<a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="font-size:large; color:#0000ff">thank you!</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 25, 2015 at 9:10 AM, Jombart, Thibaut <span dir="ltr">
<<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi there,
<br>
<br>
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.<br>
<br>
Cheers<br>
Thibaut<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div><font size="2"><span style="font-size:10pt">
<div>                <br>
==============================<br>
Dr Thibaut Jombart<br>
MRC Centre for Outbreak Analysis and Modelling<br>
Department of Infectious Disease Epidemiology<br>
Imperial College - School of Public Health<br>
Norfolk Place, London W2 1PG, UK<br>
Tel. : 0044 (0)20 7594 3658<br>
<a href="http://sites.google.com/site/thibautjombart/" target="_blank">http://sites.google.com/site/thibautjombart/</a><br>
<a href="http://sites.google.com/site/therepiproject/" target="_blank">http://sites.google.com/site/therepiproject/</a><br>
<a href="http://adegenet.r-forge.r-project.org/" target="_blank">http://adegenet.r-forge.r-project.org/</a><br>
Twitter: @thibautjombart<br>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b>
<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">
adegenet-forum-bounces@lists.r-forge.r-project.org</a> [<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>] on behalf of Ella Bowles [<a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>]<br>
<b>Sent:</b> 24 September 2015 20:07<br>
<b>To:</b> <a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">
adegenet-forum@lists.r-forge.r-project.org</a><br>
<b>Subject:</b> [adegenet-forum] adegenet not recognizing file extensions<br>
</font><br>
</div>
<div>
<div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)">Hello,</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)"><br>
</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)">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</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)"><br>
</div>
<div class="gmail_default"><font size="4" color="#0000ff">data <- read.genetix(system.file("8c9.gtx", package = "adegenet"))</font><br>
</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)"><br>
</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)">for many different permutations of filetype. These include read.genepop for genepop files, read.structure for structure filies. I keep getting the error</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)"><br>
</div>
<div class="gmail_default" style="font-size:large; color:rgb(0,0,255)">
<div class="gmail_default"> Converting data from GENETIX to a genind object... </div>
<div class="gmail_default">Error in if (toupper(.readExt(file)) != "GTX") stop("File extension .gtx expected") : </div>
<div class="gmail_default">  argument is of length zero</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">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?</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">With thanks,</div>
<div class="gmail_default">Ella</div>
</div>
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>Ella Bowles<br>
PhD Candidate </div>
<div>Biological Sciences</div>
<div>University of Calgary<br>
<br>
e-mail: <a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>,
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a></div>
<div>website: <a href="http://ellabowlesphd.wordpress.com/" rel="nofollow me" style="color:rgb(59,89,152); font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:11.2px; line-height:17px" target="_blank">http://<span style="display:inline-block"></span>ellabowlesphd.wordpre<span style="display:inline-block"></span>ss.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>Ella Bowles<br>
PhD Candidate </div>
<div>Biological Sciences</div>
<div>University of Calgary<br>
<br>
e-mail: <a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>,
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a></div>
<div>website: <a href="http://ellabowlesphd.wordpress.com/" rel="nofollow me" style="color:rgb(59,89,152); font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:11.199999809265137px; line-height:17px" target="_blank">http://<span style="display:inline-block"></span>ellabowlesphd.wordpre<span style="display:inline-block"></span>ss.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>Ella Bowles<br>
PhD Candidate </div>
<div>Biological Sciences</div>
<div>University of Calgary<br>
<br>
e-mail: <a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>,
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a></div>
<div>website: <a href="http://ellabowlesphd.wordpress.com/" rel="nofollow me" style="color:rgb(59,89,152); font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:11.199999809265137px; line-height:17px" target="_blank">http://<span style="display:inline-block"></span>ellabowlesphd.wordpre<span style="display:inline-block"></span>ss.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>Ella Bowles<br>
PhD Candidate </div>
<div>Biological Sciences</div>
<div>University of Calgary<br>
<br>
e-mail: <a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>,
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a></div>
<div>website: <a href="http://ellabowlesphd.wordpress.com/" rel="nofollow me" style="color:rgb(59,89,152); font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:11.199999809265137px; line-height:17px" target="_blank">http://<span style="display:inline-block"></span>ellabowlesphd.wordpre<span style="display:inline-block"></span>ss.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>Ella Bowles<br>
PhD Candidate </div>
<div>Biological Sciences</div>
<div>University of Calgary<br>
<br>
e-mail: <a href="mailto:ebowles@ucalgary.ca" target="_blank">ebowles@ucalgary.ca</a>,
<a href="mailto:bowlese@gmail.com" target="_blank">bowlese@gmail.com</a></div>
<div>website: <a href="http://ellabowlesphd.wordpress.com/" rel="nofollow me" style="color:rgb(59,89,152); font-family:'lucida grande',tahoma,verdana,arial,sans-serif; font-size:11.199999809265137px; line-height:17px" target="_blank">http://<span style="display:inline-block"></span>ellabowlesphd.wordpre<span style="display:inline-block"></span>ss.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>