drostlab / metablastr

Seamless Integration of BLAST Sequence Searches in R
https://drostlab.github.io/metablastr/
GNU General Public License v2.0
31 stars 8 forks source link

Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector") : cannot open file '' #13

Closed katievigil closed 1 year ago

katievigil commented 1 year ago

Hi I finally downloaded Blast+ and created the pathway to R. Now I am having issues loading my fasta file. Thanks!

I tried to load it from my hard drive and from my desktop and get the same errors:

sealionfeces <- readDNAStringSet("H:/ONRdolphinsealionpooled/sealionfecespooled/canu/medaka/consensus.fasta", + package = "rBLAST")) Error: unexpected ')' in: " sealionfeces <- readDNAStringSet("H:/ONRdolphinsealionpooled/sealionfecespooled/canu/medaka/consensus.fasta", package = "rBLAST"))"

sealionfeces <- readDNAStringSet(system.file("H:/ONRdolphinsealionpooled/sealionfecespooled/canu/medaka/consensus.fasta", + package = "rBLAST")) Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector") : cannot open file ''

sealionfeces <- readDNAStringSet(system.file("C:\Users\katie\OneDrive\Desktop\R\sealionfecespooled.consensus.fasta", Error: '\U' used without hex digits in character string starting ""C:\U"

sealionfeces <- readDNAStringSet(system.file("C:/Users/katie/OneDrive/Desktop/R/sealionfecespooled.consensus.fasta", + package = "rBLAST")) Error in .Call2("new_input_filexp", filepath, PACKAGE = "XVector") : cannot open file ''

  | >

katievigil commented 1 year ago

Hi, This ended up working:

sealionfeces <- readDNAStringSet(filepath="H:/ONRdolphinsealionpooled/sealionfecespooled/canu/medaka/consensus.fasta", + format="fasta")

sealionfeces DNAStringSet object of length 544: width seq names [1] 2097 GTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTACAC...AACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAAC tig00000561 [2] 1359 TGTGCTTCGTTCAGTTACGTATTGCTAAGGTTAAAACCAAGAC...TCTTGGTTTTAACCTTAGCAATACGTAACTGAACGAAGCACA tig00000101 [3] 1043 TTGCTTCGTTCGGTTACGTATTGCTAAGGTTAAAAGGTTACAC...TTGTGTAACCTTTTAACCTTAGCAATACGTAACTGAACGAAG tig00000348 [4] 1150 TTGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTAC...GTGTAACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTA tig00000123 [5] 1211 GTTGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTA...AACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAAC tig00000470 ... ... ... [540] 1438 TACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTACACA...TAACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAA tig00000160 [541] 1410 GTTGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTA...TAACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAA tig00000117 [542] 1355 TGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTACA...AGGGTTTGTGTAACCTTTTAACCTTAGCAATACGTAACTGAA tig00000351 [543] 1529 TGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTACA...AACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAAC tig00000277 [544] 1540 GTTGTACTTCGTTCAGTTACGTATTGCTAAGGTTAAAAGGTTA...AACCTTTTAACCTTAGCAATACGTAACTGAACGAAGTACAAC tig00000436

HajkD commented 1 year ago

Hi,

The function system.file(...) refers to the example file path in the package. It is not intended to be copied for your own path.

I hope this helps.