Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A error message with "getNetwork" function #2

Open
zyb1984 opened this issue Jun 6, 2022 · 2 comments
Open

A error message with "getNetwork" function #2

zyb1984 opened this issue Jun 6, 2022 · 2 comments

Comments

@zyb1984
Copy link

zyb1984 commented Jun 6, 2022

I tried to follow the tutorial from "https://bioconductor.org/packages/release/bioc/vignettes/BioTIP/inst/doc/BioTIP.html", but with an error message with "getNetwork" function, and the information is " error in getNetwork(testres, FDR = 0.2) : parameter is not used (FDR = 0.2) ". So, I tried to follow the simple example of "getNetwork" function like
"test = list('state1' = matrix(sample(1:10, 6), 2, 3),
'state2'=matrix(sample(1:10, 6), 2, 3),
'state3' = matrix(sample(1:10, 6), 2, 3))

for(i in names(test)){
colnames(test[[i]]) = 1:3
row.names(test[[i]]) = 1:2}

igraphL <- getNetwork(test, fdr=1)
#[1] "state1:2 nodes"
#[1] "state2:2 nodes"
#[1] "state3:2 nodes" "
Also with the same error "parameter isn't useful", and when I deleted the FDR parameters, and with another error "Error in getNetwork(testres) : Cannot get an "active" slot from an object of a base category ("list") that does not have slots "

sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8
[2] LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8

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

other attached packages:
[1] MASS_7.3-57 Hmisc_4.7-0
[3] Formula_1.2-4 survival_3.3-1
[5] lattice_0.20-45 LoomExperiment_1.14.0
[7] BiocIO_1.6.0 rhdf5_2.40.0
[9] zellkonverter_1.6.1 BiocManager_1.30.18
[11] DropletUtils_1.16.0 dplyr_1.0.9
[13] stxBrain.SeuratData_0.1.1 ssHippo.SeuratData_3.1.4
[15] pbmcsca.SeuratData_3.0.0 pbmc3k.SeuratData_3.1.4
[17] ifnb.SeuratData_3.1.0 hcabm40k.SeuratData_3.0.0
[19] bmcite.SeuratData_0.3.0 SeuratData_0.2.2
[21] RSCORE_0.1.0 org.Hs.eg.db_3.15.0
[23] clusterProfiler_4.4.1 genesorteR_0.4.3
[25] Matrix_1.4-1 doMC_1.3.5
[27] iterators_1.0.14 doRNG_1.8.2
[29] rngtools_1.5.2 foreach_1.5.2
[31] network_1.17.2 coop_0.6-3
[33] propr_4.2.6 STRINGdb_2.8.4
[35] AUCell_1.18.1 sp_1.4-7
[37] SeuratObject_4.1.0 Seurat_4.1.1
[39] BioTIP_1.10.0 stringr_1.4.0
[41] scran_1.24.0 scater_1.24.0
[43] ggplot2_3.3.6 scuttle_1.6.2
[45] psych_2.2.5 pheatmap_1.0.12
[47] org.Mm.eg.db_3.15.0 AnnotationDbi_1.58.0
[49] igraph_1.3.1 gridExtra_2.3
[51] gplots_3.1.3 edgeR_3.38.1
[53] limma_3.52.1 dynamicTreeCut_1.63-1
[55] corrplot_0.92 cluster_2.1.3
[57] batchelor_1.12.1 MouseGastrulationData_1.10.0
[59] SpatialExperiment_1.6.0 SingleCellExperiment_1.18.0
[61] SummarizedExperiment_1.26.1 Biobase_2.56.0
[63] GenomicRanges_1.48.0 GenomeInfoDb_1.32.2
[65] IRanges_2.30.0 S4Vectors_0.34.0
[67] BiocGenerics_0.42.0 MatrixGenerics_1.8.0
[69] matrixStats_0.62.0

