Hi all,
I am having some difficulty with the read.cross() function in r/qtl. The main error I receive is: Error in file(file, "rt"): cannot open the connection. Additionally I sometimes get the error: cannot open file 'D:/Users/larab/Chilling-F2/populations.1': Permission denied. Anybody have this problem before and/or know how to overcome?
I am not sure what I am doing wrong. I’ve tried several different code combinations. I am able to read my files in with read.csv() and read.table() so I am confused about what does not work with read.cross(). I output the genotype from stacks v2.6 populations rqtl F2 format.
Attempts:
setwd("D:/Users/larab/Chilling-F2")
#setwd("D:/Users/larab/Chilling-F2/populations.1")
mydata <- read.cross("csv", "",
dir="D:/Users/larab/Chilling-F2/populations.1",
genfile="populations.F2.rqtl.csv",
phefile="necrosis.csv"
)
#Error in file(file, "rt") : cannot open the connection
#In addition: Warning message:
# In file(file, "rt") :
# cannot open file 'D:/Users/larab/Chilling-F2/populations.1': Permission denied
phenotypes <- read.table("necrosis.csv")
genotypes <- read.table("populations.F2.rqtl.csv")
setwd("D:/Users/larab/Chilling-F2/populations.1")
mydata <- read.cross("csv", "",
dir="/",
genfile= genotypes,
phefile= phenotypes
)
#same error as above
mydata <- read.cross("csv", "",
dir="/populations.1",
genfile="populations.F2.rqtl.csv",
phefile="necrosis.csv"
)
#Error in file(file, "rt") : cannot open the connection
#In addition: Warning message:
# In file(file, "rt") :
# cannot open file '/populations.1': No such file or directory
setwd("D:/Users/larab/Chilling-F2/")
mydata <- read.cross(format="csv",
dir="populations.1",
genfile="populations.F2.rqtl.csv",
phefile="necrosis.csv"
)
#same error as above
setwd("D:/Users/larab/Chilling-F2")
mydata <- read.cross(format="csv", " ",
dir="populations.1",
genfile="populations.F2.rqtl.csv",
phefile="necrosis.csv"
)
#same error as above
setwd("D:/Users/larab/Chilling-F2")
mydata <- read.cross(format="csv",
dir="./populations.1",
genfile="populations.F2.rqtl.csv",
phefile="necrosis.csv"
)
#same error as above
mydata <- read.cross(format="csv", " ",
dir="",
genfile="D:\\Users\\larab\\Chilling-F2\\populations.F2.rqtl.csv",
phefile="D:\\Users\\larab\\Chilling-F2\\necrosis.csv"
)