Help needed to run PVCA
1
0
Entering edit mode
@5120395c
Last seen 15 months ago
India

Hi, I am new to R and this is my first post in the community. I am trying to run pvca on my data which has a set of clinical annotations and protein expression data for a pool of patients. All of the data is numeric. Below is the code. Can I please get help from the community in troubleshooting the error that I have specified below?

>data <- read.csv("C:/Users/jyotrao/Documents/Projects/TR2021CVTRnD/data_analysis/data/NASHCAdata2.csv",header=TRUE,sep=',', row.names=NULL)
>View(data)
>pct_threshold <- 0.6
>batch.factors <- c("Age","Gender","Height.cm","Weight.kg","BMI","VAT","AST.IU","ALT.IU","Bilirubin.mgdl","Prothrombin.Time.s","Activated.Partial.Thromboplastin.Time.s","Albumin.gdL","ALP.IU","GGT.IU","LDL","VLDL","Triglycerides","BUN","HBA1C","T4","NAS.CRN.score","Fibrosis")
>pvcaObj <- pvcaBatchAssess(data, batch.factors, pct_threshold)
>print(sessionInfo())

# problematic part of code
>pvcaObj <- pvcaBatchAssess(data, batch.factors, pct_threshold)

# error obtained
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'object' in selecting a method for function 'exprs': unable to find an inherited method for function ‘vsn2’ for signature ‘"data.frame"’

sessionInfo( )

R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale: [1] LC_COLLATE=English_India.1252 LC_CTYPE=English_India.1252 LC_MONETARY=English_India.1252 [4] LC_NUMERIC=C LC_TIME=English_India.1252

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

other attached packages: [1] pvca_1.38.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.9 lubridate_1.9.0 lattice_0.20-45 listenv_0.9.0 class_7.3-20
[6] digest_0.6.31 ipred_0.9-13 foreach_1.5.2 utf8_1.2.2 parallelly_1.33.0
[11] R6_2.5.1 plyr_1.8.8 hardhat_1.2.0 stats4_4.2.1 ggplot2_3.4.0
[16] pillar_1.8.1 zlibbioc_1.44.0 rlang_1.0.6 caret_6.0-93 minqa_1.2.5
[21] data.table_1.14.6 nloptr_2.0.3 rpart_4.1.19 Matrix_1.5-3 preprocessCore_1.60.1 [26] splines_4.2.1 lme4_1.1-31 gower_1.0.1 stringr_1.5.0 munsell_0.5.0
[31] compiler_4.2.1 pkgconfig_2.0.3 BiocGenerics_0.44.0 globals_0.16.2 nnet_7.3-18
[36] tidyselect_1.2.0 tibble_3.1.8 prodlim_2019.11.13 codetools_0.2-18 fansi_1.0.3
[41] future_1.30.0 dplyr_1.0.10 withr_2.5.0 MASS_7.3-58.1 recipes_1.0.3
[46] ModelMetrics_1.2.2.2 grid_4.2.1 nlme_3.1-161 gtable_0.3.1 lifecycle_1.0.3
[51] affy_1.76.0 magrittr_2.0.3 pROC_1.18.0 scales_1.2.1 future.apply_1.10.0
[56] cli_3.4.1 stringi_1.7.8 reshape2_1.4.4 affyio_1.68.0 limma_3.54.0
[61] timeDate_4022.108 generics_0.1.3 vctrs_0.5.1 boot_1.3-28.1 lava_1.7.1
[66] iterators_1.0.14 tools_4.2.1 Biobase_2.58.0 glue_1.6.2 purrr_1.0.0
[71] parallel_4.2.1 survival_3.4-0 timechange_0.1.1 colorspace_2.0-3 BiocManager_1.30.19
[76] vsn_3.66.0

pvca • 561 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States

When you get an error that says things like this

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'object' in selecting a method for function 'exprs': unable to find an inherited method for function ‘vsn2’ for signature ‘"data.frame"’

That is an indication that you are using the wrong inputs for the function, and you should then look at the help page. And if you do so, you will find that pvcaBatchAssess expects an ExpressionSet, as it was originally designed for microarray data (which almost always used an ExpressionSet as the data container).

It is not clear to me that you should want to use a method intended for microarray data for batch assessment on proteomics data, but if you really want to do so, you need to put the data into an ExpressionSet first.

ADD COMMENT

Login before adding your answer.

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