loading data using dartR

95 views
Skip to first unread message

Will Purser

unread,
Oct 28, 2020, 9:34:24 AM10/28/20
to dartR
Hey guys, I've been trying to run the dartR package and seem to be running into some issues. I'm trying to load some SNP data from Diversity Arrays and it keeps coming up with an error message. It'd be great if someone could please give me some insight into what the issue is, or how I might go about fixing it Thanks in advance!

Error Message:
Error in file(file, "rt") : cannot open the connection



Dale Maschette

unread,
Oct 28, 2020, 11:02:51 AM10/28/20
to da...@googlegroups.com
Hi Will,
Can you post the code that is producing the error as well? That error is usually filepath related.

-Dale

Sent from the village hidden in the leaves

Arthur Georges

unread,
Oct 28, 2020, 7:37:55 PM10/28/20
to da...@googlegroups.com
I agree with Dale. RStudio is looking in the wrong place for the file. Maybe check your setwd statement.

A

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/ced30d39-eb6f-45e7-afcb-1e1ed578d0fan%40googlegroups.com.


--
---------------------------------------------------------------------------------------------------------------------------
D-Prof. Arthur Georges
Institute for Applied Ecology, University of Canberra ACT 2601 Australia
Deliveries: Bld 3 Stores, Kirinari Street, Bruce ACT 2617
Tel : +61 (0)2 6201 5786  Fax: +61 (0)2 6201 5305  Mobile: +61 (0)418 866741
WWW: http://georges.biomatix.org
   ORCID ID: http://orcid.org/0000-0003-2428-0361

Will Purser

unread,
Oct 28, 2020, 11:41:12 PM10/28/20
to dartR
Hey Guys, thanks for the quick response. I'll copied the code below (up until where I'm encountering the error message).

rm(list=ls())
install.packages("devtools")
library(devtools)
install_github("green-striped-gecko/dartR")
library(dartR)


# Create a directory, place the sample files in it, and point to it.

#where the original data is stored
data = "~/cloudstor/Litoria_rubella/01_original_data/genetic/Report-DLit20-5353/"
#where you want all the analyses to output
home = "~/cloudstor/Litoria_rubella/02_genetic/01_structure/"
#set directory to the data folder location
setwd("C:/Users/Willis/cloudstor/Shared/Litoria_rubella/01_original_data/genetic/Report-DLit20-5353")


# Read in the data and assign the individual metadata.
  gl <- gl.read.dart(filename = "Report_DLit20-5353_SNP_mapping_2.csv", ind.metafile = "~/cloudstor/Litoria_rubella/01_original_data/genetic/metadata/rubella_locations.csv")

Bernd.Gruber

unread,
Oct 29, 2020, 12:21:58 AM10/29/20
to da...@googlegroups.com

Hi,

 

Can you try to copy your data locally and then run the function.

 

Though in principal why that should not work if the files are in you specified cloudstore folders.

 

If you want to check you can write:

 

dir() # here you should see your Report_DLit20-5353_SNP_mapping_2.csv file (as you used to set via setwd())

 

and via

 

dir("~/cloudstor/Litoria_rubella/01_original_data/genetic/metadata/”)

 

you should see your ind.meta file

 

 

Maybe easier to copy you ind.metafile into the folder where your dart report is to make sure R can find it.

 

Hope that helps,

 

Bernd

 

 

 

==============================================================================

Dr Bernd Gruber                                              )/_         

                                                         _.--..---"-,--c_    

Professor Ecological Modelling                      \|..'           ._O__)_     

Tel: (02) 6206 3804                         ,=.    _.+   _ \..--( /          

Fax: (02) 6201 2328                           \\.-''_.-' \ (     \_          

Institute for Applied Ecology                  `'''       `\__   /\          

Faculty of Science and Technology                          ')                

University of Canberra   ACT 2601 AUSTRALIA

Email: bernd....@canberra.edu.au

WWW: bernd-gruber

 

Australian Government Higher Education Provider Number CRICOS #00212K 

NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.

==============================================================================

Reply all
Reply to author
Forward
0 new messages