BioNero - problem with module_trait_cor function
1
0
Entering edit mode
@08a3271d
Last seen 15 months ago
Slovenia

Hello,

I am trying to analyse kallisto outputs with BioNERO package and have problems with module_trait_cor function. I create SummarizedExperiment with tximeta:

coldata <- data.frame(files, names=rownames(Np_samples), condition=Np_samples$Location, stringsAsFactors=FALSE)
se <- tximeta(coldata, typ="kallisto")

Following the vignette everything runs ok, until I proceed with module_trait_cor function, where I get:

MEtrait <- module_trait_cor(exp = final_exp, MEs = net$MEs)

# Error in cor(as.matrix(MEs), trait, use = "p", method = cor_method) :
# 'y' must be numeric

Any help would be appreciated. Please post if I need to post additional samples or code.

session_info() output:

R version 4.2.2 (2022-10-31) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.5.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/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] stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] BioNERO_1.6.1 tximeta_1.16.1 palmerpenguins_0.1.1 DESeq2_1.38.3
[5] SummarizedExperiment_1.28.0 Biobase_2.58.0 MatrixGenerics_1.10.0 matrixStats_1.0.0
[9] GenomicRanges_1.50.2 GenomeInfoDb_1.34.9 IRanges_2.32.0 S4Vectors_0.36.2
[13] BiocGenerics_0.44.0 trinotateR_1.0 data.table_1.14.8 ggplot2_3.4.3
[17] tibble_3.2.1 janitor_2.2.0 tidyr_1.3.0 dplyr_1.1.2
[21] tximport_1.26.1

