Open zdellaert opened 1 year ago
Hi! I am still working through the week 12 exercise and getting this error when moving into R studio from terminal:
filename <- read.pcadapt("SNP.TRSdp5p05FHWE2A.recode.vcf", type = "vcf" ) Error in file2other(input, type, match.arg(type.out), match.arg(allele.sep)) : File SNP.TRSdp5p05FHWE2A.recode.vcf does not exist.
I am guessing this means that R studio isn't recognizing this file from terminal (I checked with ls and it exists there). Any ideas how to fix that?
Hey! Not sure what your setup is, but try it again using the full file path to that vcf file.
Hey Marissa! Have you set your working directory in the Rstudio console to the same as it was in your terminal when you created that file? In terminal the command is cd ~/Week12
(or whatever your path would be) and in the Rstudio console it would be setwd("~/Week12")
.
I think that fixed it! Thanks for the help!!
In case anyone else was still working on the Week 12 assignment and running into issues with the code, I believe the code is depreciated for the current version of the hierfstat package. This is how I solved my issue (commenting out the suggested code from the "Code from class.md"):
Test Population Structure
library("hierfstat")
fstat(my_genind)
fstatic <- genind2hierfstat(my_genind)
matFst <- pairwise.fst(my_genind)
matFst <- pairwise.neifst(fstatic) matFst_WC <- pairwise.WCfst(fstatic)