vignettes/auxiliary_commands.Rmd
auxiliary_commands.Rmd
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")
BiocManager::install("ceRNAnetsim")
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_tumor%>%
inner_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 x 8
#> patient external_gene_n… tumor_exp normal_exp miRNA total_read
#> <chr> <chr> <dbl> <dbl> <chr> <int>
#> 1 TCGA-E… HIST1H3H 825 27 hsa-… 193
#> 2 TCGA-E… HIST1H3H 825 27 hsa-… 7
#> 3 TCGA-E… HIST1H3H 825 27 hsa-… 3
#> 4 TCGA-E… HIST1H3H 825 27 hsa-… 450
#> 5 TCGA-E… HIST1H3H 825 27 hsa-… 1345
#> 6 TCGA-E… HIST1H3H 825 27 hsa-… 14
#> 7 TCGA-E… HIST1H3H 825 27 hsa-… 3
#> 8 TCGA-E… HIST1H3H 825 27 hsa-… 35
#> 9 TCGA-E… HIST1H3H 825 27 hsa-… 205
#> 10 TCGA-E… HIST1H3H 825 27 hsa-… 270
#> 11 TCGA-E… HIST1H3H 825 27 hsa-… 38
#> 12 TCGA-E… HIST1H3H 825 27 hsa-… 1
#> 13 TCGA-E… HIST1H3H 825 27 hsa-… 4
#> # … with 2 more variables: gene_expression <dbl>, FC <dbl>
#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_tumor%>%
inner_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 x 8
#> patient external_gene_n… tumor_exp normal_exp miRNA total_read
#> <chr> <chr> <dbl> <dbl> <chr> <int>
#> 1 TCGA-E… ACTB 191469 101917 hsa-… 67599
#> 2 TCGA-E… ACTB 191469 101917 hsa-… 47266
#> 3 TCGA-E… ACTB 191469 101917 hsa-… 14554
#> 4 TCGA-E… ACTB 191469 101917 hsa-… 191
#> 5 TCGA-E… ACTB 191469 101917 hsa-… 5
#> 6 TCGA-E… ACTB 191469 101917 hsa-… 12625
#> 7 TCGA-E… ACTB 191469 101917 hsa-… 5297
#> 8 TCGA-E… ACTB 191469 101917 hsa-… 2379
#> 9 TCGA-E… ACTB 191469 101917 hsa-… 8041
#> 10 TCGA-E… ACTB 191469 101917 hsa-… 1522
#> # … with 36 more rows, and 2 more variables: gene_expression <dbl>, FC <dbl>
#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_mirnagene%>%
filter(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.0.2 (2020-06-22)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 16.04.6 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/openblas-base/libblas.so.3
#> LAPACK: /usr/lib/libopenblasp-r0.2.18.so
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] 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
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] ceRNAnetsim_1.3.2 tidygraph_1.2.0 dplyr_1.0.2
#>
#> loaded via a namespace (and not attached):
#> [1] tidyselect_1.1.0 xfun_0.19 purrr_0.3.4 listenv_0.8.0
#> [5] graphlayouts_0.7.1 colorspace_2.0-0 vctrs_0.3.5 generics_0.1.0
#> [9] htmltools_0.5.0 viridisLite_0.3.0 yaml_2.2.1 utf8_1.1.4
#> [13] rlang_0.4.9 pkgdown_1.6.1 pillar_1.4.7 glue_1.4.2
#> [17] tweenr_1.0.1 lifecycle_0.2.0 stringr_1.4.0 munsell_0.5.0
#> [21] gtable_0.3.0 ragg_0.4.0 future_1.20.1 codetools_0.2-16
#> [25] memoise_1.1.0 evaluate_0.14 knitr_1.30 parallel_4.0.2
#> [29] fansi_0.4.1 furrr_0.2.1 Rcpp_1.0.5 scales_1.1.1
#> [33] desc_1.2.0 farver_2.0.3 parallelly_1.21.0 systemfonts_0.3.2
#> [37] fs_1.5.0 textshaping_0.2.1 gridExtra_2.3 ggforce_0.3.2
#> [41] ggplot2_3.3.2 digest_0.6.27 stringi_1.5.3 ggrepel_0.8.2
#> [45] polyclip_1.10-0 rprojroot_2.0.2 grid_4.0.2 cli_2.2.0
#> [49] tools_4.0.2 magrittr_2.0.1 tibble_3.0.4 ggraph_2.0.4
#> [53] crayon_1.3.4 tidyr_1.1.2 pkgconfig_2.0.3 ellipsis_0.3.1
#> [57] MASS_7.3-51.6 assertthat_0.2.1 rmarkdown_1.15 viridis_0.5.1
#> [61] R6_2.5.0 globals_0.14.0 igraph_1.2.6 compiler_4.0.2