pcruniversum / rdml Goto Github PK
View Code? Open in Web Editor NEWRDML data import for R
License: Other
RDML data import for R
License: Other
Dear kablag,
I am creating a RDML file from my raw data that I can open and inspect in the RDMLedit web-server.
However, when I try to validate my RDML file using the RDML validator at rdml.org, I get the error message
The uploaded file is not an RDML file
Also when I use RDML-Ninja v0.9.3 to validate my RDML file, I receive an error message
Error: XML parse error at line 1, column 1: error occurred while parsing element
I tried with files generated from the RDML vignette and receive the same error messages.
Any ideas about the issue?
Thanks,
janstrauss1
Below is my output from sessionInfo()
of my Rstudio session
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] labeling_0.3 ggplot2_3.0.0 withr_2.1.2 crayon_1.3.4 chipPCR_0.0.8-10 qpcR_1.4-1
[7] Matrix_1.2-14 robustbase_0.93-2 rgl_0.99.16 minpack.lm_1.2-1 MASS_7.3-50 magrittr_1.5
[13] RDML_0.9-9 backports_1.1.2
loaded via a namespace (and not attached):
[1] zoo_1.8-3 lattice_0.20-35 Rfit_0.23.0 colorspace_1.3-2
[5] miniUI_0.1.1.1 htmltools_0.3.6 rlang_0.2.2 pillar_1.3.0
[9] manipulateWidget_0.10.0 later_0.7.3 nloptr_1.0.4 readxl_1.1.0
[13] plyr_1.8.4 stringr_1.3.1 outliers_0.14 MatrixModels_0.4-1
[17] munsell_0.5.0 gtable_0.2.0 cellranger_1.1.0 htmlwidgets_1.2
[21] knitr_1.20 SparseM_1.77 httpuv_1.4.5 lmtest_0.9-36
[25] crosstalk_1.0.0 quantreg_5.36 parallel_3.5.1 DEoptimR_1.0-8
[29] Rcpp_0.12.18 xtable_1.8-2 promises_1.0.1 scales_1.0.0
[33] checkmate_1.8.5 pipeR_0.6.1.3 webshot_0.5.0 jsonlite_1.5
[37] mime_0.5 ptw_1.9-13 digest_0.6.16 stringi_1.2.4
[41] rlist_0.4.6.1 shiny_1.1.0 grid_3.5.1 tools_3.5.1
[45] tibble_1.4.2 lazyeval_0.2.1 data.table_1.11.4 xml2_1.2.0
[49] lubridate_1.7.4 R6_2.2.2 signal_0.7-6 compiler_3.5.1
Import fails, when the XML has a documentation element. My file has the following element and I receive the error message given in the title.
<documentation id="Barcode">
<text>1234567890</text>
</documentation>
I need to import uncorrected fluorescence data (no baseline subtraction and thus no software curve analysis) into R from an RDML file. When working in R with the RDML package and trying to import default RDML output from BioRad CFX Maestro v1.1 software I consistently run into the following error:
Error in (function (cq) : Assertion on 'cq' failed: May not be NA.
The import terminates at this error and no object is created. I understand that the function is unhappy about NA values in the cq but I don't know how to solve this issue to work with the data in R. This error also occurs when using RDMLedit online.
I am attaching an RDML output by Maestro (salmonid_ef1a.rdml) which fails with the above error. How can I get these Maestro files into R to work with the fluorescence data?
Dear kablag,
I am generating individual RDML files for different qPCR runs (e.g. run1, run2).
The different runs contain samples from the same experiment (e.g. exp1) and I would like to merge individual files by exp.id?
I noticed, however, that RDML currently add's a suffix to the exp.id like in my toy example below instead of merging by identical exp.id
Is there a way how I could merge by identical exp.id?
Many thanks in advance,
Jan
Dear kablag,
when I try to export a loaded RDML file from the RDMLedit web-server using Store RDML
, I get the Firefox error message
File not found
Thus, I currently don't see a way how use the RDMLedit web-server to modify RDML files.
Any suggestions what could cause the error?
Many thanks in advance,
janstrauss1
While running RDML::rdmlEdit()
I get:
> RDML::rdmlEdit()
Loading required package: shiny
Listening on http://127.0.0.1:5756
Learn different usages for shinyjs and other Shiny tricks:
https://deanattali.com/blog/advanced-shiny-tips
Attaching package: ‘shinyjs’
The following object is masked from ‘package:shiny’:
runExample
The following objects are masked from ‘package:methods’:
removeClass, show
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Loading required package: ggplot2
Attaching package: ‘ggplot2’
The following object is masked from ‘package:ggvis’:
resolution
Attaching package: ‘plotly’
The following object is masked from ‘package:ggplot2’:
last_plot
The following objects are masked from ‘package:ggvis’:
add_data, hide_legend
The following object is masked from ‘package:stats’:
filter
The following object is masked from ‘package:graphics’:
layout
Attaching package: ‘shinyMolBio’
The following object is masked from ‘package:shinyjs’:
runExample
The following object is masked from ‘package:shiny’:
runExample
Warning: Error in : shinyjs: extendShinyjs: `functions` argument must be provided. See the documentation for `?extendShinyjs` for more details.
79: stop
78: errMsg
77: extendShinyjs
> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
Matrix products: default
BLAS: /usr/lib/libopenblasp-r0.3.18.so
LAPACK: /usr/lib/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C 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 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinyMolBio_0.2 plotly_4.10.0 ggplot2_3.3.5 ggvis_0.4.7 dplyr_1.0.7 shinyjs_2.1.0 shinythemes_1.2.0
[8] shiny_1.7.1
loaded via a namespace (and not attached):
[1] tidyselect_1.1.1 purrr_0.3.4 colorspace_2.0-2 vctrs_0.3.8 generics_0.1.1 viridisLite_0.4.0
[7] htmltools_0.5.2 utf8_1.2.2 rlang_1.0.2 later_1.3.0 pillar_1.6.4 glue_1.6.0
[13] withr_2.4.2 DBI_1.1.1 RColorBrewer_1.1-3 readxl_1.3.1 lifecycle_1.0.1 stringr_1.4.0
[19] munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 htmlwidgets_1.5.4 fastmap_1.1.0 httpuv_1.6.5
[25] fansi_0.5.0 Rcpp_1.0.7 xtable_1.8-4 promises_1.2.0.1 backports_1.3.0 scales_1.1.1
[31] checkmate_2.0.0 pipeR_0.6.1.3 cachem_1.0.6 jsonlite_1.7.2 mime_0.12 digest_0.6.28
[37] stringi_1.7.6 rlist_0.4.6.2 grid_4.1.2 cli_3.1.0 tools_4.1.2 magrittr_2.0.1
[43] lazyeval_0.2.2 tibble_3.1.6 RDML_1.0 whisker_0.4 tidyr_1.1.4 crayon_1.4.2
[49] pkgconfig_2.0.3 ellipsis_0.3.2 data.table_1.14.2 xml2_1.3.2 lubridate_1.8.0 rstudioapi_0.13
[55] assertthat_0.2.1 httr_1.4.2 R6_2.5.1 compiler_4.1.2
Hi, we use this RDML package for qPCR analysis, but now we have encountered a file which I cannot open, as it has measurements for different dyes for different samples:
Samples 1-24 are measuring VIC dye, while samples 25-70 uses FAM. They are represented as separate runs in the file.
When I attempt to read in this file, I get this error:
my.rdml <- RDML$new("multidye_qPCR.rdml")
Unzipping multidye_qPCR.rdml...
Parsing data...
Getting dateMade
Getting dateUpdated
Getting id
Getting experementer
Getting documentation
Getting dye
Getting sample
Getting target
Getting thermalCyclingConditions
Getting experiment: All Wells
run: Amp Step 3_VIC
|============================================== | 50%
Error in UseMethod("xmlAttrs", node) :
no applicable method for 'xmlAttrs' applied to an object of class "NULL"
(The example file is attached)
Any suggestions how to address this issue?
Hi
I am working with Roche Lightcycler 96 files. When I open lc96p files straight from the thermal cycler there is no problem importing these files. However, when opening in lightcycler software and saving files either, as lc96p or rdml files, I get an error when importing this files with rdmlEdit(). Browser suddenly closes and R terminal says:
Listening on http://127.0.0.1:5267
Warning: Error in : Some prefixes [d2, d3] don't already exist.
Stack trace (innermost first):
72: xml_ns_rename
71: GetDilutionsRoche
70: fromRDML
69: .subset2(public_bind_env, "initialize")
68: RDML$new
67: eval [/home/galo/R/x86_64-pc-linux-gnu-library/3.3/RDML/RDMLedit/server.R#62]
66: eval
65: withProgress
58: isolate
57: observerFunc [/home/galo/R/x86_64-pc-linux-gnu-library/3.3/RDML/RDMLedit/server.R#54]
2: shiny::runApp
1: rdmlEdit
Bests
Hi,
I would like to inspect some lightcycler 96 files (*.lc96p ) and came along your nice shiny app.
When i try to load a file into the app, it unfortunately crashes with following error/warning:
"Warning: Error in <-: attempt to set an attribute on NULL"
I looked at server.R but could not spot an obvious bug.
Could you help me resolve this issue?
Thank you,
Michel
Error log:
rdmlEdit()
Listening on http://127.0.0.1:3839
Warning: Error in <-: attempt to set an attribute on NULL
65: GetDilutionsRoche
64: fromRDML
63: initialize
62: RDML$new
46: observe [C:\Users\michelmo\Documents\R\win-library\4.1\RDML\RDMLedit/server.R#57]
45: <observer>
2: shiny::runApp
1: rdmlEdit
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_Switzerland.1252
[2] LC_CTYPE=English_Switzerland.1252
[3] LC_MONETARY=English_Switzerland.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_Switzerland.1252
attached base packages:
[1] tools stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] forcats_0.5.1 purrr_0.3.4 readr_1.4.0
[4] tidyr_1.2.0 tibble_3.1.8 tidyverse_1.3.1
[7] stringr_1.4.1 whisker_0.4 rlist_0.4.6.2
[10] data.table_1.14.2 PCRedux_1.1-2 MBmca_1.0.1-3
[13] robustbase_0.95-0 chipPCR_1.0-2 pipeR_0.6.1.3
[16] shinyMolBio_0.2 plotly_4.10.0.9001 ggplot2_3.3.6
[19] ggvis_0.4.7.9000 dplyr_1.0.9 shinyjs_2.1.0
[22] shinythemes_1.2.0 shiny_1.7.1 RDML_1.2
loaded via a namespace (and not attached):
[1] readxl_1.4.1 changepoint_2.2.3 backports_1.4.1
[4] lazyeval_0.2.2 splines_4.1.0 fda_6.0.3
[7] usethis_2.0.1 digest_0.6.27 foreach_1.5.2
[10] htmltools_0.5.2 RcppDE_0.1.6 qpcR_1.4-1
[13] fansi_1.0.3 magrittr_2.0.3 checkmate_2.1.0
[16] memoise_2.0.0 Rfit_0.24.2 cluster_2.1.2
[19] doParallel_1.0.17 ks_1.13.5 hdrcde_3.4
[22] remotes_2.3.0 modelr_0.1.8 extrafont_0.18
[25] extrafontdb_1.0 fds_1.8 prettyunits_1.1.1
[28] colorspace_2.0-1 rvest_1.0.0 signal_0.7-7
[31] ecp_3.1.3 haven_2.5.0 xfun_0.31
[34] callr_3.7.0 crayon_1.5.2 RCurl_1.98-1.6
[37] jsonlite_1.8.0 survival_3.2-11 zoo_1.8-10
[40] iterators_1.0.14 glue_1.6.2 gtable_0.3.0
[43] MatrixModels_0.5-0 pkgbuild_1.2.0 Rttf2pt1_1.3.10
[46] DEoptimR_1.0-11 SparseM_1.81 scales_1.2.0
[49] mvtnorm_1.1-3 DBI_1.1.1 Rcpp_1.0.8.3
[52] viridisLite_0.4.0 xtable_1.8-4 mclust_5.4.10
[55] deSolve_1.32 htmlwidgets_1.5.3 httr_1.4.2
[58] RColorBrewer_1.1-2 ellipsis_0.3.2 rainbow_3.6
[61] pkgconfig_2.0.3 ptw_1.9-16 dbplyr_2.1.1
[64] sass_0.4.1 utf8_1.2.2 tidyselect_1.1.2
[67] rlang_1.0.6 later_1.2.0 munsell_0.5.0
[70] cellranger_1.1.0 cachem_1.0.5 cli_3.1.1
[73] generics_0.1.3 broom_0.8.0 devtools_2.4.3
[76] fastmap_1.1.0 yaml_2.3.5 knitr_1.39
[79] outliers_0.15 processx_3.5.2 fs_1.5.2
[82] rgl_0.108.3.2 pbapply_1.5-0 nlme_3.1-152
[85] mime_0.10 quantreg_5.93 pracma_2.3.8
[88] xml2_1.3.3 compiler_4.1.0 rstudioapi_0.13
[91] curl_4.3.1 testthat_3.0.2 bcp_4.0.3
[94] reprex_2.0.0 bslib_0.3.1 pcaPP_2.0-1
[97] stringi_1.7.6 ps_1.6.0 desc_1.3.0
[100] lattice_0.20-44 Matrix_1.3-3 markdown_1.1
[103] vctrs_0.4.1 pillar_1.8.1 lifecycle_1.0.2
[106] lmtest_0.9-40 jquerylib_0.1.4 bitops_1.0-7
[109] httpuv_1.6.5 R6_2.5.1 promises_1.2.0.1
[112] KernSmooth_2.23-20 sessioninfo_1.1.1 codetools_0.2-18
[115] MASS_7.3-54 assertthat_0.2.1 pkgload_1.2.1
[118] fontawesome_0.2.2 rprojroot_2.0.2 minpack.lm_1.2-2
[121] withr_2.4.2 hms_1.1.2 mgcv_1.8-35
[124] parallel_4.1.0 grid_4.1.0 segmented_1.6-0
[127] Cairo_1.5-15 lubridate_1.8.0 fda.usc_2.0.2
library(devtools)
install_github("RDML", "kablag")
Downloading github repo kablag/RDML@master
Installing RDML
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore CMD INSTALL
'/private/var/folders/ps/4cns4xzn38z6f9xycv0r8mv00000gn/T/RtmpzlxO38/devtools14ea2dfa9693/kablag-RDML-c67d479'
--library='/Library/Frameworks/R.framework/Versions/3.2/Resources/library' --install-tests
Remove flat.table option from RDML function, because its functionality can be implemented by selectFData.
We've got two qPCR instruments in our lab, one is CFX Connect and the computer has Bio-Rad CFX Manager 3.0 installed, the other is CFX96Touch and computer has CFX Maestro 1.1 software. Both software produces xxxxx.pcrd
as results by default and support export to rdml v1.1 format. For data import and processing, I am following the supplements SI1.pdf of your paper (BTW, link in README here to https://kablag.github.io/RDML/ seems dead and I cannot find it anywhere else, donno if the manual has been updated and I was maybe following an outdated version or what).
Commands I used to import my results:
raw_data <- RDML$new("/path/to/rdml")
fdata <- raw_data$GetFData(dplyr::filter(raw_data_tab, sample.type == "unkn"), long.table = FALSE)
Problem is, if I'am importing a file exported from CFX Manager, I get the fdata
with no error, while if the file was exported from CFX Maestro, the raw_data$GetFData()
step always says:
Error: Assertion failed. One of the following must apply:
* checkClass(out): Must inherit from class 'adpsType', but has class 'NULL'
* checkClass(out): Must inherit from class 'mdpsType', but has class 'NULL'
I tried to export rdml v1.0 but in vain. Also, I noticed that CFX Manager failed to open results produced from CFX96Touch & CFX Maestro, while CFX Maestro was able to open files from
CFX96Touch & CFX Maestro and CFX Connect & CFX Manager, although they were all xxxx.pcrd
files (maybe due to software compatibility issues?)
This issue was observed on a linux Mint R 3.6.3 and R 4.1.2 Version.
shinyjs: extendShinyjs: `functions` argument must be provided. See the documentation for `?extendShinyjs` for more details.
In my humble tries to solve this: the Shiny UI.R may be changed to solve this issue:
extendShinyjs(script = "www/js/my_shinyjs_scripts.js",
functions = c("winprint"))
I am getting the same assertion violation as described in #28:
Error in (function (cq) : Assertion on 'cq' failed: May not be NA.
The RDML should parse OK. As you can see below, the <cq>NaN</cq>
tag appears legitimately when a reaction did not amplify at all (e.g. a negative test).
[...]
<react id="1">
<sample id="mysample1"/>
<data>
<tar id="the_target"/>
<cq>NaN</cq>
<adp>
<cyc>1.0</cyc>
<fluor>0.045274403</fluor>
</adp>
[...]
<adp>
<cyc>45.0</cyc>
<fluor>-0.013826137</fluor>
</adp>
[...]
<react id="86">
<sample id="mysample1"/>
<data>
<tar id="the_positive_control"/>
<cq>26.96937</cq>
<adp>
<cyc>1.0</cyc>
<fluor>0.01319422</fluor>
</adp>
[...]
<adp>
<cyc>25.0</cyc>
<fluor>0.090496756</fluor>
</adp>
<adp>
<cyc>26.0</cyc>
<fluor>0.13862325</fluor>
</adp>
The link http://shtest.evrogen.net/rdmlEdit/ is broken.
Do it after removing flat.table option from RDML function
Dear kablag,
when I load RDML files on the RDMLedit web-server, I see the following log messages
target: Assertion on 'id' failed: Must be of type 'string', not 'NULL'.
run: Assertion on 'name' failed: Must be of type 'string', not 'NULL'.
react: Assertion on 'id' failed: Must be of type 'string', not 'NULL'.
However, when inspecting the files, they don't appear to be compromised.
Any ideas about these log messages?
Can I simply ignore/clear them?
Thanks in advance,
janstrauss1
Dear kablag,
I am trying to run the command RDMLedit()
locally from a RStudio session.
However, I receive the error
Listening on http://127.0.0.1:7366
Warning: Error in library: there is no package called ‘dpcR’
52: stop
51: library
Error in library(dpcR) : there is no package called ‘dpcR’
Clearly, I don't have dpcR installed but install.packages("dpcR")
gives me
Warning in install.packages :
package ‘dpcR’ is not available (for R version 3.5.1)
It appears that the ‘dpcR’ package has been removed from the CRAN repository and I wonder if you really need it to run RDMLedit()
locally?
Many thanks in advance,
janstrauss1
Below my output from sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dyliblocale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:
[1] tools stats graphics grDevices utils datasets methods baseother attached packages:
[1] MBmca_0.0.3-5 plotly_4.8.0 ggvis_0.4.3 dplyr_0.7.6 labeling_0.3 ggplot2_3.0.0
[7] withr_2.1.2 crayon_1.3.4 chipPCR_0.0.8-10 RDML_0.9-9 backports_1.1.2 robustbase_0.93-2
[13] pipeR_0.6.1.3 markdown_0.8 yaml_2.2.0 V8_1.5 shinyjs_1.0 shinythemes_1.1.1
[19] shiny_1.1.0loaded via a namespace (and not attached):
[1] httr_1.3.1 tidyr_0.8.1 jsonlite_1.5 viridisLite_0.3.0 assertthat_0.2.0 Rfit_0.23.0
[7] cellranger_1.1.0 outliers_0.14 pillar_1.3.0 lattice_0.20-35 quantreg_5.36 glue_1.3.0
[13] rlist_0.4.6.1 digest_0.6.16 promises_1.0.1 checkmate_1.8.5 colorspace_1.3-2 htmltools_0.3.6
[19] httpuv_1.4.5 Matrix_1.2-14 plyr_1.8.4 pkgconfig_2.0.2 SparseM_1.77 purrr_0.2.5
[25] xtable_1.8-2 ptw_1.9-13 scales_1.0.0 later_0.7.3 MatrixModels_0.4-1 tibble_1.4.2
[31] lazyeval_0.2.1 magrittr_1.5 readxl_1.1.0 mime_0.5 MASS_7.3-50 xml2_1.2.0
[37] data.table_1.11.4 stringr_1.3.1 munsell_0.5.0 bindrcpp_0.2.2 compiler_3.5.1 signal_0.7-6
[43] rlang_0.2.2 grid_3.5.1 nloptr_1.0.4 htmlwidgets_1.2 gtable_0.2.0 curl_3.2
[49] R6_2.2.2 zoo_1.8-3 lubridate_1.7.4 bindr_0.1.1 stringi_1.2.4 parallel_3.5.1
[55] Rcpp_0.12.18 DEoptimR_1.0-8 tidyselect_0.2.4 lmtest_0.9-36
Do it after removing flat.table option from RDML function
Create structure view prettier than str ().
Maybe table
targets | types | samples |
---|---|---|
EvaGreen | pos | A1, A2 |
neg | A3 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.