This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' symlog transformation | |
#' | |
#' `symlog_trans()` transforms data using `log(x)` for `abs(x) > thr`, where | |
#' `thr` is a tuneable threshold, but leaves the data linear for `abs(x) < thr`. | |
#' (credit for base code to https://stackoverflow.com/users/1320535/julius-vainora) | |
#' | |
#' | |
#' @param base base of logarithm | |
#' @param thr numeric threshold for transitioning from log to linear | |
#' @param scale numeric scaling factor for data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Anton Kratz | |
# date: Sat Jul 21 17:03:22 PDT 2018 | |
suppressPackageStartupMessages(library("igraph")) | |
suppressPackageStartupMessages(library("ggplot2")) | |
# Load the PG Yeast Net file - two large components and many small ones | |
rf <- read.table("~/git/assets/INT.PG.YeastNet.v3.2463gene.54496link.txt", sep="\t") | |
akg <- graph_from_data_frame(rf, directed = FALSE, vertices = NULL) | |
# List of degrees |