sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
2a49df481f154722e6721592814feea6e240ebeb740ade409f5f16f76cfb873b | R | 28,454 | 964 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_shap_summary (generic) --------------------------------------------------
#' @title Plot SHAP summary.
#'
#' @description This method creates plots that show a summary of SHAP values
#' obtained from the data stored in a familiarCollecti... |
76d9f0dddc64c4a58b5d3989f09431e80c5baa64669f6c8405607f466d3c5ced | R | 28,510 | 1,001 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarDataElementFeatureSimilarity object ----------------------------------
setClass(
"familiarDataElementFeatureSimilarity",
contains = "familiarDataElement",
slots = list(
"similarity_metric" = "character",
"cluster_method" = "c... |
94be18330ae49fea72f05f436f0d507a6969ff43de79b28d0c1ec642ff75dcca | R | 28,605 | 541 | #!/usr/bin/env Rscript
# =============================================================================
# workflow_visiumhd_mini_crc.R
#
# Every Visium HD command we support, run on the visiumhd_mini_crc fixture, in
# memory (Giotto) and on disk (GiottoDisk), with one report line per step.
# Where the two backends shoul... |
4395748126a4639376dee04ddf10f54fa38433e008fbf028306fec2ac5c664e3 | R | 28,641 | 718 | ---
title: "Bsh and CaTaDa in L4/L5 neurons"
output:
html_document:
toc: true
toc_float: true
toc_collapsed: false
toc_depth: 3
number_sections: false
---
# Introduction
The following analyses were used in Xu et al, *eLife*, 2023 (in press). They make use of CATaDa (i.e. Dam-only binding data) a... |
c181bd4bfdb083a522ffe8c544ad63a6ec4dd723809602e13b8217e9dbfec4cb | R | 28,762 | 993 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarRFSRC ----------------------------------------------------------------
setClass("familiarRFSRC",
contains = "familiarModel",
slots = list("seed" = "ANY"),
prototype = list("seed" = NULL)
)
# familiarRFSRCDefault -----------------... |
38edc5683e6dda4b67526a177c4bfaf4ef100b6d03e197e620fbda59a845bd51 | R | 28,800 | 1,070 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
as_metric <- function(metric, outcome_type, ...) {
if (metric %in% .get_available_auc_roc_metrics()) {
metric_object <- do.call(
methods::new,
args = c(
list(
"Class" = "familiarMetricAUCROC",
"metric" = m... |
ce2affb27fb7e2859eb6d7fd72578d6ac9c13d8229445c5db8db1c41b4119f14 | R | 29,035 | 755 | #' Canonical Correspondence Analysis and Redundancy Analysis
#'
#' These functions perform Canonical Correspondence Analysis on data stored
#' in a \code{SummarizedExperiment}.
#'
#' @inheritParams getDominant
#' @inheritParams getDissimilarity
#'
#' @param assay.type \code{Character scalar}. Specifies the name of assa... |
0128d67107a830e340c47ec88b9c6a058a598a794c2fa97e9151413ae65ff5f4 | R | 29,045 | 446 | #' Generates alpha diversity boxplots per metadata category using a SummarizedExperiment object as input
#' @param ExpObj JAMS-style SummarizedExperiment object
#' @param measures String giving the alpha diversity measurements used to quantify the alpha diversity within each category. Default includes Observed, Chao1... |
d78d6a3f14d1241f6fcbbbadcaaba5c8b172ad24a95878e6950df023e17e96a6 | R | 29,135 | 837 | ---
title: "Setbp1_DGEkidney_06"
author: "Jordan Whitlock"
date: '2022-09-14'
output:
html_document:
toc: true
toc_depth: 2
toc_float: true
---
This analysis comes after 'Setbp1_CellTypesKidney_postSoup_05.Rmd' and precedes 'Setbp1_PathwayAnalysisCortexKidney_07.Rmd'
# *Single-nuclei analysis... |
18a619e2cdd294bf9cf743123cdc0398e051c8f25fb483fd98b1c48ecac5c594 | R | 29,144 | 819 | #' Functions for accessing taxonomic data stored in \code{rowData}.
#'
#' These function work on data present in \code{rowData} and define a way to
#' represent taxonomic data alongside the features of a
#' \code{SummarizedExperiment}.
#'
#' \code{taxonomyRanks} returns, which columns of \code{rowData(x)} are regarded
... |
9012d681a87925193633d30df1da6ff97471e6b4ad5bfb57dabf9aec3b3e54ad | R | 29,203 | 972 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarXGBoost --------------------------------------------------------------
setClass(
"familiarXGBoost",
contains = "familiarModel",
slots = list(
"encoding_reference_table" = "ANY",
"feature_order" = "character"
),
prototype ... |
1d42b34284dcc75ed5639e6e3a3b75b6c14b25f77e624f5d8b393e4abb10c271 | R | 29,487 | 1,038 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarDataElementDecisionCurve object --------------------------------------
setClass(
"familiarDataElementDecisionCurve",
contains = "familiarDataElement",
prototype = methods::prototype(
value_column = "net_benefit",
grouping_co... |
19ad8cc2af518f897224b5b2b53940d3d3750fe43abe971df5d642ca5fb241db | R | 29,642 | 1,101 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
#' @include PredictionTable.R
NULL
# familiarDataElementRiskStrata (object) ---------------------------------------
setClass(
"familiarDataElementRiskStrata",
contains = "familiarDataElement"
)
# familiarDataElementRiskHazardRatio (object) --------... |
b083fb75bc691b8c65027703d24707432a3a077ce372997f0de6b673f46debb5 | R | 29,894 | 1,106 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# as_familiar_ensemble (generic) -----------------------------------------------
#' @title Conversion to familiarEnsemble object.
#'
#' @description Creates `familiarEnsemble` a object from `familiarModel`
#' objects.
#'
#' @param object A `fam... |
b74162f929070f642862331f12e51981d3059dd6e8e3d540e4ab442ac3e13f17 | R | 30,000 | 570 | ---
title: "Variable importance methods"
author: "Alex Zwanenburg"
date: "2026-08-21"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
in_header: familiar_logo.html... |
196e226cb6c5d06dd72c84e09ac45aa4210e2dccb3c87d6f8401dd6710b4f775 | R | 30,065 | 536 | #!/usr/bin/Rscript
################################################################################################################
#### Top n connected genes as hubs + check enrichment for driver genes
################################################################################################################
l... |
9964a6739a9525a6a0a4ceb1488fef8c70999334a9e291bffa8c77523af9fcb7 | R | 30,070 | 572 | ---
title: "Variable importance methods"
author: "Alex Zwanenburg"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
in_header: familiar_logo.... |
71b28e368537608af4cd8801e7ac7e82abb0baa612adf327920e85e31f3ce532 | R | 30,307 | 1,063 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# complete_familiar_ensemble ---------------------------------------------------
setMethod(
"complete_familiar_ensemble",
signature(object = "familiarEnsemble"),
function(
object,
dir_path = NULL,
message_indent = 0L,
verbose =... |
b70b8531e32966a11441749f57da4cf1347073f92bb6d7fe16fb3fb40ba8d957 | R | 30,781 | 845 | ##############
### Script ###
##############
# Run BLESS (= Bayesian Lesion Estimation for a Structured Spike-and-Slab Prior) with shared CAR prior over sparsity parameters
# over all covariates (Code for Simulation Study).
#################
### Libraries ###
#################
library(hutils)
library(brglm2)
librar... |
4e48b82813948da2b8d49162281791946292d038250f331ac9a97d5cef4c21b1 | R | 31,577 | 1,079 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarDataElementPermutationVimp object ------------------------------------
setClass(
"familiarDataElementPermutationVimp",
contains = "familiarDataElement",
slots = list("similarity_metric" = "character"),
prototype = methods::prototy... |
f0d0937248e14ac772beb1ca4b71a2fc7b75f888bbc87062a688b31aede59e84 | R | 31,637 | 711 | context("transformAssay")
test_that("transformAssay", {
testTransformations <- function(tse){
# No method specified. Should be an error.
expect_error(mia::transformAssay(tse))
# Method is not provided. Should be an error.
expect_error(mia::transformAssay(tse, method="test"))
... |
77cfb70ac437ddb6d2c7debc0a04231bb196d66437b2c2d57de956b92957a31c | R | 31,730 | 1,015 | ---
title: "Setbp1_QC_01"
author: "Jordan Whitlock"
date: '2022-09-06'
output:
html_document:
toc: true
toc_depth: 2
toc_float: true
---
# *Single-nuclei analysis: Quality Control*
* load in data and create Seurat objects
* check proportion of mitochondrial and ribosomal genes
* visualize data ... |
ece0082910c633d5f9c21500fb2a398ca648da96867adae28f503ee17aeeec79 | R | 31,807 | 1,144 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarGLMnet objects -------------------------------------------------------
## familiarGLMnet parent -------------------------------------------------------
setClass(
"familiarGLMnet",
contains = "familiarModel",
slots = list(
"encod... |
c9bea6023ffcf52d48c1bc32cce01084e7b3fc0feb6f8078ed90da60028bb0f8 | R | 31,969 | 548 | #######################################################################################################################################################################
##
##Basic regNet code usage examples.
##
##############################################################################################################... |
f4b062a5a417d436a3ca3af76ed3836e13458f6c03626cac9f6ff36e79b49dfe | R | 32,078 | 1,082 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_permutation_variable_importance (generic) -------------------------------
#' @title Plot permutation variable importance.
#'
#' @description This function plots the data on permutation variable importance
#' stored in a familiarCollectio... |
8dc53feec7e94f98ec573e95bc458c48d4e0a24fdc496b3e039f2f4ef6b7a435 | R | 32,131 | 983 |
#' @title determine_cores
#' @description guesses how many cores to use
#' @return numeric
#' @keywords internal
determine_cores = function(cores, min_cores = 1, max_cores = 10) {
if(is.na(cores) | !is.numeric(cores) | (is.numeric(cores) & cores <= 0)) {
cores = parallel::detectCores()
if(cores <= 2) {
... |
8a386904362ad86838d1ae457dcd6218f3d5d7c3301723a7916d09a9ec8e3345 | R | 32,346 | 1,250 | .start_cluster <- function(n_cores = NULL, cluster_type = NULL) {
# Start a cluster of workers
# Load from familiar global environment if unset.
if (is.null(n_cores)) n_cores <- .get_desired_n_cores()
if (is.null(cluster_type)) cluster_type <- .get_selected_cluster_type()
if (cluster_type == "none") return(... |
31c90c92d93ae851a210eb9cdbb793e848003bf7fab6f26f699a230c0f088a28 | R | 32,507 | 749 | ##############
### Script ###
##############
# File for plotting figures that contain comparison of posterior marginal distributions via KL-divergence & Wasserstein distance,
# as well as comparison of posterior means and standard deviations, between BB-BLESS, BLESS-VI and BLESS-Gibbs
# (Code for Simulation Study)
#... |
a6b96eb3a8fbe6941f4e61386858366caad54de2ff41770c8dbfbf8ae1671f2c | R | 32,562 | 868 | ##############
### Script ###
##############
# Run BLESS (= Bayesian Lesion Estimation for a Structured Spike-and-Slab Prior) with MCAR prior over sparsity parameters.
# (Code for Simulation Study)
#################
### Libraries ###
#################
library(hutils)
library(brglm2)
library(logOfGamma)
############... |
97369a634f9969dab50dd2640d1cbc8297240de4e43023f51db9b2db9b84d913 | R | 32,725 | 1,212 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
##### is_empty-------------------------------------------------------------------
setMethod(
"is_empty",
signature(x = "NULL"),
function(x, ...) {
return(TRUE)
}
)
setMethod(
"is_empty",
signature(x = "data.table"),
function(x, ...) {... |
66707da2ebe3850a74a960e687aa42258fa1a2ad8d196d58ff180f6867a60905 | R | 33,557 | 342 | ---
title: "A streamlined workflow for long-read DNA methylation analysis with NanoMethViz and Bioconductor"
author:
- name: Shian Su
affiliation: "The Walter and Eliza Hall Institute of Medical Research, Parkville, Victoria, Australia; Department of Medical Biology, The University of Melbourne, Parkville, Victor... |
831592375ce61440475f0e7900f7484ff3cdb92e83aa867f6dbc9f653b927d95 | R | 33,692 | 1,125 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_feature_similarity (generic) --------------------------------------------
#' @title Plot heatmaps for pairwise similarity between features.
#'
#' @description This method creates a heatmap based on data stored in a
#' `familiarCollection` ... |
3118df2d9f5453d03811092cbecd037315a7ce7e44ef2e5b2dae697f0fb35e92 | R | 33,925 | 930 | # Skip on CRAN as this test takes quite some time.
testthat::skip_on_cran()
testthat::skip_on_ci()
verbose <- FALSE
# Create test parameters. This is actually a generator, which makes it easier to
# nest all the different combinations that should be checked.
generate_test_parameters <- coro::generator(function(
s... |
3ecb50e651b1c1147b98c4a56f7521c0c9392f896cddbabbfdcb9f495b662ded | R | 34,131 | 790 | #' Estimate alpha diversity indices
#'
#' These functions estimates alpha diversity indices optionally using
#' rarefaction.
#'
#' @inheritParams calculateDMN
#'
#' @param x a \code{\link[SummarizedExperiment]{SummarizedExperiment}} object.
#'
#' @param assay.type \code{Character scalar}. Specifies the name of assay
#'... |
a75e2849e29423c341a8319d320a0500e518f46fba7c1a8dcfd507d1933bdff0 | R | 34,172 | 738 | ##################################
# TFs with DNAme disorder + TF activity
# Updated: 2021.05.20
# Author: Kevin J.
###################################
# Working directory for this analysis.
mybasedir = "/Users/johnsk/github/"
setwd(mybasedir)
###################################
# Necessary packages:
library(tidyvers... |
1e9f2e4a104a3c4864ff5f836173844fd5de5939d57716f33696745bf1f8bb36 | R | 34,880 | 920 | ################################################################################
# This function gives user a message when the package is loaded into the session
.onAttach <- function(libname, pkgname) {
pkg_version <- utils::packageDescription(pkgname, fields = "Version")
msg <- paste0(
"This is ", pkg... |
2f0cd372969a3ab07677283fd3d075e2657d07d03c23a4b89c1fff693e6c1e18 | R | 35,092 | 623 | #!/usr/bin/Rscript
################################################################################################################
#### Top n connected genes as hubs + check enrichment for driver genes
################################################################################################################
l... |
b5d539dfbb4d12aa6e7b56edda3046dba866271ed752f0b4d9939051ae63b8e3 | R | 36,018 | 967 | # function ppi construction
ppi <- function(species_code, score_cutoff, string_version, data){
print("creating a new STRINGdb class with specified version, species, and score threshold")
string_db <- STRINGdb$new(
version = as.character(string_version),
species = as.numeric(species_code),
score_threshol... |
b5b4d33894f192abbcff320c542296f2a10a9381e404c200b985299dfa117b4a | R | 36,035 | 1,329 | #' @include FamiliarS4Generics.R
NULL
# familiarSimilarityMetric -----------------------------------------------------
setClass(
"familiarSimilarityMetric",
slots = list(
"similarity_metric" = "character",
"range" = "numeric",
"distance" = "logical",
"require_normalisation" = "logical",
"high... |
a64bc76e0c107474a51f1d02100eff35cf6681e9c5ea1284333d45580db5fc53 | R | 36,135 | 1,364 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# featureInfoParametersNormalisationNone ---------------------------------------
setClass(
"featureInfoParametersNormalisationNone",
contains = "featureInfoParameters",
slots = list(
"method" = "character",
"batch" = "ANY",
"reason... |
4fd1813d1003097df287c9ec64fa970db5707dc9b29bee1a6169bc9bd5dd7886 | R | 36,136 | 1,312 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
# show (vimpTable) -------------------------------------------------------------
setMethod(
"show",
signature(object = "vimpTable"),
function(object) {
# Suppress NOTES due to non-standard evaluation in data.table
score <- NULL
# Ma... |
dee37d0cc5718389ae2f409915c836a644bae7210db447b952e283684448a440 | R | 36,200 | 1,399 | test_create_good_data <- function(
outcome_type,
to_data_object = TRUE,
seed = 1844L,
rstream_object = NULL,
one_relevant_feature = FALSE,
two_groups = FALSE
) {
# Create random stream object so that the same numbers are produced every
# time.
if (is.null(rstream_object)) {
r <- .st... |
8adb5a660c16f0677179f5029f4982beb4d1ca8b1f8aa84e23ac18057e887e12 | R | 36,819 | 1,026 | #' @name
#' getRPCA
#'
#' @title
#' Run (joint) robust principal component analysis (RPCA)
#'
#' @description
#' These functions implement robust principal component analysis (RPCA)
#' for single tables and joint RPCA for multiple tables.
#' \code{*RPCA} functions run RPCA for single table. \code{*JointRPCA} runs the
#... |
00884fe8c134626d8e58ecdcf4e12bde1b5d3a2b121a35fc3eb2cadeb98d3ae2 | R | 37,065 | 1,169 | ---
title: "AD_ADNI_IDOR"
author: "Fernanda Hansen P. de Moraes"
date: "23/06/2021"
output:
html_document:
toc: yes
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
message = FALSE,
warning = FALSE,
cache = TRUE
)
```
```{r working directory... |
37a0e692a6c295d25d8b721080ce90c398734e7873a53dbb934ee389cf421150 | R | 37,112 | 952 | ##Fig.2b PCA######
rm(list = ls())
load("PCx_adj_final.RData")
library(ggprism)
library(ggplot2)
data.pca <- prcomp(t(quant_final),scale = TRUE)
importance <- summary(data.pca)$importance;
p1 <- as.numeric(sprintf("%.3f",importance[2,1]))*100;
p2 <- as.numeric(sprintf("%.3f",importance[2,2]))*100;
pcadata <-... |
f914aa93f98e2ae7913eda3444f7e6a93d23fce149745d9ed5797ff8173e8149 | R | 37,379 | 1,379 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_kaplan_meier (generic) --------------------------------------------------
#' @title Plot Kaplan-Meier survival curves.
#'
#' @description This function creates Kaplan-Meier survival curves from
#' stratification data stored in a familiar... |
d090ddcfd2c37fbf04fb47eb024e281cd7dc37b4295c9df40c910a04cb1ac989 | R | 37,417 | 1,286 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_model_performance (generic) ---------------------------------------------
#' @title Plot model performance.
#'
#' @description This method creates plots that show model performance from the
#' data stored in a familiarCollection object. ... |
fe19b33f28e468c12ca60cbd22c69292c568626f8a1851208d7878401cef73a2 | R | 37,590 | 1,280 | #' These functions will be deprecated. Please use other functions instead.
#'
#' @param x A
#' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}}
#' object.
#' @param value a matrix to store as the \sQuote{relabundance} assay
#'
#' @param mat An abundance matrix
#'
#' @param tree... |
0635213de3d64e82909ee7b52f187f0eab9e68f21e9848eaca5a457c64fd3ae9 | R | 37,595 | 953 |
#' @title findScranMarkers
#' @name findScranMarkers
#' @description Identify marker genes for all or selected clusters based on scran's implementation of findMarkers.
#' @param gobject giotto object
#' @param expression_values gene expression values to use
#' @param cluster_column clusters to use
#' @param subset_cl... |
d69fb4d4d46bc6f6b7e29e2a33538412908a9c70cc1da5248f6ffd3237a6b56d | R | 38,206 | 1,310 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# plot_calibration_data (generic) ----------------------------------------------
#' @title Plot calibration figures.
#'
#' @description This method creates calibration plots from calibration data
#' stored in a familiarCollection object. For thi... |
6abeb8af35649707923c931fb8a8723de06863a8734ffd64f590e995e4ae93ce | R | 38,827 | 1,488 | #' @include FamiliarS4Generics.R
stop_or_warn <- function(message, as_error = TRUE, call = rlang::caller_env()) {
if (as_error) {
..error(message, call = call)
} else {
..warning(message, call = call)
}
}
is.unset <- function(x) {
if (is.null(x)) {
return(TRUE)
} else if (is.waive(x)) {
r... |
a14e19505ca6ce2ed3a5563cb381a93880ad96251f73646e86b793d9d4dfc198 | R | 39,050 | 608 | #!/usr/bin/Rscript
################################################################################################################
#### Top n connected genes as hubs + check enrichment for driver genes
################################################################################################################
li... |
5094c3f780b3835215fd4db367b53f7bff97146a50bbf15784ae75efdb8a94bb | R | 39,071 | 560 | #!/usr/bin/Rscript
################################################################################################################
#### Top n connected genes as hubs + check enrichment for driver genes
################################################################################################################
l... |
13da5f44fe97725e10e2973fcdbe255dd9f7bf68a3e02cf5908a8d7cfee6dd1a | R | 39,934 | 1,463 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# .train (familiarModel, dataObject) -------------------------------------------
setMethod(
".train",
signature(
object = "familiarModel",
data = "dataObject"
),
function(
object,
data,
get_additional_info = FALSE,
... |
ae48fbe6bede6d5a20240f23566a6c757f146b6eab5e1ed7247d93f77c12666e | R | 40,249 | 1,346 | ---
title: "Manuscript 1 from Fernanda Hansen P. de Moraes Thesis - Cortical folding alterations in humans due to aging and diseases"
author: "Fernanda Hansen Pacheco de Moraes"
date: "1 dec 2021"
output:
html_document:
fig_caption: yes
fig_width: 8
number_sections: yes
theme: paper
toc: yes
... |
e6c408faf5883e52945c795c191a413327bfa234183f67600a4a36092790f5c3 | R | 41,039 | 797 | #' plot_relabund_features(ExpObj = NULL, glomby = NULL, samplesToKeep = NULL, featuresToKeep = NULL, only_allow_CSBs = FALSE, aggregatefeatures = FALSE, aggregatefeatures_label = "Sum_of_wanted_features", subsetby = NULL, compareby = NULL, wilcox_paired_by = NULL, compareby_order = NULL, invertbinaryorder = FALSE, colo... |
bb6b07ec150bf99b74f74b5280c2bcbc5102352159b58a21ae03090fd663f0ef | R | 41,478 | 911 |
# cross section helper functions ####
#' @title create_crossSection_object
#' @name create_crossSection_object
#' @description create a crossSection object
#' @param name name of cress section object. (default = cross_sectino)
#' @param method method to define the cross section plane.
#' @param thickness_unit unit of... |
2b5fc2e15286e8073ccfb14302053e8face67209f1c2fe9be74fa1ecb0c1ff78 | R | 41,632 | 533 | #' consolidate_entities_in_sample(opt=opt)
#'
#' JAMSalpha function
#' @export
consolidate_entities_in_sample <- function(opt = opt){
flog.info("Consolidating entities in sample")
setwd(opt$sampledir)
#############################################################################
## Safe CheckM2 launc... |
33898d1aa3fde2363748e99d3eae37ab92ccc083c23ff85394ff6b0847805f33 | R | 41,993 | 1,574 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarDataElementIndividualConditionalExpectation object -------------------
setClass(
"familiarDataElementIndividualConditionalExpectation",
contains = "familiarDataElement"
)
# familiarDataElementPartialDependence object ---------------... |
4fe9429b528b46f18e37d626df143d767c75407b9684b17a39f74fff5f40c944 | R | 42,064 | 1,305 | .load_data <- function(
data,
sample_id_column = NULL,
batch_id_column = NULL,
series_id_column = NULL,
...
) {
# Parse the input sample_id_column
if (!is.null(sample_id_column)) {
sample_id_column <- .replace_illegal_column_name(sample_id_column)
}
# Parse the input batch_id_column
... |
3ccb7283d08835bbf52363afd063cebd2dde454ff8e7f6e30cd1f074ac12c63d | R | 42,813 | 1,000 | library(R.matlab)
library(tidyverse)
library(ggplot2)
library(ggpubr)
figPath = "Z:/projects/ANLS Modeling/Figures/"
setwd("C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling/")
#These were calculated with the model in MATLAB
mitoDivGlycWithMT = 13.9088
mitoDivGlycWithoutMT = 10.5520
glycPro... |
8961cb923abe7631fb5bfc3cb4983cbb9645d8cc7d36d3b99c22ab97baf5aa6e | R | 43,086 | 1,426 | ---
title: "Manuscript 1 from Fernanda Hansen P. de Moraes Thesis - Cortical folding alterations in humans due to aging and diseases"
author: "Fernanda Hansen Pacheco de Moraes"
date: "1 dec 2021"
output:
html_document:
fig_caption: yes
fig_width: 8
number_sections: yes
theme: paper
toc: yes
edit... |
ec0e15574cf19495bff2d331e4856a130e5a6fbfa9f3a0d154b71c42a28df251 | R | 43,612 | 1,557 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
.get_generic_feature_info <- function(
data,
outcome_type,
descriptor = NULL,
project_id
) {
# Initialises feature_info objects
# Expect that data is a data.table.
if (is(data, "dataObject")) data <- data@data
# Identify... |
b77a8ca965077aa85e3546b73cec7bf4abfa18a8422e4c1fd9341f2d99926568 | R | 43,731 | 999 | library(R.matlab)
library(tidyverse)
library(ggplot2)
library(ggpubr)
figPath = "Z:/projects/ANLS Modeling/Figures/"
setwd("C:/Work/MatlabCode/projects/BrainMetabolismModeling/BrainMetabolismModeling/")
#These were calculated with the model in MATLAB
mitoDivGlycWithMT = 13.9088
mitoDivGlycWithoutMT = 10.5... |
85522c12703a61ef335bd4541cdfdccef7a199e91d943db403250c957641cc6f | R | 43,926 | 1,048 | #' Transform assay
#'
#' Variety of transformations for abundance data, stored in \code{assay}.
#' See details for options.
#'
#' @inheritParams getDominant
#' @inheritParams getDissimilarity
#'
#' @param method \code{Character scalar}. Specifies the transformation
#' method.
#'
#' @param MARGIN \code{Character scala... |
26d9a35f437f335ea6a46c2c2751dc3367ce813207e8ff0a3401c7c69a96c2d3 | R | 44,735 | 1,366 | #' familiar: Fully Automated Machine Learning with Interpretable Analysis of Results
#'
#' End-to-end, automated machine learning package for creating
#' trustworthy and interpretable machine learning models. Familiar supports
#' modelling of regression, categorical and time-to-event (survival) outcomes.
#' Models cre... |
9710974c17b8c75808fff399e40499e8a69f70016dd3786424fe66b3e08d5883 | R | 46,354 | 1,196 | #' Merge SE objects into single SE object.
#'
#' @inheritParams rarefyAssay
#' @inheritParams getDominant
#'
#' @param y a \code{\link[SummarizedExperiment]{SummarizedExperiment}} object
#' when \code{x} is a \code{\link[SummarizedExperiment]{SummarizedExperiment}}
#' object. Disabled when \code{x} is a list.
#'
#' @pa... |
5b794a605dcb0d34b1251f601b63321055e1a267f1b32039605562133a86c812 | R | 46,816 | 1,274 | library(Matrix)
library(RSpectra)
library(tidyverse)
####################################################
# MuxNetLib: Library for Multilayer Network Analysis in muxViz
#
# Version: 0.1
# Last update: Dec 2017
# Authors: Manlio De Domenico
#
# History:
#
# Mar 2017: From Matlab to R!
# May 2014: First release, includi... |
c90c0e52aefd0f0e262470ec50c5c4fdde4708e37a60188f4e072196863b9603 | R | 47,205 | 810 | #' make_SummarizedExperiments(pheno = NULL, onlysamples = NULL, onlyanalyses = c("LKT", "Product", "ECNumber", "Pfam", "Interpro", "resfinder", "PRINTS", "GO"), minnumsampanalysis = NULL, minpropsampanalysis = 0.1, stratify_functions_by_taxon = TRUE, add_TNF_data = FALSE, list.data = NULL, phenolabels = NULL, cdict = c... |
175396905bef0804b49dcecf1d3a2c0e53e79211cc763baa1cbe03ad7899838a | R | 48,094 | 1,144 | ---
title: "01_Setbp1_DiffTargetingWithin_Cortex"
output: html_document
date: '2023-02-13'
---
This analysis determines differential gene targeting scores within cell types between conditions from the PANDA regulatory networks. All networks below were filtered to only include positive weights.
#load in required librar... |
0c49966750deb5b5305532dfb37a7db8c1a318e3f39d5a45f1ba0d304d6a1a8d | R | 48,167 | 1,354 |
#' @title create_dimObject
#' @name create_dimObject
#' @description Creates an object that stores a dimension reduction output
#' @param name arbitrary name for object
#' @param reduction_method method used to reduce dimensions
#' @param coordinates accepts the coordinates after dimension reduction
#' @param misc ... |
99e1ceeb298fc0ec061aea6286953df1517e1575eb0271f71eae3a654f8debf5 | R | 48,512 | 674 | #' Creates ordination plots based on PCA, tSNE or tUMAP
#' @param ExpObj JAMS-style SummarizedExperiment object
#' @param glomby String giving the taxonomic level at which to agglomerate counts. This argument should only be used with taxonomic SummarizedExperiment objects. When NULL (the default), there is no agglome... |
2390b5855fa33c6e4489d6620b6fb1586c15f2a918ac434f4d478cda8a8ec877 | R | 48,756 | 1,338 |
#' @title sampling_sp_genes
#' @name sampling_sp_genes
#' @param clust TBD
#' @param sample_rate TBD
#' @param target TBD
#' @param seed TBD
#' @description function to select a set of spatial genes
#' @keywords internal
sampling_sp_genes = function(clust,
sample_rate=2,
... |
49104e8c2e7bde7390a25696e8794b4b466d2b2cb87195bb5042db9cbdd786c2 | R | 49,340 | 1,101 | ---
title: "02_Setbp1_DiffTargetingWithin_Kidney"
output: html_document
date: '2023-02-13'
---
This analysis determines differential gene targeting scores within cell types between conditions from the PANDA regulatory networks. All networks below were filtered to only include positive weights.
#load in required libra... |
9dbd52596b6946248905c202d63e6c154e229571b060fbc0d92149b33dfea82d | R | 49,621 | 1,603 | ..create_initial_hyperparameter_set <- function(
parameter_list,
grid_initialisation_method,
n_random_sets = 200L
) {
if (length(parameter_list) == 0L) return(NULL)
if (!.any_randomised_hyperparameters(parameter_list = parameter_list)) {
# All variables have been fixed. No optimisation is requir... |
24462c37e3f1547d32bffcf54673369020e93881568bc5dce8d682f8fdb4e4bf | R | 51,007 | 1,379 |
#' @title S4 giotto Class
#' @description Framework of giotto object to store and work with spatial expression data
#' @keywords giotto, object
#' @slot raw_exprs raw expression counts
#' @slot norm_expr normalized expression counts
#' @slot norm_scaled_expr normalized and scaled expression counts
#' @slot custom_exp... |
b4cff2c7b0f2ccf00b576493b6989c3d21b1c9e053a94cc736191464f221aadf | R | 51,049 | 1,888 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# Cluster method objects -------------------------------------------------------
setClass(
"clusterMethod",
slots = list(
"method" = "character",
"data_type" = "character",
"cluster_cut_method" = "character",
"representation_meth... |
03b419041b2aba8ade3f016baec60bd32c62b8954991d6da54b0679d8b4e7dee | R | 51,168 | 772 | ---
title: "Learning algorithms and hyperparameter optimisation"
author: "Alex Zwanenburg"
date: "2026-08-21"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
in_he... |
ad484d609b8f24bee7484fc23ce4a76c1ff45ace232cc0e2e9e21ced942a7864 | R | 51,238 | 774 | ---
title: "Learning algorithms and hyperparameter optimisation"
author: "Alex Zwanenburg"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
i... |
a717b9dd9a5c02a079df1aae905cf4ec2cef86a7b4145acb50a43e335aa4ae4c | R | 51,502 | 1,396 | #' log2PPMtoPct(log2PPM)
#'
#' Returns a rounded percentage given a log2 transformed PPM value
#' @export
log2PPMtoPct <- function(log2PPM= NULL, signifdigits = 1){
PPM <- ((2 ^ log2PPM) - 1)
Pct <- round((PPM / 10000), signifdigits)
return(Pct)
}
#' Pct2log2PPM(Pct)
#'
#' Returns a log2 transformed PPM ... |
c364e3f77b3d64d40a2b45ae105c54c0eab8d01d25df4cdeb31a2c36ad4df7b1 | R | 53,857 | 1,420 | # Skip on CRAN as this test takes about a minute.
testthat::skip_on_cran()
testthat::skip_on_ci()
# Create random number generator stream for reproducibility.
r <- familiar:::.start_random_number_stream(seed = 1863)
# Subsampling ------------------------------------------------------------------
for (outcome_type in ... |
06f021eadff20791becfc9bb9414c61983c61139ce6c02fa26c5a96b74a61ed5 | R | 54,463 | 1,678 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
run_hyperparameter_optimisation <- function(
cl = NULL,
project_list = NULL,
data_id = NULL,
settings = NULL,
file_paths = NULL,
vimp_method,
learner = NULL,
message_indent = 0L,
verbose = TRUE
) {
# Hyper-par... |
9a056aa9b58e2b8a4a28b828e431659a492f40b87b599e11bb022c34f6d1520a | R | 55,105 | 1,278 | # Skip on CRAN as this test takes about a 30 seconds.
testthat::skip_on_cran()
testthat::skip_on_ci()
outcome_type <- "survival"
# Generic test -----------------------------------------------------------------
for (n_numeric_features in c(4L, 3L, 2L, 1L, 0L)) {
data <- familiar:::test_create_synthetic_series_data(
... |
f720f960c701f197da52bb9637971596fcf4e2a9e74e9db00802c9c6937010fa | R | 56,593 | 990 |
##
##
##
##
########################################################################################################################################################
########################################################################################################################################################
#... |
dc69b31f49d991bdfdb2214a25778bd0c0bf0fa44abcb646dd2ffc0165b45c98 | R | 58,284 | 1,010 | # This code was used for statistical analyses involving brain voxel immediate early gene data for the following manuscript:
# Morgan L. Gustison, Rodrigo Muñoz Castañeda, Pavel Osten, Steven M. Phelps (2023) Sexual coordination in a whole-brain map of prairie vole pair bonding. eLife. DOI: https://doi.org/10.7554/eLif... |
646ea4f69f0b74dfe7ec42e8b2b33021ff808e40651c98f0cad99d8e78d71ee4 | R | 58,444 | 1,340 | ---
title: "Evaluation and explanation"
author: "Alex Zwanenburg"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
in_header: familiar_logo.h... |
63ec11283a736172ed511e783aa1c7abdcccd21961271d8984b3ffb7de1feab6 | R | 58,677 | 2,075 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
#' @include PredictionTable.R
NULL
# familiarDataElementCalibrationData object ------------------------------------
setClass(
"familiarDataElementCalibrationData",
contains = "familiarDataElement"
)
# familiarDataElementCalibrationLinearFit object ... |
fcd5d9f8ef4379ce79ec57af6973c80fe8243c1e90e3aa49a240837900f288cc | R | 58,890 | 1,342 | ---
title: "TIME_Exps_Behavioural_Analysis"
output:
pdf_document:
date: "`r Sys.Date()`"
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
##
```{r Load Libraries and paths, warning=FALSE, out.width="55%"}
# Load libraries and set path ------------... |
51a8c2caafb16df8f97b8e1e7d287dcef4a0b3659653f623d6995bbf4d629ac1 | R | 59,025 | 1,645 | library(gUtils)
library(testthat)
##GENOME = "http://mskilab.com/gUtils/hg19/hg19.chrom.sizes"
## GENOME = system.file("extdata", "human_g1k_v37.no.extra.chrom.sizes", package = "gUtils")
GENOME = testthat::test_path("human_g1k_v37.no.extra.chrom.sizes")
if (nchar(GENOME) == 0) {
download.file("http://mskilab.com/... |
bdb4f658c7d7eab91cd6c297bbf6b1fbf985de9138272f74d30091d842171deb | R | 60,515 | 1,182 | ---
title: 'TIME: MEG and behavioural analyses'
output:
html_document:
df_print: paged
pdf_document: null
date: "`r Sys.Date()`"
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Confirmatory analyses
```{r Load Data, message=FALSE, warning... |
f6da5714e9b3c1dcf4042ac1dde73638a6a3b20b9398f1cdfc33788af73e6413 | R | 60,863 | 1,550 | #' Calculate correlations between features of two experiments.
#'
#' @param x A
#' \code{\link[MultiAssayExperiment:MultiAssayExperiment-class]{MultiAssayExperiment}}
#' or
#' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}}
#' object.
#'
#' @param experiment1 \code{Character scalar} ... |
243fbb04ad2d728a5688427d0acf24ce9dafcfeb336f2017775be8ad0e53a49c | R | 61,185 | 2,116 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# familiarDataElementSHAP object -----------------------------------------------
setClass(
"familiarDataElementSHAP",
contains = "familiarDataElement",
slots = list(
"sample_identifiers" = "ANY",
"data_mapping" = "ANY",
"predicte... |
bd71c78b6bda56ec94d7ac9fd6f4f787f03ca7c96d83d12f6ace5c7a83950607 | R | 62,474 | 1,464 | ---
title: "01_Setbp1_RegCoopNet"
author: "Jordan Whitlock"
date: '2023-05-25'
output: html_document
---
Goal: Determine PPI in reference to TF-gene regulation in Setbp1 S858R mice.
# Set up data:
Step 1. Filter regNet for only Setbp1 as a TF
Step 2. Filter PPI for proteins in Setbp1 gene set
Step 3. Map Setbp1 and ... |
5a9db160e91d8342084cbd81195f774afa392fb03969a0546ac7ef1840c97aa5 | R | 62,582 | 1,678 | ##############
### Script ###
##############
# Run BLESS (= Bayesian Lesion Estimation for a Structured Spike-and-Slab Prior) with PxCAR prior over sparsity parameters
# -> individual CAR prior for each covariate's spatially-varying sparsity parameters (Code for Simulation Study).
#################
### Libraries ###... |
88a4683a1455e5820ed4a3289d626f46316c5e10f1747cfd33e51cf257fca158 | R | 64,066 | 1,403 | #' EEGfMRIPav_3_MixedModels()
#'
#' Perform mixed-effects linear and logistic regression reported in behavioral results section.
#' Interactive script, run step-by-step, NOT in one Go.
#' Models reported in behavior are marked with "GOES INTO"...
#'
#' Requires that .csv files have been recoded and concatenated using... |
8f2b1323ed76ff4e6155c99a4b3e5b39dc554cfcc44fe08b5289d8f0afbc1be5 | R | 65,336 | 1,963 | #' Internal check and update of settings related to data set parsing
#'
#' This function updates and checks parameters related to data set parsing based
#' on the available data set.
#'
#' @param formula User-provided formula, may be absent (`NULL`).
#' @param data Data set as loaded using the `.load_data` function.
#'... |
cdeea353f001c8357595f6d9e126ad06c7504b0e5c49aa600b571d8b289f8666 | R | 65,669 | 2,217 | ---
title: "Manuscript 1 from Fernanda Hansen P. de Moraes Thesis - Cortical folding alterations in humans due to aging and diseases"
author: "Fernanda Hansen Pacheco de Moraes"
date: "1 dec 2021"
output:
html_document:
fig_caption: yes
fig_width: 8
number_sections: yes
theme: paper
toc: yes
... |
7578f943309fe16b339e7e128b6f4803296efc9608162d6d2024b3ae372ce125 | R | 66,879 | 2,349 | #' @include FamiliarS4Generics.R
#' @include FamiliarS4Classes.R
NULL
# add_data_element_identifier methods ------------------------------------------
## add_data_element_identifier (list) ------------------------------------------
setMethod(
"add_data_element_identifier",
signature(x = "list"),
function(x, ..... |
939dd4c6211a693df869f35dcc234f8caeb662078cf387d8c603d015b907aa07 | R | 67,101 | 1,330 | ---
title: "Evaluation and explanation"
author: "Alex Zwanenburg"
date: "2026-08-21"
output:
rmarkdown::html_vignette:
includes:
in_header: familiar_logo.html
after_body: license.html
toc: TRUE
rmarkdown::github_document:
html_preview: FALSE
includes:
in_header: familiar_logo.html
... |
08511b80591509fdc1895e25a70836f37cc45188cd125c5c12d7d19849d09373 | R | 67,463 | 1,814 |
## create spatial enrichment matrix ####
#' @title makeSignMatrixPAGE
#' @description Function to convert a list of signature genes (e.g. for cell types or processes) into
#' a binary matrix format that can be used with the PAGE enrichment option. Each cell type or process should
#' have a vector of cell-type or proc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.