miRTalk tutorial

Pre-processing

rev_gene()

Revise genes with rev_gene(). For scRNA-seq data, we suggest to revise the gene symbols with rev_gene(). geneinfo is the system data.frame containing the information of human and mouse from NCBI gene(updated in June. 19, 2022). To use your own geneinfo data.frame, please refer to demo_geneinfo() to build a new one, e.g., rat, zebrafish, Drosophila, C. elegans, etc.

Parameters of rev_gene() see below:

  • data A data.frame or matrix or dgCMatrix
  • data_type A character to define the type of data, select ā€˜countā€™ for the data matrix, ā€˜mir_infoā€™ for the mir_info data.frame, ā€˜mir2tarā€™ for the mir2tar data.frame, ā€˜pathwaysā€™ for the pathways data.frame, ā€˜gene2goā€™ for the gene2go data.frame
  • species Species of the data.ā€™Humanā€™, ā€˜Mouseā€™ or ā€˜Ratā€™
  • geneinfo A data.frame of the system data containing gene symbols of ā€˜Humanā€™, ā€˜Mouseā€™ and ā€˜Ratā€™ updated on June 19, 2022 for revising gene symbols
library(miRTalk)
#> Loading required package: doParallel
#> Loading required package: foreach
#> Loading required package: iterators
#> Loading required package: parallel
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#>      (status 2 uses the sf package in place of rgdal)
#> Warning: replacing previous import 'Seurat::JS' by 'networkD3::JS' when loading
#> 'miRTalk'
load(paste0(system.file(package = "miRTalk"), "/extdata/example.rda"))

# demo_geneinfo
demo_geneinfo()
#>   symbol synonyms species
#> 1   A1BG      A1B   Human
#> 2   A1BG      ABG   Human
#> 3   A1BG      GAB   Human
#> 4   A1BG HYST2477   Human
#> 5    A2M     A2MD   Human
#> 6    A2M   CPAMD5   Human

# demo_sc_data
demo_sc_data()
#> 6 x 6 sparse Matrix of class "dgCMatrix"
#>      cell1 cell2 cell3 cell4 cell5 cell6
#> A1BG     4     .     .    18    37     .
#> A2M     42     .    32     .     8    50
#> A2MP     .     5    13    20     .     .
#> NAT1    48     .     .     .     .     7
#> NAT2     .    34    18     .    42     .
#> NATP     4     .     .     .     .     .

# revise gene symbols
sc_data <- rev_gene(data = sc_data,data_type = "count",species = "Human",geneinfo = geneinfo)

Processing

create_miRTalk()

Create miRTalk object with create_miRTalk(). Users need to provide the raw count data and the cell type for create_miRTalk(). miRTalk will use NormalizeData() in Seurat to normalize data by default. If your data has been normalized by other methods, you can set the parameter if_normalize = FALSE. Users need to define the condition with condition, provide the signatures of extracellular vesicle biogenesis genes with evbiog, and provide the signatures of RNA-induced silencing complex (RISC) related genes with risc. The default is to use the system data. Detailed system data see the GitHub readme

Parameters of create_miRTalk() see below:

  • sc_data A data.frame or matrix or dgCMatrix containing raw counts of single-cell RNA-seq data
  • sc_celltype A character containing the cell type of the single-cell RNA-seq data
  • species A character meaning species of the single-cell transcriptomics data. ā€œHumanā€, ā€œMouseā€, ā€œRatā€
  • condition A character with the same length as the number of cells, e.g., control/disease/treatment, phase 1/2/3, men/women.
  • if_normalize Normalize sc_data with Seurat LogNormalize()
  • evbiog A data.frame of the system data containing extracellular vesicle biogenesis genes of ā€œHumanā€, ā€œMouseā€, ā€œRatā€.
  • risc A data.frame of the system data containing RNA-induced silencing complex related genes of ā€œHumanā€, ā€œMouseā€, ā€œRatā€.
  • ritac A data.frame of the system data containing RNA-induced transcriptional activation complex related genes of ā€œHumanā€, ā€œMouseā€, ā€œRatā€.
obj <- create_miRTalk(sc_data = sc_data,
                      sc_celltype = sc_celltype,
                      species = "Human",
                      condition = rep("condition",length(sc_celltype)),
                      evbiog = evbiog,
                      risc = risc,
                      ritac = ritac)
#> Warning: The following features are not present in the object: AGO2, not
#> searching for symbol synonyms

#> Warning: The following features are not present in the object: AGO2, not
#> searching for symbol synonyms
obj
#> An object of class miRTalk 
#> 0 EV-derived miRNA-target interactions

