Entering edit mode
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
I see. I tried to upload settings but:
what tool am I missing? Which of the packages I did not install are vital for this step? Thank you
Actually, it looks like it is working fine. case closed.