Hello, I am trying to load a fast file with the package 'openPrimeR'. The manual (https://www.bioconductor.org/packages/release/bioc/vignettes/openPrimeR/inst/doc/openPrimeR_vignette.html) says to use:
fasta.file <- system.file("extdata", "IMGT_data", "templates", "Homo_sapiens_IGH_functional_exon.fasta", package = "openPrimeR") # Load the template sequences from 'fasta.file' seq.df.simple <- read_templates(fasta.file)
but if I give these commands to a local file:
fasta.file <- system.file("extdata", "IMGT_data", "templates", "stx.fa", package = "openPrimeR") fasta.file <- system.file("stx.fa", package = "openPrimeR")
where stx.fa il the file I wanted to open and that is present in the working directly. I get only an empty object. What am I getting wrong? Thank you
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library("openPrimeR") There are missing/non-functioning external tools. To use the full potential of openPrimeR, please make sure that the required versions of the speciied tools are installed and that they are functional: o MELTING (http://www.ebi.ac.uk/biomodels/tools/melting/) o ViennaRNA (http://www.tbi.univie.ac.at/RNA/) o OligoArrayAux (http://unafold.rna.albany.edu/OligoArrayAux.php) o MAFFT (http://mafft.cbrc.jp/alignment/software/) o Pandoc (http://pandoc.org) Warning messages: 1: In fun(libname, pkgname) : 'Pandoc' is non-functional, since 'pdflatex' is not installed on your system. 2: In parallel_setup(default.nbr.cores) : Please install 'doParallel' to use multiple cores. > fasta.file <- system.file("/home/gigiux/Documents/PCR_Book/stx.fa", package = "openPrimeR") > fasta.file  "" > sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0 locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_US.UTF-8  LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C  LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  openPrimeR_1.12.1 loaded via a namespace (and not attached):  Rcpp_1.0.6 plyr_1.8.6 pillar_1.4.7 compiler_4.0.3  RColorBrewer_1.1-2 GenomeInfoDb_1.26.2 XVector_0.30.0 bitops_1.0-6  iterators_1.0.13 tools_4.0.3 zlibbioc_1.36.0 lifecycle_1.0.0  tibble_3.0.6 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.10  foreach_1.5.1 rstudioapi_0.13 parallel_4.0.3 GenomeInfoDbData_1.2.4  stringr_1.4.0 dplyr_1.0.4 Biostrings_2.58.0 generics_0.1.0  S4Vectors_0.28.1 vctrs_0.3.6 IRanges_2.24.1 stats4_4.0.3  grid_4.0.3 tidyselect_1.1.0 glue_1.4.2 R6_2.5.0  reshape2_1.4.4 ggplot2_3.3.3 purrr_0.3.4 magrittr_2.0.1  scales_1.1.1 codetools_0.2-18 ellipsis_0.3.1 BiocGenerics_0.36.0  GenomicRanges_1.42.0 colorspace_2.0-0 stringi_1.5.3 lpSolveAPI_126.96.36.199-17.7  RCurl_1.98-1.2 munsell_0.5.0 crayon_1.4.1
I tried but:
Anyway, with this two-step approach the file is read, so case closed. Thanks
@marongiu.luigi If you carefully check your code, you will notice that you had a typo in the filename. The first time you entered
styx.fasta, the second time
stx.fa. Passing a variable or a value does not make a difference.
@Santiago Edilberto: Please check whether your file exists and is a properly formatted FASTA file.
How do I know if my file is properly formatted FASTA file?
A FASTA file is a raw text file (not MS Word or the likes), with a specific structure, along the likes of:
More information is available on Wikipedia.
How can I download a FASTA file for BRCA1??
I tried with the code that you told me but now I have the error of quot not found