# If your data has been normalized by other methods, you can set the parameter `if_normalize = FALSE`
# You can use your own evbiog, risc, and ritac gene signatures.

find_hvtg()

Find highly variable target genes with DEGs and HVGs find_hvtg(). miRTalk uses the top 3000 HVGs and DEGs for each cell types with Seurat methods. The result is a character stored obj@data$var_genes. Users can use their own methods to find Find highly variable target genes and replace them.

Parameters of find_hvtg() see below:

  • object miRTalk object after create_miRTalk()
  • pvalue Cutoff of p value. Default is 0.05
  • log2fc log2 fold change for identifying the highly expressed genes in each cell type. Default is 0.5
  • min_cell_num Min cell number for each cell type. Default is 10
  • nfeatures Number of features to select as top variable features. Default is 3000
# find highly variable target genes
obj <- find_hvtg(object = obj)

# the result is a character
var_genes <- obj@data$var_genes
str(var_genes)
#>  chr [1:3029] "MGP" "LUM" "DCD" "DCN" "IGKV2D-28" "IGKV3-11" "SPINK1" ...

# if your have your own result, you can replace them with the following code

# object@data$var_genes <- your_own_var_genes

find_miRNA()

Find expressed miRNAs among all cells with find_miRNA(). Users need to provided EV-derived miRNAs and miRNA-target interactions (MiTIs) databases for find_miRNA(). mir_info is the system data.frame containing information of EV-derived miRNA of ā€œHumanā€, ā€œMouseā€, and ā€œRatā€. mir2tar is the system data.frame containing miRNA-target interactions of ā€œHumanā€, ā€œMouseā€, and ā€œRatā€.To use your own mir_info data.frame, please refer to demo_mir_info() and demo_mir2tar() to build a new one, e.g., zebrafish, Drosophila, C. elegans, etc. Detailed system data see the GitHub readme

Parameters of find_miRNA() see below:

  • object miRTalk object after create_miRTalk()
  • mir_info A data.frame of the system data containing information of EV-derived miRNA of ā€œHumanā€, ā€œMouseā€, and ā€œRatā€
  • mir2tar A data.frame of the system data containing miRNA-target interactions of ā€œHumanā€, ā€œMouseā€, and ā€œRatā€
  • min_percent Min percent of expressed cells for target genes of miRNA. Default is 0.05
  • database Which database of miRNA-target interactions to use, ā€œmiRTarBaseā€ and/or ā€œTarBaseā€. Default is the ā€œmiRTarBaseā€. It can also be ā€œTarBaseā€ or c(ā€œmiRTarBaseā€, ā€œTarBaseā€)
  • resolution Correct to precursor or mature miRNAs. Use ā€˜precursorā€™ or ā€˜matureā€™. Default is ā€˜matureā€™
  • regulation Inference of negative or positive regulation. Default is ā€œnegativeā€. Set it as ā€œpositiveā€ and set database as ā€œTarBaseā€ for inferring positive regulation.
  • EXOmotifA sequence called EXOmotif to help miRNA secretion in EVs such as ā€œCAUGā€, ā€œCGGGAGā€. Please refer to https://doi.org/10.1038/s41586-021-04234-3
  • if_use_human_data Whether to use homologous human data in mir_info and mir2tar for mouse or rat scRNA-seq data. For human scRNA-seq data, no need to do it. For mouse or rat data, you can set it TRUE.
  • if_combine Whether to use combined homologous mir_info and mir2tar when if_use_human_data is TRUE. Default is TRUE.
  • gene2gene A data.frame of the system data containing the gene orthologs among human, mouse, and rat. If if_use_human_data is TRUE, please provide it, like ā€œgene2gene = gene2geneā€
  • per_num Number of permutation test. Default is 1000
# find MiTIs with negative regulation by default using risc
obj <- find_miRNA(object = obj,
                  mir_info = mir_info,
                  mir2tar = mir2tar)

# find MiTIs with positive regulation by default using ritac
# obj <- find_miRNA(object = obj,
#                   mir_info = mir_info,
#                   mir2tar = mir2tar,
#                   regulation = "positive")

# Use different databases
# obj <- find_miRNA(object = obj,
#                   mir_info = mir_info,
#                   mir2tar = mir2tar,
#                   database = c("miRTarBase", "TarBase"))

# Use EXOmotif to refine EV-derived miRNAs
# obj <- find_miRNA(object = obj,
#                   mir_info = mir_info,
#                   mir2tar = mir2tar,
#                   EXOmotif = "CAUG")