loaded via a namespace (and not attached): [1] rappdirs_0.3.3 rtracklayer_1.58.0 minet_3.56.0 coda_0.19-4
[5] bit64_4.0.5 knitr_1.43 DelayedArray_0.24.0 rpart_4.1.19
[9] KEGGREST_1.38.0 RCurl_1.98-1.12 AnnotationFilter_1.22.0 doParallel_1.0.17
[13] generics_0.1.3 preprocessCore_1.60.2 GenomicFeatures_1.50.4 RhpcBLASctl_0.23-42
[17] cowplot_1.1.1 microbiome_1.20.0 RSQLite_2.3.1 shadowtext_0.1.2
[21] bit_4.0.5 enrichplot_1.18.4 xml2_1.3.5 lubridate_1.9.2
[25] httpuv_1.6.11 viridis_0.6.4 xfun_0.40 hms_1.1.3
[29] evaluate_0.21 promises_1.2.1 fansi_1.0.4 restfulr_0.0.15
[33] progress_1.2.2 dbplyr_2.3.3 htmlwidgets_1.6.2 igraph_1.5.1
[37] DBI_1.1.3 geneplotter_1.76.0 purrr_1.0.2 ellipsis_0.3.2
[41] ggnewscale_0.4.9 ggpubr_0.6.0 backports_1.4.1 permute_0.9-7
[45] annotate_1.76.0 biomaRt_2.54.1 vctrs_0.6.3 Cairo_1.6-1
[49] ensembldb_2.22.0 abind_1.4-5 cachem_1.0.8 withr_2.5.0
[53] ggforce_0.4.1 HDO.db_0.99.1 checkmate_2.2.0 vegan_2.6-4
[57] GenomicAlignments_1.34.1 treeio_1.22.0 prettyunits_1.1.1 cluster_2.1.4
[61] DOSE_3.24.2 ape_5.7-1 lazyeval_0.2.2 crayon_1.5.2
[65] genefilter_1.80.3 labeling_0.4.2 edgeR_3.40.2 pkgconfig_2.0.3
[69] tweenr_2.0.2 nlme_3.1-163 ProtGenerics_1.30.0 nnet_7.3-19
[73] rlang_1.1.1 lifecycle_1.0.3 downloader_0.4 filelock_1.0.2
[77] BiocFileCache_2.6.1 phyloseq_1.42.0 AnnotationHub_3.6.0 polyclip_1.10-4
[81] Matrix_1.6-1 aplot_0.2.0 NetRep_1.2.7 carData_3.0-5
[85] Rhdf5lib_1.20.0 base64enc_0.1-3 GlobalOptions_0.1.2 png_0.1-8
[89] viridisLite_0.4.2 rjson_0.2.21 bitops_1.0-7 gson_0.1.0
[93] ggnetwork_0.5.12 rhdf5filters_1.10.1 Biostrings_2.66.0 blob_1.2.4
[97] shape_1.4.6 stringr_1.5.0 qvalue_2.30.0 rstatix_0.7.2
[101] gridGraphics_0.5-1 ggsignif_0.6.4 scales_1.2.1 memoise_2.0.1
[105] magrittr_2.0.3 plyr_1.8.8 zlibbioc_1.44.0 compiler_4.2.2
[109] scatterpie_0.2.1 BiocIO_1.8.0 RColorBrewer_1.1-3 intergraph_2.0-3
[113] clue_0.3-64 Rsamtools_2.14.0 snakecase_0.11.0 cli_3.6.1
[117] ade4_1.7-22 XVector_0.38.0 patchwork_1.1.3 htmlTable_2.4.1
[121] Formula_1.2-5 WGCNA_1.72-1 MASS_7.3-60 mgcv_1.9-0
[125] tidyselect_1.2.0 stringi_1.7.12 yaml_2.3.7 GOSemSim_2.24.0
[129] locfit_1.5-9.8 ggrepel_0.9.3 grid_4.2.2 fastmatch_1.1-4
[133] tools_4.2.2 timechange_0.2.0 parallel_4.2.2 circlize_0.4.15
[137] rstudioapi_0.15.0 foreign_0.8-84 foreach_1.5.2 gridExtra_2.3
[141] farver_2.1.1 Rtsne_0.16 ggraph_2.1.0 digest_0.6.33
[145] BiocManager_1.30.22 shiny_1.7.5 networkD3_0.4 Rcpp_1.0.11
[149] car_3.1-2 broom_1.0.5 BiocVersion_3.16.0 later_1.3.1
[153] httr_1.4.7 AnnotationDbi_1.60.2 ComplexHeatmap_2.14.0 GENIE3_1.20.0
[157] colorspace_2.1-0 XML_3.99-0.14 splines_4.2.2 yulab.utils_0.0.8
[161] statmod_1.5.0 tidytree_0.4.5 graphlayouts_1.0.0 multtest_2.54.0
[165] ggplotify_0.1.2 xtable_1.8-4 jsonlite_1.8.7 ggtree_3.6.2
[169] dynamicTreeCut_1.63-1 tidygraph_1.2.3 ggfun_0.1.2 R6_2.5.1
[173] Hmisc_5.1-0 pillar_1.9.0 htmltools_0.5.6 mime_0.12
[177] glue_1.6.2 fastmap_1.1.1 clusterProfiler_4.6.2 BiocParallel_1.32.6
[181] interactiveDisplayBase_1.36.0 codetools_0.2-19 fgsea_1.24.0 utf8_1.2.3
[185] sva_3.46.0 lattice_0.21-8 network_1.18.1 curl_5.0.2
[189] magick_2.7.5 GO.db_3.16.0 limma_3.54.2 survival_3.5-7
[193] rmarkdown_2.24 statnet.common_4.9.0 biomformat_1.26.0 munsell_0.5.0
[197] GetoptLong_1.0.5 fastcluster_1.2.3 rhdf5_2.42.1 GenomeInfoDbData_1.2.9
[201] iterators_1.0.14 impute_1.72.3 reshape2_1.4.4 gtable_0.3.4

BioNERO • 662 views
ADD COMMENT
1
Entering edit mode

Hi,

It seems like you have a problem with your sample metadata. The strange thing is that BioNERO doesn't require metadata variables to be numeric; they can be factors, for instance.

I noticed that you're using an older version of BioNERO. I updated the function module_trait_cor() some months ago to include support for multiple variables at the same time. Could you install the latest version of BioNERO and see if the problem is solved?

In case you're using an older version of Bioconductor, you can install BioNERO directly from GitHub with:

remotes::install_github("almeidasilvaf/BioNERO")

Best,

Fabricio

ADD REPLY
0
Entering edit mode

update to BioNERO_1.9.7 solved the problem. Thank you very much.

Best,

Matevz

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

The error message seems to be quite clear. It says

# Error in cor(as.matrix(MEs), trait, use = "p", method = cor_method) :
# 'y' must be numeric

You have an argument 'MEs' that you are passing into the function, and R is telling you that it's not numeric.

ADD COMMENT
0
Entering edit mode

Thank you for your reply. The problem was that I understood the error message but could not troubleshoot it. In the vignette example, if I understood correctly, the metadata for the plot was not numeric and therefore I did not see what was causing the problem. An update to the latest version of BioNERO solved the situation.

ADD REPLY

Login before adding your answer.

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