Load templates from openPrimeR
0
0
Entering edit mode
@936f2610
Last seen 19 months ago
Mexico

Hi, I tried to uploead my template but I'm having this error, do I need to had an especific format for ma Fasta file?

> 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)
   The number of cores for was set to '2' by 'parallel_setup()'
> fasta.file <- system.file("/Downloads/secuence.fasta", package = "openPrimeR")

> fasta.file
Error: unexpected '>' in ">"
> fasta.file <- system.file("/Downloads/secuence.fasta", package = "openPrimeR")
> fasta.file
[1] ""
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Manjaro Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.11.0
LAPACK: /usr/lib/liblapack.so.3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] openPrimeR_1.20.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10             plyr_1.8.8              pillar_1.8.1           
 [4] compiler_4.2.2          RColorBrewer_1.1-3      GenomeInfoDb_1.34.7    
 [7] XVector_0.38.0          bitops_1.0-7            iterators_1.0.14       
[10] tools_4.2.2             zlibbioc_1.44.0         lifecycle_1.0.3        
[13] tibble_3.1.8            gtable_0.3.1            pkgconfig_2.0.3        
[16] rlang_1.0.6             foreach_1.5.2           cli_3.6.0              
[19] GenomeInfoDbData_1.2.9  stringr_1.5.0           dplyr_1.1.0            
[22] Biostrings_2.66.0       generics_0.1.3          S4Vectors_0.36.1       
[25] vctrs_0.5.2             IRanges_2.32.0          stats4_4.2.2           
[28] grid_4.2.2              tidyselect_1.2.0        glue_1.6.2             
[31] R6_2.5.1                fansi_1.0.4             reshape2_1.4.4         
[34] ggplot2_3.4.0           magrittr_2.0.3          codetools_0.2-18       
[37] scales_1.2.1            BiocGenerics_0.44.0     GenomicRanges_1.50.2   
[40] colorspace_2.1-0        utf8_1.2.2              stringi_1.7.12         
[43] lpSolveAPI_5.5.2.0-17.9 RCurl_1.98-1.10         munsell_0.5.0          
[46] crayon_1.5.2           
> fasta.file <- "secuence.fasta"
> seq.df <- read_templates(fasta.file)
Error in read_templates_single(fname, hdr.structure = hdr.structure, delim = delim,  : 
  Unsupported template input file type or error reading data for file: 'secuence.fasta'

My FASTA file has this format, do I have to convert it to .fa?

>NC_000017.11:c41277500-41196312 Homo sapiens chromosome 17, GRCh38.p14 Primary Assembly
GAGGTATAATTAACAAATAAAAATTGTGTATATGTAAGGTATAAAAGGTTATGTTTTGAGGTATATATAT ATATACAGTGTGAAATAATAATATATTTATTAGCTCACATAGTCACCATTTCCTTTTTATTGTTGTGGTG TGAACATTTAAGATCCACTTTCTCAGCAAATTTCAGGTATACAATAAAGTATTTTAAACTATGTCCACAT TAGAGTGCACCAGATCTGCAGAACATATTCGTCTTATATAACTGATGTTGGTCATGAGAATGTGCTAGTT
PCRmultiplex openPrimeR • 838 views
ADD COMMENT
0
Entering edit mode

I also tried this but it isn't working

    > library(openPrimeR)}
Error: unexpected '}' in "library(openPrimeR)}"
>  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)
The number of cores for was set to '2' by 'parallel_setup()'.
> read_templates("secuence.fasta"BRCA1.fasta)
Error: unexpected '&' in "read_templates(&"
> read_templates("/home/Downloads/BRCA1.fasta")
Error: unexpected '&' in "read_templates(&"
> read_templates(quot;/home/Downloads/BRCA1.fastaquot;)
Error: unexpected ';' in "read_templates(quot;"
> read_templates(quot/home/Downloads/BRCA1.fastaquot)
Error in read_templates(quot/home/Downloads/BRCA1.fastaquot) : 
  object 'quot' not found
ADD REPLY
0
Entering edit mode

Your code is actually incorrect. Try it again with the right quotations, e.g. like this:

read_templates("/home/Downloads/BRCA1.fasta")

