library(ceRNAnetsim)
In the other package vignettes, usage of ceRNAnetsim is explained in details. But in this vignette, some of commands which facitate to use of other vignettes.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
::install("ceRNAnetsim") BiocManager
data("TCGA_E9_A1N5_tumor")
data("TCGA_E9_A1N5_normal")
data("mirtarbasegene")
data("TCGA_E9_A1N5_mirnanormal")
%>%
TCGA_E9_A1N5_mirnanormal inner_join(mirtarbasegene, by= "miRNA") %>%
inner_join(TCGA_E9_A1N5_normal,
by = c("Target"= "external_gene_name")) %>%
select(Target, miRNA, total_read, gene_expression) %>%
distinct() -> TCGA_E9_A1N5_mirnagene
%>%
TCGA_E9_A1N5_tumorinner_join(TCGA_E9_A1N5_normal, by= "external_gene_name")%>%
select(patient = patient.x,
external_gene_name, tumor_exp = gene_expression.x,
normal_exp = gene_expression.y)%>%
distinct()%>%
inner_join(TCGA_E9_A1N5_mirnagene, by = c("external_gene_name"= "Target"))%>%
filter(tumor_exp != 0, normal_exp != 0)%>%
mutate(FC= tumor_exp/normal_exp)%>%
filter(external_gene_name== "HIST1H3H")
#> # A tibble: 13 × 8
#> patient external_gene_name tumor_exp norma…¹ miRNA total…² gene_…³ FC
#> <chr> <chr> <dbl> <dbl> <chr> <int> <dbl> <dbl>
#> 1 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 193 27 30.6
#> 2 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 7 27 30.6
#> 3 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 3 27 30.6
#> 4 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 450 27 30.6
#> 5 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 1345 27 30.6
#> 6 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 14 27 30.6
#> 7 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 3 27 30.6
#> 8 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 35 27 30.6
#> 9 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 205 27 30.6
#> 10 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 270 27 30.6
#> 11 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 38 27 30.6
#> 12 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 1 27 30.6
#> 13 TCGA-E9-A1N5 HIST1H3H 825 27 hsa-… 4 27 30.6
#> # … with abbreviated variable names ¹normal_exp, ²total_read, ³gene_expression
#HIST1H3H: interacts with various miRNA in dataset, so we can say that HIST1H3H is non-isolated competing element and increases to 30-fold.
%>%
TCGA_E9_A1N5_tumorinner_join(TCGA_E9_A1N5_normal, by= "external_gene_name") %>%
select(patient = patient.x,
external_gene_name, tumor_exp = gene_expression.x,
normal_exp = gene_expression.y) %>%
distinct() %>%
inner_join(TCGA_E9_A1N5_mirnagene,
by = c("external_gene_name"= "Target")) %>%
filter(tumor_exp != 0, normal_exp != 0) %>%
mutate(FC= tumor_exp/normal_exp) %>%
filter(external_gene_name == "ACTB")
#> # A tibble: 46 × 8
#> patient external_gene_name tumor_exp norma…¹ miRNA total…² gene_…³ FC
#> <chr> <chr> <dbl> <dbl> <chr> <int> <dbl> <dbl>
#> 1 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 67599 101917 1.88
#> 2 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 47266 101917 1.88
#> 3 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 14554 101917 1.88
#> 4 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 191 101917 1.88
#> 5 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 5 101917 1.88
#> 6 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 12625 101917 1.88
#> 7 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 5297 101917 1.88
#> 8 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 2379 101917 1.88
#> 9 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 8041 101917 1.88
#> 10 TCGA-E9-A1N5 ACTB 191469 101917 hsa-… 1522 101917 1.88
#> # … with 36 more rows, and abbreviated variable names ¹normal_exp, ²total_read,
#> # ³gene_expression
#ACTB: interacts with various miRNA in dataset, so ACTB is not isolated node in network and increases to 1.87-fold.
Firstly, clean dataset as individual gene has one expression value. And then filter genes which have expression values greater than 10.
%>%
TCGA_E9_A1N5_mirnagene group_by(Target) %>%
mutate(gene_expression= max(gene_expression)) %>%
distinct() %>%
ungroup() -> TCGA_E9_A1N5_mirnagene
%>%
TCGA_E9_A1N5_mirnagenefilter(gene_expression > 10)->TCGA_E9_A1N5_mirnagene
We can determine perturbation efficiency of an element on entire network as following:
%>%
TCGA_E9_A1N5_mirnagene priming_graph(competing_count = gene_expression,
miRNA_count = total_read)%>%
calc_perturbation(node_name= "ACTB", cycle=10, how= 1.87,limit = 0.1)
On the other hand, the perturbation eficiency of ATCB gene is higher, when this gene is regulated with 30-fold upregulation like in HIST1H3H.
%>%
TCGA_E9_A1N5_mirnagene priming_graph(competing_count = gene_expression,
miRNA_count = total_read)%>%
calc_perturbation(node_name= "ACTB", cycle=10, how= 30,limit = 0.1)
sessionInfo()
#> R version 4.2.1 Patched (2022-07-09 r82577)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur ... 10.16
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] C/en_US.UTF-8/en_US.UTF-8/C/en_GB/en_US.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] ceRNAnetsim_1.10.0 tidygraph_1.2.2 dplyr_1.0.10
#>
#> loaded via a namespace (and not attached):
#> [1] tidyselect_1.2.0 xfun_0.34 bslib_0.4.0 graphlayouts_0.8.3
#> [5] purrr_0.3.5 listenv_0.8.0 colorspace_2.0-3 vctrs_0.5.0
#> [9] generics_0.1.3 viridisLite_0.4.1 htmltools_0.5.3 yaml_2.3.6
#> [13] utf8_1.2.2 rlang_1.0.6 jquerylib_0.1.4 pillar_1.8.1
#> [17] withr_2.5.0 glue_1.6.2 DBI_1.1.3 tweenr_2.0.2
#> [21] lifecycle_1.0.3 stringr_1.4.1 munsell_0.5.0 gtable_0.3.1
#> [25] future_1.28.0 codetools_0.2-18 evaluate_0.17 knitr_1.40
#> [29] fastmap_1.1.0 parallel_4.2.1 fansi_1.0.3 furrr_0.3.1
#> [33] Rcpp_1.0.9 scales_1.2.1 cachem_1.0.6 jsonlite_1.8.3
#> [37] farver_2.1.1 parallelly_1.32.1 gridExtra_2.3 ggforce_0.4.1
#> [41] ggplot2_3.3.6 digest_0.6.30 stringi_1.7.8 ggrepel_0.9.1
#> [45] polyclip_1.10-4 grid_4.2.1 cli_3.4.1 tools_4.2.1
#> [49] magrittr_2.0.3 sass_0.4.2 tibble_3.1.8 ggraph_2.1.0
#> [53] tidyr_1.2.1 pkgconfig_2.0.3 MASS_7.3-58.1 viridis_0.6.2
#> [57] assertthat_0.2.1 rmarkdown_2.17 R6_2.5.1 globals_0.16.1
#> [61] igraph_1.3.5 compiler_4.2.1