# Correct to precursor miRNAs
# obj <- find_miRNA(object = obj,
#                   mir_info = mir_info,
#                   mir2tar = mir2tar,
#                   resolution = "precursor")

# Use human database (mir_info and mir2tar) for mouse or rat scRNA-seq data
# obj <- find_miRNA(object = obj,
#                   mir_info = mir_info,
#                   mir2tar = mir2tar,
#                   if_use_human_data = TRUE,
#                   gene2gene = gene2gene)

Note: see the wiki page for detailed examples with custom data

find_miRTalk()

Infer cell-cell communications mediated by EV-derived miRNAs from senders to receivers with find_miRTalk(). The result is a character stored obj@cci. Users can use get_miRTalk_cci() to get simple results of miRNA-target interactions.

Parameters of find_miRTalk() see below:

  • object miRTalk object after find_miRNA() and find_hvtg()
  • min_cell_num Min cell number for each cell type and expressed miRNA. Default is 10
  • min_percent Min percent of expressed cells for target genes of miRNA. Default is 0.05
  • pvalue Cutoff of p value. Default is 0.05
  • if_filter_miRNA Whether to filter the significantly highly expressed miRNAs. Default is FALSE
  • if_doParallel Use doParallel. Default is TRUE
  • use_n_cores umber of CPU cores to use. Default is 4
# infer cell-cell communications mediated by EV-derived miRNAs from senders to receivers
obj <- find_miRTalk(object = obj)
#> [condition]
obj
#> An object of class miRTalk 
#> 460 EV-derived miRNA-target interactions

# the result is a data.frame
cci <- obj@cci
str(cci)
#> 'data.frame':    460 obs. of  19 variables:
#>  $ celltype_sender           : chr  "Bcell" "Bcell" "Bcell" "Bcell" ...
#>  $ celltype_receiver         : chr  "Bcell" "Bcell" "Bcell" "Bcell" ...
#>  $ miRNA                     : chr  "hsa-miR-3916" "hsa-miR-4426" "hsa-miR-146a-5p" "hsa-miR-146a-5p" ...
#>  $ miR_gene                  : chr  "MIR3916" "MIR4426" "MIR146A" "MIR146A" ...
#>  $ percent_sender            : num  0.164 0.19 0.385 0.385 0.385 ...
#>  $ percent_receiver          : num  0.164 0.19 0.385 0.385 0.385 ...
#>  $ EVmiR_score               : num  0.0174 0.0117 0.0265 0.0265 0.0265 ...
#>  $ target_gene               : chr  "CLDN4" "SCD" "SPP1" "IRF7" ...
#>  $ target_gene_rank          : num  12281 7488 7071 7257 323 ...
#>  $ target_gene_activity      : num  0.00086 0.00989 0.01153 0.01078 0.26459 ...
#>  $ target_gene_mean_exp      : num  0.00417 0.04804 0.05596 0.05233 1.28454 ...
#>  $ target_gene_mean_exp_other: num  0.801 0.649 0.256 0.127 1.654 ...
#>  $ target_gene_percent       : num  0.313 0.398 0.193 0.193 0.976 ...
#>  $ target_gene_percent_other : num  0.815 0.85 0.329 0.303 0.931 ...
#>  $ pvalue                    : num  1.45e-26 1.72e-23 7.81e-03 1.52e-02 2.27e-02 ...
#>  $ sig                       : chr  "YES" "YES" "YES" "YES" ...
#>  $ score                     : num  0.01266 0.00402 0.00648 0.00711 0.00466 ...
#>  $ prob                      : num  0.042 0.013 0.01 0.008 0.007 0.007 0.006 0.005 0.005 0.004 ...
#>  $ condition                 : chr  "condition" "condition" "condition" "condition" ...

# get simple results of miRNA-target interactions
obj_cci <- get_miRTalk_cci(obj)
str(obj_cci)
#> 'data.frame':    449 obs. of  10 variables:
#>  $ celltype_sender     : chr  "Bcell" "Myeloid" "Tcell" "Tumor" ...
#>  $ celltype_receiver   : chr  "Bcell" "Bcell" "Bcell" "Bcell" ...
#>  $ miRNA               : chr  "hsa-miR-3916" "hsa-miR-3916" "hsa-miR-3916" "hsa-miR-3916" ...
#>  $ EVmiR_score         : num  0.0174 0.0238 0.0313 0.0448 0.0117 ...
#>  $ target_gene         : chr  "CLDN4" "CLDN4" "CLDN4" "CLDN4" ...
#>  $ target_gene_activity: num  0.00086 0.00086 0.00086 0.00086 0.00989 ...
#>  $ score               : num  0.01266 0.04056 0.03305 0.01867 0.00402 ...
#>  $ condition           : chr  "condition" "condition" "condition" "condition" ...
#>  $ miR2tar             : chr  "hsa-miR-3916:CLDN4" "hsa-miR-3916:CLDN4" "hsa-miR-3916:CLDN4" "hsa-miR-3916:CLDN4" ...
#>  $ specifity           : num  0.148 0.203 0.267 0.382 0.246 ...