ADD REPLY
0
Entering edit mode

I got the same error

 > read_templates("/home/Downloads/BRCA1.fasta")
    Error in read_templates_single(fname, hdr.structure = hdr.structure, delim = delim,  : 
      Unsupported template input file type or error reading data for file: '/home/Downloads/BRCA1.fasta'

I saw that rdrr.io has this code for the validate templates, I dont know if I need this format or no.

validate_templates <-  function(object) {
# specify minimal set of columns that should be present in a template data frame:
errors <- NULL
required.fields <- list("ID" = "character", "Header" = "character", 
              "Identifier" = c("integer", "numeric"), "Sequence_Length" = c("integer", "numeric"),
              "Group" = "character", "Allowed_Start_fw" = c("integer", "numeric"),
              "Allowed_End_fw" = c("integer", "numeric"), "Allowed_Start_rev" = c("integer", "numeric"),
              "Allowed_End_rev" = c("integer", "numeric"), "Allowed_fw" = "character", "Allowed_rev" = "character",
              "Allowed_Start_fw_initial" = c("integer", "numeric"), "Allowed_End_fw_initial" = c("integer", "numeric"), 
              "Allowed_Start_rev_initial" = c("integer", "numeric"),
              "Allowed_End_rev_initial" = c("integer", "numeric"), "Sequence" = "character",
              "Run" = "character")
if (!is(object, "data.frame")) {
    errors <- c(errors, "Input was no data frame.")
    return(FALSE)
}
possible.fields <- NULL # don't check for additional fields here
check.fields <- check_setting(possible.fields, object, required.fields)
if (is.character(check.fields)) {
    errors <- c(errors, check.fields)
}
if (length(errors) != 0) {
    return(errors) 
} else {
    # ensure that 'Run' is unique
    check.run <- length(unique(object$Run)) <= 1
    if (check.run) {
        return(TRUE)
    } else {
        msg <- "The 'Run' column may only contain a single unique value."
        return(msg)
    }
}
ADD REPLY
0
Entering edit mode

Case close, it was my error for not putting the correct quotations, thanks for helping me.

> read_templates("/home/lab13/Documents/SantiagoEdilberto/BRCA1.fasta") 
                       ID                  Header   Group Identifier
1 >BRCA8|IGKV1-12*01|H... >BRCA8|IGKV1-12*01|H... default          1
2 >BRCA9|IGKV1-12*02|H... >BRCA9|IGKV1-12*02|H... default          2
3 >BRCA13|IGKV1-12*02|... >BRCA13|IGKV1-12*02|... default          3
  Sequence_Length Allowed_Start_fw Allowed_End_fw Allowed_Start_rev
1             600                1             30               571
2             660                1             30               631
3             600                1             30               571
  Allowed_End_rev              Allowed_fw             Allowed_rev
1             600 ggtcttgccctgttgccagg... tcttggtcatttgacagttc...
2             660 tcaactagaagtttctaaag... catgccaccacacccggtta...
3             600 ccctataagccagaatccag... tcaagcaatcctcccacctt...
  Allowed_Start_fw_ali Allowed_End_fw_ali Allowed_Start_fw_initial
1                    1                 30                        1
2                    1                 30                        1
3                    1                 30                        1
  Allowed_End_fw_initial Allowed_Start_fw_initial_ali
1                     30                            1
2                     30                            1
3                     30                            1
  Allowed_End_fw_initial_ali Allowed_Start_rev_ali Allowed_End_rev_ali
1                         30                   571                 600
2                         30                   631                 660
3                         30                   571                 600
  Allowed_Start_rev_initial Allowed_End_rev_initial
1                       571                     600
2                       631                     660
3                       571                     600
  Allowed_Start_rev_initial_ali Allowed_End_rev_initial_ali
1                           571                         600
2                           631                         660
3                           571                         600
                 Sequence           InputSequence   Run
1 ggtcttgccctgttgccagg... ggtcttgccctgttgccagg... BRCA1
2 tcaactagaagtttctaaag... tcaactagaagtttctaaag... BRCA1
3 ccctataagccagaatccag... ccctataagccagaatccag... BRCA1
ADD REPLY

Login before adding your answer.

Traffic: 539 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