View source: R/pipeline_functions.R
draw.targetNet | R Documentation |
draw.targetNet
draws a network structure to display the target genes of one selected driver. Edges of positively-regulated target genes are orange,
edges of negatively-regulated target genes are green. The width of the edges shows the strength of regulation.
draw.targetNet(
source_label = "",
source_z = NULL,
edge_score = NULL,
label_cex = 0.7,
source_cex = 1,
pdf_file = NULL,
arrow_direction = "out",
n_layer = 1,
alphabetical_order = FALSE
)
source_label |
character, the label of selected one driver. |
source_z |
numeric, the Z-statistic of the selected driver. The color shade of driver's node in the network is decided by this Z-statistic. If NULL, the driver node will be colored grey. Default is NULL. |
edge_score |
a named vector of numerics, indicating the correlation between the driver and its target genes. The range of the numeric value is from -1 to 1. Positive value means it is positively-regulated by driver and vice versa. The names of the vector are gene names. |
label_cex |
numeric, giving the amount by which the text of target gene names should be magnified relative to the default. Default is 0.7. |
source_cex |
numeric, giving the amount by which the text of driver name should be magnified relative to the default. Default is 1. |
pdf_file |
character, the file path to save as PDF file. If NULL, no PDF file will be saved. Default is NULL. |
arrow_direction |
character, users can choose between "in" and "out". Default is "out". |
n_layer |
integer, number of circle layers to display. Default is 1. |
alphabetical_order |
logical, if TRUE, the targe gene names will be sorted alphabetically. If FALSE, will be sorted by statistics. Default is FALSE. |
Return a logical value. If TRUE, the plot has been created successfully.
source_label <- 'test1'
source_z <- 1.96
edge_score <- (sample(1:200,size=100,replace=TRUE)-100)/100
names(edge_score) <- paste0('G',1:100)
draw.targetNet(source_label=source_label,source_z=source_z,
edge_score=edge_score)
draw.targetNet(source_label=source_label,source_z=source_z,
edge_score=edge_score,n_layer=2)
draw.targetNet(source_label=source_label,source_z=source_z,
edge_score=edge_score,
arrow_direction='in',
source_cex=2)
## Not run:
source_label <- 'test1'
source_z <- 1.96
edge_score <- (sample(1:200,size=100,replace=TRUE)-100)/100
names(edge_score) <- paste0('G',1:100)
analysis.par <- list()
analysis.par$out.dir.PLOT <- getwd()
draw.targetNet(source_label=source_label,source_z=source_z,
edge_score=edge_score,
pdf_file=sprintf('%s/targetNet.pdf',
analysis.par$out.dir.PLOT))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.