loaded via a namespace (and not attached):
[1] statnet.common_4.6.0 rsvd_1.0.5
[3] ica_1.0-2 lmtest_0.9-40
[5] crayon_1.5.1 spatstat.core_2.4-4
[7] rhdf5filters_1.8.0 backports_1.4.1
[9] nlme_3.1-157 basilisk_1.8.0
[11] GOSemSim_2.22.0 rlang_1.0.2
[13] XVector_0.36.0 ROCR_1.0-11
[15] irlba_2.3.5 intergraph_2.0-2
[17] filelock_1.0.2 proto_1.0.0
[19] BiocParallel_1.30.2 rjson_0.2.21
[21] bit64_4.0.5 glue_1.6.2
[23] sctransform_0.3.3 vipor_0.4.5
[25] spatstat.sparse_2.1-1 DOSE_3.22.0
[27] spatstat.geom_2.4-0 tidyselect_1.1.2
[29] fitdistrplus_1.1-8 XML_3.99-0.9
[31] tidyr_1.2.0 zoo_1.8-10
[33] chron_2.3-57 xtable_1.8-4
[35] magrittr_2.0.3 cli_3.3.0
[37] zlibbioc_1.42.0 rstudioapi_0.13
[39] miniUI_0.1.1.1 rpart_4.1.16
[41] fastmatch_1.1-3 treeio_1.20.0
[43] shiny_1.7.1 xfun_0.31
[45] BiocSingular_1.12.0 caTools_1.18.2
[47] tidygraph_1.2.1 KEGGREST_1.36.0
[49] tibble_3.1.7 interactiveDisplayBase_1.34.0
[51] ggrepel_0.9.1 ape_5.6-2
[53] listenv_0.8.0 Biostrings_2.64.0
[55] png_0.1-7 permute_0.9-7
[57] future_1.26.1 withr_2.5.0
[59] bitops_1.0-7 ggforce_0.3.3
[61] plyr_1.8.7 GSEABase_1.58.0
[63] microeco_0.10.1 dqrng_0.3.0
[65] coda_0.19-4 pillar_1.7.0
[67] cachem_1.0.6 hash_2.2.6.2
[69] DelayedMatrixStats_1.18.0 vctrs_0.4.1
[71] ellipsis_0.3.2 generics_0.1.2
[73] gsubfn_0.7 tools_4.2.0
[75] foreign_0.8-82 beeswarm_0.4.0
[77] munsell_0.5.0 tweenr_1.0.2
[79] fgsea_1.22.0 DelayedArray_0.22.0
[81] fastmap_1.1.0 compiler_4.2.0
[83] abind_1.4-5 httpuv_1.6.5
[85] ExperimentHub_2.4.0 plotly_4.10.0
[87] rgeos_0.5-9 GenomeInfoDbData_1.2.8
[89] dir.expiry_1.4.0 deldir_1.0-6
[91] utf8_1.2.2 later_1.3.0
[93] BiocFileCache_2.4.0 jsonlite_1.8.0
[95] scales_1.2.0 graph_1.74.0
[97] ScaledMatrix_1.4.0 tidytree_0.3.9
[99] pbapply_1.5-0 sparseMatrixStats_1.8.0
[101] lazyeval_0.2.2 promises_1.2.0.1
[103] latticeExtra_0.6-29 R.utils_2.11.0
[105] goftest_1.2-3 checkmate_2.1.0
[107] spatstat.utils_2.3-1 reticulate_1.25
[109] cowplot_1.1.1 statmod_1.4.36
[111] Rtsne_0.16 downloader_0.4
[113] uwot_0.1.11 HDF5Array_1.24.1
[115] ResidualMatrix_1.6.0 yaml_2.3.5
[117] plotrix_3.8-2 htmltools_0.5.2
[119] memoise_2.0.1 locfit_1.5-9.5
[121] graphlayouts_0.8.0 viridisLite_0.4.0
[123] digest_0.6.29 assertthat_0.2.1
[125] mime_0.12 rappdirs_0.3.3
[127] RSQLite_2.2.14 sqldf_0.4-11
[129] yulab.utils_0.0.4 future.apply_1.9.0
[131] data.table_1.14.2 blob_1.2.3
[133] vegan_2.6-2 R.oo_1.24.0
[135] labeling_0.4.2 splines_4.2.0
[137] Rhdf5lib_1.18.2 AnnotationHub_3.4.0
[139] RCurl_1.98-1.6 base64enc_0.1-3
[141] colorspace_2.0-3 mnormt_2.0.2
[143] ggbeeswarm_0.6.0 tmvnsim_1.0-2
[145] aplot_0.1.6 nnet_7.3-17
[147] Rcpp_1.0.8.3 mclust_5.4.10
[149] RANN_2.6.1 enrichplot_1.16.1
[151] fansi_1.0.3 parallelly_1.31.1
[153] R6_2.5.1 grid_4.2.0
[155] ggridges_0.5.3 lifecycle_1.0.1
[157] bluster_1.6.0 curl_4.3.2
[159] leiden_0.4.2 DO.db_2.9
[161] qvalue_2.28.0 RcppAnnoy_0.0.19
[163] RColorBrewer_1.1-3 htmlwidgets_1.5.4
[165] beachmat_2.12.0 polyclip_1.10-0
[167] purrr_0.3.4 shadowtext_0.1.2
[169] gridGraphics_0.5-1 mgcv_1.8-40
[171] globals_0.15.0 BumpyMatrix_1.4.0
[173] htmlTable_2.4.0 patchwork_1.1.1
[175] spatstat.random_2.2-0 progressr_0.10.1
[177] codetools_0.2-18 FNN_1.1.3.1
[179] GO.db_3.15.0 metapod_1.4.0
[181] gtools_3.9.2.1 dbplyr_2.2.0
[183] RSpectra_0.16-1 basilisk.utils_1.8.0
[185] R.methodsS3_1.8.1 gtable_0.3.0
[187] DBI_1.1.2 ggfun_0.0.6
[189] tensor_1.5 httr_1.4.3
[191] KernSmooth_2.23-20 stringi_1.7.6
[193] reshape2_1.4.4 farver_2.1.0
[195] annotate_1.74.0 viridis_0.6.2
[197] ggtree_3.4.0 magick_2.7.3
[199] BiocNeighbors_1.14.0 ggplotify_0.1.0
[201] scattermore_0.8 BiocVersion_3.15.2
[203] bit_4.0.4 jpeg_0.1-9
[205] scatterpie_0.1.7 spatstat.data_2.2-0
[207] ggraph_2.0.5 pkgconfig_2.0.3
[209] knitr_1.39

