cannot open fasta file, Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector")
1
0
Entering edit mode
hoonhuiyi • 0
@hoonhuiyi-23342
Last seen 4.6 years ago

Hi I'm trying to align some sequences in a fasta file. The sequences are in fasta format already and the file path is correct but it kept having an error that says it cannot open file. The following are the commands from the tutorial of multiple sequence alignment in R.

>  # specify the path to your sequence file:
>  fas <- "C:/Users/Hui Yi/Documents/Acc5"
> dna <- readDNAStringSet(fas)
Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector") : 
  cannot open file 'C:/Users/Hui Yi/Documents/Acc5'

What should I do? Thanks a lot

software error • 6.8k views
ADD COMMENT
0
Entering edit mode

Does teh file have an extension like 'Acc5.fa'? What does file.exists("C:/Users/Hui Yi/Documents/Acc5") return?

ADD REPLY
0
Entering edit mode

Thank you Martin, I have managed to open the file by checking for the correct file name in properties. For designing primers to target the Accumulibacter out of other non target bacteria, how does the software define groups, is it able to place all accumulibacter sequences under the same identifier? or should i use the output file after phylogeny classification has been done?

Also, there is an error when trying to define groups from the sequence database created:

> # get the FASTA record description
>  desc <- dbGetQuery(dbConn, "select description from Seqs")
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"character", "character"’
ADD REPLY
0
Entering edit mode

Sorry, your question doesn't have enough context for me to understand what you are doing. Also, it is really a new question, now that your original problem (reading the fasta file) seems to have been solved. You should ask a new question, and provide more information about what you are trying to do and the software that you are using.

ADD REPLY
0
Entering edit mode
ronoevan • 0
@0409d872
Last seen 3.6 years ago
Germany

Hello Hoonhuiyi ,

It means R is searching for your file in a wrong place i.e. your current working directory where your R is searching for it, is a different place from where you actually saved your file, so it cant find it.

Run this to see the place where R is searching for your file to open

getwd()

Then save the file in the current working directory, so that R finds and opens it.

If not, tell R exactly where your file is saved, by setting a path to the right working directory using

setwd() #Input the right path to your file

or use

choose.file()#to locate and open manually.

Play around with any code that gives the correct path to your file.

Best,

Evans

ADD COMMENT

Login before adding your answer.

Traffic: 951 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6