Visualization

plot_miRTalk_chord()

Parameters of plot_miRTalk_chord() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot by order. Default is to plot all cell types
  • celltype_color Colors for the cell types, whose length must be equal to celltype
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • edge_color Colors for the edges from the sender cell type, whose length must be equal to celltype
  • edge_type Types for the edges from the sender cell type. Default is ā€œbig.arrowā€. ā€œellipseā€ for ellipse, ā€œtriangleā€ for triangle, ā€œcurvedā€ for curved. Details see circlize::chordDiagram()
  • show_type which type of miRNAs to show, ā€œnumberā€, ā€œEVmiR_scoreā€, or ā€œscoreā€ for sum of inferred miRNAs number, EVmiR_score, and MiTI_score, respectively. Default is ā€œnumberā€
  • if_show_autocrine Whether to show autocrine. Default is FALSE
  • text_size Size of text labels. Default is 1.5
  • y_scale y_scale to adjust the text. Default is 0.1
  • ... parameters pass to circlize::chordDiagram(), e.g., link.arr.width, link.arr.length, link.arr.col
plot_miRTalk_chord(object = obj)


# use condition parameter to plot results under different conditions separately

plot_miRTalk_circle()

Parameters of plot_miRTalk_circle() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. Default is to plot all cell types
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • celltype_color Colors for the cell types, whose length must be equal to celltype
  • edge_color Colors for the edges from the sender cell type, whose length must be equal to celltype
  • edge_type Types for the edges. ā€œfanā€ by default, ā€œlinkā€, ā€œhiveā€
  • show_type which type of miRNAs to show, ā€œnumberā€, ā€œEVmiR_scoreā€, or ā€œscoreā€ for sum of inferred miRNAs number, EVmiR_score, and MiTI_score, respectively. Default is ā€œnumberā€
  • if_show_autocrine Whether to show autocrine. Default is FALSE
  • edge_alpha Transparency of edge. Default is 0.5
  • node_size Size of node. Default is 10
  • text_size Size of text. Default is 5
plot_miRTalk_circle(object = obj)


# use condition parameter to plot results under different conditions separately

plot_miRTalk_circle_simple()

To show one or more senders or receivers by retaining all cell types, users can use plot_miRTalk_circle_simple() for plotting.

Parameters of plot_miRTalk_circle_simple() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. one or more cell types
  • celltype_dir which direction to plot, ā€œsenderā€ or ā€œreceiverā€. Default is as ā€œsenderā€
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • celltype_color Colors for the cell types, whose length must be equal to celltype
  • edge_color Colors for the edges from the sender cell type, whose length must be equal to celltype
  • edge_type Types for the edges. ā€œfanā€ by default, ā€œlinkā€, ā€œhiveā€
  • show_type which type of miRNAs to show, ā€œnumberā€, ā€œEVmiR_scoreā€, or ā€œscoreā€ for sum of inferred miRNAs number, EVmiR_score, and MiTI_score, respectively. Default is ā€œnumberā€
  • if_show_autocrine Whether to show autocrine. Default is FALSE
  • edge_alpha Transparency of edge. Default is 0.5
  • node_size Size of node. Default is 10
  • text_size Size of text. Default is 5
# as sender
plot_miRTalk_circle_simple(object = obj, celltype = "Tumor", celltype_dir = "sender")


# as receiver
plot_miRTalk_circle_simple(object = obj, celltype = "Tumor", celltype_dir = "reciver")


# use condition parameter to plot results under different conditions separately

plot_miRTalk_heatmap()

Parameters of plot_miRTalk_heatmap() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. Default is to plot all cell types
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • show_type which type of miRNAs to show, ā€œnumberā€, ā€œEVmiR_scoreā€, or ā€œscoreā€ for sum of inferred miRNAs number, EVmiR_score, and MiTI_score, respectively. Default is ā€œnumberā€
  • text_size Size of text labels. Default is 10
  • viridis_option option in viridis::scale_color_viridis, can be ā€œAā€, ā€œBā€, ā€œCā€, ā€œDā€, ā€œEā€, ā€œFā€, ā€œGā€, ā€œHā€. Default is ā€œDā€
  • ... parameters pass to heatmaply::heatmaply, e.g., grid_color, grid_width
plot_miRTalk_heatmap(object = obj)

# use condition parameter to plot results under different conditions separately

plot_miRTalk_sankey()

Parameters of plot_miRTalk_sankey() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot by order. Default is to plot all cell types
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • celltype_color Colors for the cell types, whose length must be equal to celltype
  • edge_color Colors for the edges from the sender cell type, whose length must be equal to celltype, Or use ā€œNOā€ to cancel it
  • show_type which type of miRNAs to show, ā€œnumberā€, ā€œEVmiR_scoreā€, or ā€œscoreā€ for sum of inferred miRNAs number, EVmiR_score, and MiTI_score, respectively. Default is ā€œnumberā€
  • if_show_autocrine Whether to show autocrine. Default is FALSE
  • edge_alpha Transparency of edge. Default is 0.5
  • node_size Size of node. Default is 40
  • text_size Size of text. Default is 15
  • node_pad Size of node padding. Numeric essentially influences the width height. Default is 20
  • ... parameters pass to networkD3::sankeyNetwork
plot_miRTalk_sankey(object = obj)

# use condition parameter to plot results under different conditions separately

plot_miR_heatmap()

Parameters of plot_miR_heatmap()see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. Default is to plot all cell types
  • miRNA which miRNAs to plot. Default is to plot all inferred miRNAs
  • text_size Size of text labels. Default is 10
  • if_horizontal Whether to plot with the horizontal direction. Default is TRUE
  • viridis_option option in viridis::scale_color_viridis, can be ā€œAā€, ā€œBā€, ā€œCā€, ā€œDā€, ā€œEā€, ā€œFā€, ā€œGā€, ā€œHā€. Default is ā€œDā€.
  • ... parameters pass to heatmaply::heatmaply, e.g., grid_color, grid_width
plot_miR_heatmap(object = obj)

# use condition parameter to plot results under different conditions separately

plot_target_heatmap()

Parameters of plot_target_heatmap()see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. Default is to plot all cell types
  • targetgenes which targetgenes to plot. Default is to plot all inferred target genes in receivers
  • limits A parameter used in heatmaply::heatmaply, a two dimensional numeric vector specifying the data range for the scale. Default is 0-1
  • text_size Size of text labels. Default is 10
  • if_horizontal Whether to plot with the horizontal direction. Default is TRUE
  • viridis_option option in viridis::scale_color_viridis, can be ā€œAā€, ā€œBā€, ā€œCā€, ā€œDā€, ā€œEā€, ā€œFā€, ā€œGā€, ā€œHā€. Default is ā€œDā€.
  • ... parameters pass to heatmaply::heatmaply, e.g., grid_color, grid_width
plot_target_heatmap(object = obj, celltype = "Bcell")

# use condition parameter to plot results under different conditions separately

plot_miR_bubble()

Parameters of plot_miR_bubble() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype which cell types to plot. Default is to plot all cell types
  • miRNA which miRNAs to plot. Default is to plot all inferred miRNAs
  • if_show_autocrine Whether to show autocrine. Default is FALSE
  • if_horizontal Whether to plot with the horizontal direction. Default is TRUE
  • viridis_option option in viridis::scale_color_viridis, can be ā€œAā€, ā€œBā€, ā€œCā€, ā€œDā€, ā€œEā€, ā€œFā€, ā€œGā€, ā€œHā€. Default is ā€œDā€.
plot_miR_bubble(object = obj)


# use condition parameter to plot results under different conditions separately

plot_miR2tar_chord()

Parameters of plot_miR2tar_chord() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype_sender Name of celltype_sender. One or more cell types
  • celltype_receiver Name of celltype_receiver. One or more cell types
  • celltype_color Colors for the celltype_sender nodes and celltype_receiver nodes, or use ā€œNOā€ to make it simple
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • edge_color Colors for the edges from the sender cell type
  • edge_type Types for the edges from the sender cell type. Default is ā€œcircleā€, ā€œbig.arrowā€ for big arrow, ā€œtriangleā€ for triangle, ā€œellipseā€ for ellipse, ā€œcurvedā€ for curved. Details see circlize::chordDiagram
  • text_size Size of text labels. Default is 0.5
  • y_scale y_scale to adjust the text. Default is 1
  • ... parameters pass to circlize::chordDiagram, e.g., link.arr.width, link.arr.length, link.arr.col
plot_miR2tar_chord(obj, celltype_sender = "Tumor", celltype_receiver = "Bcell")


# use condition parameter to plot results under different conditions separately

plot_miR2tar_circle()

Parameters of plot_miR2tar_circle() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype_sender Name of celltype_sender. One or more cell types
  • celltype_receiver Name of celltype_receiver. One or more cell types
  • celltype_color Colors for the celltype_sender nodes and celltype_receiver nodes, or use ā€œNOā€ to make it simple
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • node_size Size of node. Default is 3
  • edge_color Colors for the edges from the sender cell type
  • text_size Size of text labels. Default is 3
  • edge_width y_scale to adjust the text. Default is 0.5
  • if_show_legend Whether to show legends. Default is FALSE
plot_miR2tar_circle(obj, celltype_sender = "Tumor", celltype_receiver = "Bcell")


plot_miR2tar_circle(obj, celltype_sender = "Tumor", celltype_receiver = "Bcell", celltype_color = "NO")


# use condition parameter to plot results under different conditions separately

plot_miR2tar_heatmap()

Parameters of plot_miR2tar_heatmap() see below:

  • object miRTalk object after find_miRTalk()
  • condition which conditions to plot. Default is plot all conditions
  • celltype_sender Name of celltype_sender. One or more cell types
  • celltype_receiver Name of celltype_receiver. One or more cell types
  • miRNA which miRNAs to use. Default is to plot all inferred miRNAs
  • text_size Size of text labels. Default is 3
  • if_horizontal Whether to plot with the horizontal direction. Default is TRUE
  • viridis_option option in viridis::scale_color_viridis, can be ā€œAā€, ā€œBā€, ā€œCā€, ā€œDā€, ā€œEā€, ā€œFā€, ā€œGā€, ā€œHā€. Default is ā€œDā€.
  • ... parameters pass to heatmaply::heatmaply, e.g., grid_color
plot_miR2tar_heatmap(obj, celltype_sender = "Tumor", celltype_receiver = "Bcell", grid_color = "black")

# use condition parameter to plot results under different conditions separately

Note

We add analysis of functional annotations for a miRNA and its target gene, for example, overlapped/shared pathways, use get_miRTalk_pathway(). Detailed see the wiki page

Parameters of get_miRTalk_pathway() see below:

  • object miRTalk object after find_miRTalk()
  • gene2path A data.frame of the system data containing gene-related pathways from KEGG, Reactome, GO_BP, Wikipathways
  • mir2path A data.frame of the system data containing miRNA-related pathways from KEGG, Reactome, GO_BP, Wikipathways
  • miRNA which miRNAs to analyze. Default is all inferred miRNAs in senders.
  • targetgenes which targetgenes to analyze. Default is all inferred target genes in receivers.
# get pathways
res_pathway <- get_miRTalk_pathway(object = obj,
                                     gene2path = gene2path,
                                     mir2path = mir2path,
                                     miRNA = "hsa-miR-133a-3p",
                                     targetgenes = "ANXA2")

str(res_pathway[[1]]$miRNA_term) # pathways for hsa-miR-133a-3p
#>  chr [1:382] "CELLULAR RESPONSE TO GLUCOCORTICOID STIMULUS" "ANGIOGENESIS" ...

str(res_pathway[[2]]$target_gene_term) # pathways for ANXA2
#>  chr [1:173] "THE PROCESS IN WHICH INACTIVE PLASMINOGEN IS PROCESSED TO ACTIVE PLASMIN. THIS PROCESS INCLUDES CLEAVAGE AT AN "| __truncated__ ...

res_pathway[[3]]$miRNA_term # overlapped/shared pathways
#>  [1] "ANGIOGENESIS"                                                                          
#>  [2] "INNATE IMMUNE SYSTEM"                                                                  
#>  [3] "GENE AND PROTEIN EXPRESSION BY JAK-STAT SIGNALING AFTER INTERLEUKIN-12 STIMULATION"    
#>  [4] "SIGNALING BY INTERLEUKINS"                                                             
#>  [5] "INTERLEUKIN-12 SIGNALING"                                                              
#>  [6] "MUSCLE CONTRACTION"                                                                    
#>  [7] "NEUTROPHIL DEGRANULATION"                                                              
#>  [8] "SMOOTH MUSCLE CONTRACTION"                                                             
#>  [9] "OSTEOCLAST DEVELOPMENT"                                                                
#> [10] "MUSCLE CONTRACTION"                                                                    
#> [11] "INTERLEUKIN-12 FAMILY SIGNALING"                                                       
#> [12] "NEUTROPHIL DEGRANULATION"                                                              
#> [13] "POSITIVE REGULATION OF LOW-DENSITY LIPOPROTEIN PARTICLE CLEARANCE"                     
#> [14] "POSITIVE REGULATION OF TRANSCRIPTION BY RNA POLYMERASE II"                             
#> [15] "POSITIVE REGULATION OF RECEPTOR-MEDIATED ENDOCYTOSIS INVOLVED IN CHOLESTEROL TRANSPORT"

We add analysis of potential of circulating miRNAs and organā€organ communication, use get_miRTalk_circulating_score(). Detailed see the wiki page

Parameters of get_miRTalk_circulating_score() see below:

  • object miRTalk object after find_miRTalk()
library(ggplot2)
# get circulating miRNAs
res_circulating <- get_miRTalk_circulating_score(obj)
str(res_circulating)
#> 'data.frame':    164 obs. of  7 variables:
#>  $ miRNA            : chr  "hsa-miR-146a-5p" "hsa-miR-146a-5p" "hsa-miR-146a-5p" "hsa-miR-146a-5p" ...
#>  $ tissue_TarBase   : chr  "Kidney; Pleura; Lymphatic tissue; Cervix; Bone marrow; Umbilical vein; Pancreas; Brain - Motor cortex; Brain - "| __truncated__ "Kidney; Pleura; Lymphatic tissue; Cervix; Bone marrow; Umbilical vein; Pancreas; Brain - Motor cortex; Brain - "| __truncated__ "Kidney; Pleura; Lymphatic tissue; Cervix; Bone marrow; Umbilical vein; Pancreas; Brain - Motor cortex; Brain - "| __truncated__ "Kidney; Pleura; Lymphatic tissue; Cervix; Bone marrow; Umbilical vein; Pancreas; Brain - Motor cortex; Brain - "| __truncated__ ...
#>  $ score            : num  0.661 0.661 0.661 0.661 0.661 ...
#>  $ miR_gene         : chr  "MIR146A" "MIR146A" "MIR146A" "MIR146A" ...
#>  $ celltype_receiver: chr  "Tcell" "Tumor" "Bcell" "Bcell" ...
#>  $ target_gene      : chr  "MYLK" "CD80" "SPP1" "HSPA1A" ...
#>  $ condition        : chr  "condition" "condition" "condition" "condition" ...

#plotting
res_circulating$celltype_receiver <- paste0(res_circulating$condition,"_",res_circulating$celltype_receiver)
res_circulating <- unique(res_circulating[,c("miRNA","score","celltype_receiver")])
res_cir_plot <- reshape2::dcast(data = res_circulating, formula = miRNA ~ celltype_receiver, value.var = "score", fun.aggregate = mean, fill = 0)
rownames(res_cir_plot) <- res_cir_plot$miRNA
res_cir_plot <- res_cir_plot[,-1]
heat_col <- viridis::viridis(n = 256, alpha = 1, begin = 0, end = 1, option = "D")
heatmaply::heatmaply(x = as.matrix(res_cir_plot), colors = heat_col, limits = c(0,1),dendrogram = "none",  margins = c(60,100,40,20), titleX = FALSE, main = "Circulating potential", branches_lwd = 0.1, fontsize_row = 10, fontsize_col = 10, labCol = colnames(res_cir_plot), labRow = rownames(res_cir_plot), heatmap_layers = theme(axis.line=element_blank()))
sessionInfo()
#> R version 4.2.1 (2022-06-23)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#> 
#> Matrix products: default
#> BLAS:   /slurm/soft/R/4.2.1/lib64/R/lib/libRblas.so
#> LAPACK: /slurm/soft/R/4.2.1/lib64/R/lib/libRlapack.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] parallel  stats     graphics  grDevices utils     datasets  methods  
#> [8] base     
#> 
#> other attached packages:
#> [1] ggplot2_3.4.2     miRTalk_1.0       doParallel_1.0.17 iterators_1.0.14 
#> [5] foreach_1.5.2    
#> 
#> loaded via a namespace (and not attached):
#>   [1] circlize_0.4.15        plyr_1.8.8             igraph_1.5.0          
#>   [4] lazyeval_0.2.2         sp_2.0-0               splines_4.2.1         
#>   [7] crosstalk_1.2.0        listenv_0.9.0          scattermore_1.2       
#>  [10] digest_0.6.31          ca_0.71.1              htmltools_0.5.5       
#>  [13] viridis_0.6.3          fansi_1.0.4            magrittr_2.0.3        
#>  [16] tensor_1.5             cluster_2.1.3          ROCR_1.0-11           
#>  [19] limma_3.54.2           globals_0.16.2         graphlayouts_1.1.0    
#>  [22] matrixStats_1.0.0      spatstat.sparse_3.0-2  prettyunits_1.1.1     
#>  [25] rmdformats_1.0.4       colorspace_2.1-0       ggrepel_0.9.3         
#>  [28] xfun_0.39              dplyr_1.1.2            crayon_1.5.2          
#>  [31] jsonlite_1.8.5         progressr_0.13.0       spatstat.data_3.0-1   
#>  [34] survival_3.3-1         zoo_1.8-12             glue_1.6.2            
#>  [37] polyclip_1.10-4        registry_0.5-1         gtable_0.3.3          
#>  [40] webshot_0.5.5          leiden_0.4.3           future.apply_1.11.0   
#>  [43] shape_1.4.6            abind_1.4-5            scales_1.2.1          
#>  [46] pheatmap_1.0.12        spatstat.random_3.1-5  miniUI_0.1.1.1        
#>  [49] Rcpp_1.0.10            progress_1.2.2         viridisLite_0.4.2     
#>  [52] xtable_1.8-4           reticulate_1.30        datawizard_0.12.0     
#>  [55] htmlwidgets_1.6.2      httr_1.4.6             RColorBrewer_1.1-3    
#>  [58] ellipsis_0.3.2         Seurat_4.3.0.1         ica_1.0-3             
#>  [61] pkgconfig_2.0.3        farver_2.1.1           sass_0.4.6            
#>  [64] uwot_0.1.14            deldir_1.0-9           utf8_1.2.3            
#>  [67] labeling_0.4.2         tidyselect_1.2.0       rlang_1.1.1           
#>  [70] reshape2_1.4.4         later_1.3.1            munsell_0.5.0         
#>  [73] tools_4.2.1            cachem_1.0.8           cli_3.6.1             
#>  [76] generics_0.1.3         ggridges_0.5.4         evaluate_0.21         
#>  [79] stringr_1.5.0          fastmap_1.1.1          heatmaply_1.5.0       
#>  [82] yaml_2.3.7             goftest_1.2-3          knitr_1.43            
#>  [85] fitdistrplus_1.1-11    tidygraph_1.3.0        purrr_1.0.1           
#>  [88] RANN_2.6.1             dendextend_1.17.1      ggraph_2.1.0          
#>  [91] pbapply_1.7-0          future_1.32.0          nlme_3.1-157          
#>  [94] mime_0.12              correlation_0.8.5      compiler_4.2.1        
#>  [97] rstudioapi_0.14        plotly_4.10.2          png_0.1-8             
#> [100] spatstat.utils_3.0-5   tibble_3.2.1           tweenr_2.0.2          
#> [103] bslib_0.5.0            stringi_1.7.12         highr_0.10            
#> [106] lattice_0.20-45        Matrix_1.5-4.1         vctrs_0.6.3           
#> [109] networkD3_0.4          pillar_1.9.0           lifecycle_1.0.3       
#> [112] spatstat.geom_3.2-1    lmtest_0.9-40          jquerylib_0.1.4       
#> [115] GlobalOptions_0.1.2    RcppAnnoy_0.0.20       insight_0.20.1        
#> [118] data.table_1.14.8      cowplot_1.1.1          irlba_2.3.5.1         
#> [121] seriation_1.5.4        httpuv_1.6.11          patchwork_1.1.2       
#> [124] R6_2.5.1               bookdown_0.40          promises_1.2.0.1      
#> [127] TSP_1.2-4              KernSmooth_2.23-20     gridExtra_2.3         
#> [130] parallelly_1.36.0      codetools_0.2-18       MASS_7.3-57           
#> [133] assertthat_0.2.1       withr_2.5.0            SeuratObject_4.1.3    
#> [136] sctransform_0.3.5      bayestestR_0.13.2      hms_1.1.3             
#> [139] grid_4.2.1             tidyr_1.3.0            rmarkdown_2.22        
#> [142] Rtsne_0.16             spatstat.explore_3.2-1 ggforce_0.4.1         
#> [145] shiny_1.7.4

About

Please refer to the miRTalk on GitHub or the document for more information.