@Ci-TJ
Copy link

Ci-TJ commented Jun 7, 2022

@zyb1984
Hi! If I don't misunderstand your idea, maybe you misuse of upper and lower case. By the way, did you reproduce the scRNA-seq example in BioTIP's vignettes. Could you share me "cell_info.tsv"? I cannot generate it. My e-mail 1911449@tongji.edu.cn. Thank you!

library(BioTIP)
library(cluster)
library(GenomicRanges)
library(Hmisc)
library(MASS)
require(stringr)
require(psych)
require(igraph)
set.seed(123)
test = list('state1' = matrix(runif(3000, 1, 10), 300, 10),
            'state2' = matrix(runif(3000, 1, 10), 300, 10),
            'state3' = matrix(runif(3000, 1, 10), 300, 10),
            'state4' = matrix(runif(3000, 1, 10), 300, 10),
            'state5' = matrix(runif(3000, 1, 10), 300, 10))

for(i in names(test)){
    colnames(test[[i]]) = paste0("p",1:10)
    row.names(test[[i]]) = paste0("gene",1:300)}
igraphL <- getNetwork(test, fdr=1)
#> igraphL <- getNetwork(test, fdr=1)
#state1:300 nodes
#state2:300 nodes
#state3:300 nodes
#state4:300 nodes
#state5:300 nodes

##For Yours
set.seed(123)
test = list('state1' = matrix(sample(1:10, 6), 2, 3),
            'state2'=matrix(sample(1:10, 6), 2, 3),
            'state3' = matrix(sample(1:10, 6), 2, 3))

for(i in names(test)){
    colnames(test[[i]]) = 1:3
    row.names(test[[i]]) = 1:2}

igraphL <- getNetwork(test, fdr=1)
#> igraphL <- getNetwork(test, fdr=1)
#state1:2 nodes
#state2:2 nodes
#state3:2 nodes


##Maybe you misuse of upper and lower case
igraphL <- getNetwork(test, FDR=1)
#> igraphL <- getNetwork(test, FDR=1)
#Error in getNetwork(test, FDR = 1) : unused argument (FDR = 1)

> sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 
[2] LC_CTYPE=Chinese (Simplified)_China.utf8   
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C                               
[5] LC_TIME=Chinese (Simplified)_China.utf8    

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

other attached packages:
 [1] igraph_1.3.1         psych_2.2.5          stringr_1.4.0       
 [4] MASS_7.3-57          Hmisc_4.7-0          ggplot2_3.3.6       
 [7] Formula_1.2-4        survival_3.3-1       lattice_0.20-45     
[10] GenomicRanges_1.48.0 GenomeInfoDb_1.32.2  IRanges_2.30.0      
[13] S4Vectors_0.34.0     BiocGenerics_0.42.0  cluster_2.1.3       
[16] BioTIP_1.10.0       

loaded via a namespace (and not attached):
 [1] png_0.1-7              digest_0.6.29          assertthat_0.2.1      
 [4] utf8_1.2.2             R6_2.5.1               backports_1.4.1       
 [7] pillar_1.7.0           zlibbioc_1.42.0        rlang_1.0.2           
[10] data.table_1.14.2      rstudioapi_0.13        rpart_4.1.16          
[13] Matrix_1.4-1           checkmate_2.1.0        splines_4.2.0         
[16] foreign_0.8-82         htmlwidgets_1.5.4      RCurl_1.98-1.6        
[19] munsell_0.5.0          xfun_0.31              compiler_4.2.0        
[22] pkgconfig_2.0.3        base64enc_0.1-3        mnormt_2.0.2          
[25] tmvnsim_1.0-2          htmltools_0.5.2        nnet_7.3-17           
[28] tidyselect_1.1.2       tibble_3.1.7           gridExtra_2.3         
[31] htmlTable_2.4.0        GenomeInfoDbData_1.2.8 fansi_1.0.3           
[34] crayon_1.5.1           dplyr_1.0.9            withr_2.5.0           
[37] bitops_1.0-7           grid_4.2.0             nlme_3.1-157          
[40] gtable_0.3.0           lifecycle_1.0.1        DBI_1.1.2             
[43] magrittr_2.0.3         scales_1.2.0           cli_3.3.0             
[46] stringi_1.7.6          XVector_0.36.0         latticeExtra_0.6-29   
[49] ellipsis_0.3.2         generics_0.1.2         vctrs_0.4.1           
[52] RColorBrewer_1.1-3     tools_4.2.0            glue_1.6.2            
[55] purrr_0.3.4            jpeg_0.1-9             fastmap_1.1.0         
[58] parallel_4.2.0         colorspace_2.0-3       knitr_1.39 

Best,
Qin

@zyb1984
Copy link
Author

zyb1984 commented Jun 7, 2022

Thank you very much, all problems have been solved, and the new code works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants