This file contains hidden or 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
library("igraph") | |
set.seed(1) | |
n_nodes <- 20000 | |
raw_graph <- sample_forestfire(n_nodes, 0.1) | |
graph_data <- get.data.frame(raw_graph) | |
graph_data <- graph_data[, c("from", "to")] | |
graph_data$weight <- rnorm(nrow(graph_data)) | |
graph <- graph.data.frame(graph_data) |
This file contains hidden or 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
# Handy packages! | |
## here | |
# Provides a relative file path from your project directory | |
# | |
# https://here.r-lib.org/ | |
# https://cran.r-project.org/web/packages/here/index.html | |
# https://github.com/r-lib/here |
This file contains hidden or 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
#' Splat simulation (fixed genes) | |
#' | |
#' Modified version of the splatSimulate function that allows the gene means to | |
#' be fixed | |
#' | |
#' @param params SplatParams object containing parameters for the simulation. | |
#' See \code{\link{SplatParams}} for details. | |
#' @param means vector of gene means, must be the same length as the number of | |
#' genes to simulate | |
#' @param method which simulation method to use. Options are "single" which |
This file contains hidden or 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
url | name | user | type | |
---|---|---|---|---|
https://bioconductor.org/packages/splatter | splatter | NA | Bioconductor | |
https://bioconductor.org/packages/Sushi | Sushi | NA | Bioconductor | |
https://bioconductor.org/packages/diffHic | diffHic | NA | Bioconductor | |
https://bioconductor.org/packages/miRBaseConverter | miRBaseConverter | NA | Bioconductor | |
https://bioconductor.org/packages/miRLAB | miRLAB | NA | Bioconductor | |
https://bioconductor.org/packages/miRsponge | miRsponge | NA | Bioconductor | |
https://bioconductor.org/packages/scPipe | scPipe | NA | Bioconductor | |
https://bioconductor.org/packages/ClassifyR | ClassifyR | NA | Bioconductor | |
https://bioconductor.org/packages/monocle | monocle | NA | Bioconductor |
This file contains hidden or 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
#' Get tree nodes | |
#' | |
#' Get the nodes required for a clustering tree | |
#' | |
#' @param clusterings data.frame describing clusterings at different | |
#' resolutions. Columns must be named "res.X" where X is numeric and indicates | |
#' the clustering resolution. | |
#' @param tSNE data.frame giving the t-SNE positions of each cell | |
#' | |
#' @return data.frame contining the nodes of a clustering tree |