How to define settings for design primers with openPrimeR?
1
0
Entering edit mode
@marongiuluigi-7134
Last seen 3.7 years ago
European Union

I am trying to design primers with openPrimeR but I don't understand how to set the settings object. I got:

> fasta.file <- "stx.fa"
> seq.df <- read_templates(fasta.file)
> seq.df$Header
[1] ">MW311073.1 Escherichia coli strain XP2F shiga toxin 2 (stx2) gene, partial cds"
> design_primers(
+   seq.df,
+   mode.directionality = "both",
+   settings,
+   init.algo = "naive",
+   opti.algo = "Greedy",
+   required.cvg = 1,
+   timeout = Inf,
+   max.degen = 16,
+   conservation = 1,
+   sample.name = NULL,
+   cur.results.loc = NULL,
+   primer.df = NULL,
+   updateProgress = NULL
+ )
Error in design_primers(seq.df, mode.directionality = "both", settings,  : 
  object 'settings' not found

So I instantiated a settings object:

> settings <- list()
> constraints(settings)$primer_length <- c("min" = 18, "max" = 18)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘constraints’ for signature ‘"list"’
> conOptions(settings)$allowed_mismatches <- 0
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘conOptions’ for signature ‘"list"’

What is the correct way to define the settings for the primers and design them? Thank you

> 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:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] openPrimeR_1.12.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6              plyr_1.8.6              pillar_1.4.7            compiler_4.0.3         
 [5] RColorBrewer_1.1-2      GenomeInfoDb_1.26.2     XVector_0.30.0          prettyunits_1.1.1      
 [9] progress_1.2.2          bitops_1.0-6            iterators_1.0.13        tools_4.0.3            
[13] zlibbioc_1.36.0         lifecycle_1.0.0         tibble_3.0.6            gtable_0.3.0           
[17] pkgconfig_2.0.3         rlang_0.4.10            foreach_1.5.1           rstudioapi_0.13        
[21] parallel_4.0.3          GenomeInfoDbData_1.2.4  stringr_1.4.0           dplyr_1.0.4            
[25] hms_1.0.0               Biostrings_2.58.0       generics_0.1.0          S4Vectors_0.28.1       
[29] vctrs_0.3.6             IRanges_2.24.1          ade4_1.7-16             stats4_4.0.3           
[33] grid_4.0.3              tidyselect_1.1.0        glue_1.4.2              R6_2.5.0               
[37] distr_2.8.0             seqinr_4.2-5            reshape2_1.4.4          ggplot2_3.3.3          
[41] purrr_0.3.4             magrittr_2.0.1          sfsmisc_1.1-8           MASS_7.3-53.1          
[45] scales_1.1.1            codetools_0.2-18        ellipsis_0.3.1          BiocGenerics_0.36.0    
[49] GenomicRanges_1.42.0    colorspace_2.0-0        startupmsg_0.9.6        stringi_1.5.3          
[53] lpSolveAPI_5.5.2.0-17.7 RCurl_1.98-1.2          munsell_0.5.0           crayon_1.4.1
openPrimeR • 1.2k views
ADD COMMENT
1
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 21 days ago
Republic of Ireland

I do not believe settings is a list object. Can you take a look at the vignette under section Loading and writing settings: Loading and writing settings

It is always a good idea to run through a vignette in its entirety before proceeding with your own analysis.

Kevin

ADD COMMENT
0
Entering edit mode

I see. I tried to upload settings but:

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

> list.files(system.file("extdata", "settings", package = "openPrimeR"), pattern = "*\\.xml")
[1] "A_Taq_PCR_design.xml"          "B_Taq_PCR_evaluate.xml"        "C_Taq_PCR_high_stringency.xml"
> settings.xml <- system.file("extdata", "settings", 
+                             "C_Taq_PCR_high_stringency.xml", package = "openPrimeR")
> settings <- read_settings(settings.xml)
Reading settings file: C_Taq_PCR_high_stringency.xml
Due to missing external tools the following constraints were ignored:cross_dimerization,secondary_structure,self_dimerization
Due to missing external tools the following coverage constraints were ignored:coverage_model

what tool am I missing? Which of the packages I did not install are vital for this step? Thank you

ADD REPLY
0
Entering edit mode

Actually, it looks like it is working fine. case closed.

ADD REPLY

Login before adding your answer.

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