cannot open fasta file, Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector")
Entering edit mode
hoonhuiyi • 0
Last seen 12 months 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 • 496 views
Entering edit mode

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

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"’
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.

Entering edit mode
ronoevan • 0
Last seen 18 days ago

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


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.




Login before adding your answer.

Traffic: 350 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6