sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
3197cb2f28d6acb643289626cfcd5167bf5fbfa21e7637fc2d959c94ffec8bfd | R | 23,873 | 814 | ---
title: "Bilateral rhizotomy. Analyse PAS UBI vs SO (L, R; hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "11/2/2021"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---
```{r setup, inclu... |
03c2053fcd0d47d5b85500190301cdb5c78b1069ddd613f2a775253a963ccdad | R | 23,911 | 450 | #' Perform Seurat sample integration.
#'
#' Seurat sample integration by Canonical Correlation Analysis.
#'
#' @importFrom gridExtra grid.arrange arrangeGrob
#'
#' @param sample_files character vector with paths to .qs data files to be integrated
#' @param sample_names character vector with sample names of .qs data fil... |
f777057d3c5e389cd574b1a4ad58c6ffde9298ba006bac68ddd834d318c8cfd8 | R | 23,920 | 767 |
###########################################################################################
# Load relevant packages
source("/net/trapnell/vol1/home/readdf/trapLabDir/sharedProjectCode/utility/singleCellUtilFuncs.R")
# modStatus <- loadMonoclePackages()
# print(modStatus)
library(monocle3)
source("/net/trapne... |
c5639bbe639a1e563ae43ab8d9b2d78db32e0d96a480d874a0bdfa2628ed7911 | R | 23,972 | 580 | ---
title: "PLS analysis"
author: "Michael Lombardo"
date: "13/10/2023"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Plot PLS results
```{r, warning=FALSE, message=FALSE}
library(easypackages)
libraries("tidyverse","ggheatmap","here","ggseg","ggsegChen","patchwork","... |
75744a41e2800208210bfd4d54b1a8c36164890ce12c1ca6fb1025e95ac72643 | R | 24,097 | 762 | ---
title: "Vertical Analysis MPA: Ctrl, BNI, FNA (hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "Date: `r format(Sys.time(), '%d/%m/%Y')`"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---... |
a77077a576b2346fa44adb2fa75451c450b7ce0530a9965a09d8cf2dbb8432a7 | R | 24,164 | 919 | ---
title: "Bilateral rhizotomy. Analyse Pa for SO, UBI (L, R; Hand, Machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "10/22/2021"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}... |
b3b91814c06e9b9a2c958c62a422fbf68f13257900bd039e19e48a8db566c8aa | R | 24,238 | 562 | rm(list = ls())
#############################
## Load Relevant Libraries ##
#############################
require(lme4)
require(nlme)
require(gamm4)
require(mgcv)
require(ggplot2)
require(Hmisc)
require(MASS)
require(ppcor)
require(stringr)
require(visreg)
require(parallel)
require(multilevel)
require(stats)
require(F... |
b07fb6a5467922fd283347718be1b9ce72c0e60cd32b6f094bca2462780dc222 | R | 24,251 | 646 | ---
title: "DeepRVAT - Figure 2: Benchmarking on unrelated Caucasian individuals from the 200k WES release"
author: "Eva Holtkamp"
output:
pdf_document: default
html_notebook: default
---
```{r}
library(ggplot2)
library(arrow)
library(dplyr)
library(stringr)
library(tidyr)
library(ggpubr)
library(cowplot)
library... |
2a83f5b01783a476c40a95229cf314b25e68832666063f39fc3c6fa3190b02ab | R | 24,562 | 722 | ---
title: "DeepRVAT - Figure 4: Association testing using REGENIE"
author: "Eva Holtkamp"
output:
pdf_document: default
html_notebook: default
---
```{r}
library(ggplot2)
library(arrow)
library(dplyr)
library(stringr)
library(tidyr)
library(ggpubr)
library(cowplot)
library(latex2exp)
library(tibble)
source(fi... |
7ae43ac8649ca4a3a5ca2eca06807cf7657347215a5a26bb2e863f006130b3dc | R | 24,591 | 589 | #' Internal function to add, edit, rename, delete contrasts
#'
#' @param mobj \code{l1_model_spec} or \code{hi_model_spec} object
#' @param signals a list of signals that provide information about regressor specification
#' @param spec_list a list of settings for this model based on an external YAML/JSON specification ... |
433d0bc840c7802e659e0fa1b71dac75fefe48d146682aa31549d4d75a8f13e7 | R | 24,888 | 453 | ## ---------- Script -----------------
##
## Script name:
##
## Purpose of script:
##
## Author: Szi Kay Leung
##
## Email: S.K.Leung@exeter.ac.uk
##
## ---------- Notes -----------------
##
## ---------- Source function and config files -----------------
LOGEN_ROOT = "/gpfs/mrc0/projects/Research_Project-MRC14821... |
23188d0f6b8e9eafce484570c411688f00c95999dd5f719a4839536015ba893a | R | 24,930 | 604 | ---
title: "sccomp: Differential Composition and Variability Analysis for Single-Cell Data"
author: "Stefano Mangiola"
date: "`r Sys.Date()`"
package: sccomp
output:
prettydoc::html_pretty:
theme: cayman
toc: yes
toc_depth: 2
number_sections: yes
fig_caption: yes
df_print: paged
abstract: >
... |
0f4754e2013bc96aa7df5d8216d47ff48ccc54a56fcfeaf2405b06bf4b4e7af9 | R | 24,959 | 614 | ## ---------- Script -----------------
##
## Script name:
##
## Purpose of script: sources functions for generating downstream plots for SFARI dataset
##
## Author: Szi Kay Leung
##
## Email: S.K.Leung@exeter.ac.uk
##
## ---------- Notes -----------------
##
##
##
##
##
## ---------- Packages -----------------
... |
04e2198565301c251cd781fffb6dbb1ffd8cf856ebb6a1a1b18d35c36b86064e | R | 24,980 | 661 |
# 4-7-22 add
.libPaths('1')
# Get functions
library(monocle3)
source("/net/trapnell/vol1/home/readdf/trapLabDir/sharedProjectCode/utility/singleCellUtilFuncs.R")
# modStatus <- loadMonoclePackages()
library(tidyr)
library(ggplot2)
# Note: Need bedtools loaded for this! bedtools/2.29.2
library(cicero)
# Add this to... |
2bf060a24d6fcec83c50c95108489bdc6c28ead9d7bd5a5045e95719dd3117cb | R | 25,068 | 598 |
library(tidyr)
library(ggplot2)
library(glmnet)
library(ROCR)
library(data.table)
# Get shared functions between this and runRegressionModel.R
source("./utilityFunctions.R")
library("optparse")
# Get the passed parameters
option_list = list(
make_option(c("-p", "--pValFIMOcutoff"), type="numeric",
... |
51e90401bcab6b2d374ffce6ac08ca1181434a0b488919c688e011ed93757820 | R | 25,103 | 574 | ---
title: "go_analysis_miracidia"
author: "T Attenborough"
date: "2023-10-12"
output: html_document
---
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(SingleCellExperiment)
library(scater)
library(zellkonverter)
library(basilisk)
librar... |
142c90d9a3edebaa8158d69791365ec254605ae731cb3a9309d6413996d90a13 | R | 25,239 | 634 | # Smooth-term utilities for sccomp formulas (brms-style splines)
#
# This file implements the R-side machinery that turns smooth terms
# (`s()`, `t2()`) in a sccomp formula into design-matrix columns that the
# existing Stan model can consume without modification.
#
# The decomposition is the standard mgcv / brms one:
... |
897727b4a42b478739b3d9b1c487447c4b6c9e706902177a6945dbf117b52138 | R | 25,416 | 690 |
getDataset <- function(datasetToGet, opt){
# Read et al
if (datasetToGet == "Read"){
return (readRDS(paste0("./read_et_al_data/", opt$cdsRNA)))
}
# Litvinukova
if (datasetToGet == "Litvinukova"){
return (readRDS("./litvinukova_et_al_data/Litv_CDS.rds"))
}
# Tucker
if (datasetToGet == "Tucker"){
return ... |
10f672af9806691d23f77eeaa9ec2f99089651ad2feffb08233221f9bdecabf4 | R | 25,436 | 497 | #' Run Kriegstein reference data chunking for annotation.
#'
#' Need to chunk data before training and annoation as to reduce memory needed
#' per interation. If no chunking needed set n_chunkcs to 1.
#'
#' @param n_chunks default: 25, integer, amount of data chunks, less memory needed per chunk
#' @param kriegstein_da... |
1e12c6ea7b2c88879d8b847af4a3c5b6d67a90caa323715b9e1503e8c2965a2d | R | 25,514 | 663 |
# Helper function to send a vector of fixed and random effects. Returns a string that can be converted
# to a formula that's understood by lme4
getMixedModelFormula <- function(inputFixedEffects, inputRandomEffects){
# Formatted Random Effects
fixedFormulaPart = paste(inputFixedEffects, collapse = " + ")
# ... |
fb602b02b036ae8a84d3b021bca39883ecedb97c7c496c39210afad0e6a4283f | R | 25,516 | 942 |
local({
# the requested version of renv
version <- "0.15.5"
# the project directory
project <- getwd()
# figure out whether the autoloader is enabled
enabled <- local({
# first, check config option
override <- getOption("renv.config.autoloader.enabled")
if (!is.null(override))
return(... |
b071bd03965e429d17872d09e7e34f7487b2c4269dbe3c5ad753d1dc2f821f93 | R | 25,546 | 748 | #' Regularized linear deconvolution of BOLD time series
#'
#' Estimate a continuous latent activity time series by solving a regularized
#' inverse convolution problem for one or more BOLD signals.
#'
#' @param BOLDobs matrix of observed BOLD time series (n_timepoints x n_signals)
#' or a numeric vector.
#' @param ke... |
c7fff470dfb3710308e8437cf54c1315da51c99d1e8f6772c7aa135d55c2c547 | R | 25,642 | 611 | # This script was developed to assess the predictive power of sequence features (motifs),
# both within the gene's promoter and within cicero-connected distal regulatory elements,
# on gene expression. To achieve this, this script does the following
# 1) identify cicero connection on the binary peak by cell count matri... |
d638725a18d6d148f98df2ceac4e28009dc0c4ac2a05a2bfadb10549575911f3 | R | 25,990 | 645 | # performed linear mixed-effect model on features
library('lme4')
library('lmerTest')
data <- read.csv('[data directory]')
head(data)
data_1 <- subset(data, Agglomerative==1)
data_2 <- subset(data, Agglomerative==0)
data_3 <- subset(data, Agglomerative==2)
# updrs1
res_1 <- lmer(updrs1 ~ time + Age_at_symptom + Gen... |
666ed44e5230a8a0b57b977b57dfd14ccca073a4cc6e361e96822711fa01ba08 | R | 26,054 | 570 | ---
title: "Simulation Plotting for ZIV"
author: "Junting Ren"
date: "2024-02-04"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(ggh4x)
library(scales)
library(patchwork)
```
# Load and clean the result
Sim X
```{r}
df_sim_result_VI_MCMC = rbind(re... |
ec847726c80025bb09bce0dcdf40347502298f9ad9e76ccb364a6601af1d3775 | R | 26,147 | 607 | #' Function to extract subject-level coefficients from an FSL group analysis
#'
#' @param gpa a \code{glm_pipeline_arguments} object for which results of GLM analyses are already available
#' @param mask_files vector of filenames for NIfTI-based atlases. The function will loop over each and extract coefficients from
#... |
565aabdb6fa11cb209b6ee4152b04e3e4f90c6e4d331c7e22b8e17b699ab7680 | R | 26,683 | 849 |
# AVAILABLE METHODS
norm_options <- c(
"Raw",
"Illumina",
"Funnorm",
"Noob",
"SWAN",
"Quantile",
"Noob+Quantile"
)
hclust_methods <- c(
"single",
"complete",
"average",
"mcquitty",
"median",
"centroid"
)
`%dopar%` <- foreach::`%dopar%`
`%do%` <- foreach::`%do%`
`%>%` <- magrittr::`%>%`
#... |
c7758613dd29ab643080e40ae2b5305775196b5080904d988f542f9e14cae59d | R | 26,755 | 905 |
#' Function for diagnosing errors in a run of the pipeline
#'
#' @param input A character path to a project folder or a gpa object
#'
#' @importFrom dplyr bind_rows
#' @importFrom cli cli_abort cli_warn cli_inform cli_alert no qty
#' @export
#'
#' @author Zach Vig
diagnose_pipeline <- function(input) {
old_warn <- ... |
b9896529e1dac7e4648d397e6f3e067c4a080f5a3318a8bfd6c0ce8a77b61cb8 | R | 26,946 | 562 |
################################################################################
# SCRIPT TO CALCULATE THE CENTILES OF BRAIN VOLUME REGIONS FROM A .CSV FILE.
################################################################################
# Copyright (C) 2023 University of Seville
#
# Written by Natalia Gar... |
7e866880ce2cb00be25e0fa14923b93f17bbb6080b882d41b892cc311589e89c | R | 26,979 | 918 | ---
title: "MPA UBI vs SO (L, R; hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "9/23/2021"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}
source("../BayesianPValue.R")
... |
a330094e0fc4e83e88cf8fb243866143b1130e91ef46e08aafad49a6d25493db | R | 26,981 | 686 | # Tests to verify that the optimized evtmax_1 implementation
# produces correct results compared to the original per-event convolution approach.
# The new approach uses a small padded window for peak computation, which:
# - Is faster (especially with many unique durations like RTs)
# - Is more correct for end-of-ru... |
f27a6367321dc96ed47292fb54494160d0485de05a724669f9d4beedc5e7d74e | R | 27,492 | 541 | ##########################################################
### ENDOCRANIAL DEVELOPMENT IN NON-AVIAN DINOSAURS ###
### REVEALS AN ONTOGENETIC BRAIN TRAJECTORY ###
### DISTINCT FROM EXTANT ARCHOSAURS ###
##########################################################
### AUTHORS:
### L KING,... |
e6b197c7fd3972d4557ce55436443d23b9597480c32e119fe334604a35f8e5f2 | R | 27,495 | 774 | #load the packages
library(edgeR)
library(DESeq2)
library(limma)
library(org.Hs.eg.db)
library(tximport)
library(csaw)
library(readr)
library(ggplot2)
library(ggrepel)
library(WGCNA)
library(ggpubr)
library(bestNormalize)
library(ComplexHeatmap)
library(reshape2)
library(tidyverse)
library(caret)
library(MASS)
library(... |
07a1edd8804e63eddfd72f9fc4ac0f8a9b83b3bdbff4f490843e613f6f46e2ea | R | 27,502 | 716 | ---
title: "fmri.pipeline quick start guide"
author: "Nidhi Desai, Hannah Evans, Michael Hallquist"
date: "11 May 2026"
output:
html_document:
code_folding: show
df_print: kable
mathjax: default
number_sections: yes
theme: spacelab
toc: yes
toc_depth: 4
pdf_document:
code_folding: sh... |
333860b8531aa9021948ffc42943cc7a5fd58b77d7e51b6f25c19f729afd48be | R | 27,688 | 609 | #' selectBasicFeatures - It represents, given the transcriptomic and proteomic data, the dimensionality ratio: molecules / samples, and the Venn diagram showing the percentage of shared molecules between both datasets.
#'
#' @param transcriptomicData the dataset used to create transcriptomic TGCNs.
#' @param proteomicD... |
3fa02caaea7f5af15dffdf1676e17d6c77183938d5bf516bec7ab7496979545a | R | 27,735 | 869 | ### ------------------------------------------------------------------------ ~
###
### plot_spc - Plots spectra of hyperSpec object
###
### convenient plot interface for plotting spectra
###
### ------------------------------------------------------------------------ ~
# Function -----------------------------------... |
3fc8d83f23cdc096fd9411cbae13caef8503e7883ee56fcf6b9dc669a0acc9d9 | R | 27,853 | 662 | ####################################################################################################
###
### File: 06_results_visualisation.r
### Purpose: Creating data visualisation for the main results of the paper.
### Authors: Gabriel Rodrigues Palma, Rafael Moral
### Date: 07/04/23
###
######################... |
e90f4eba8ac48599b8b2de071178393f801be2378ff45cd93d8335a31d717d67 | R | 27,985 | 861 | ---
title: "SF, CI AI (Ctrl, BNI, FNA): Bayesian regression of smoothed stretch forces"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "Date: `r format(Sys.time(), '%d/%m/%Y')`"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_ou... |
e4c1191fc66bdfe00074e8a3ddfd1ea827d12d88eda763f1ac4ed0b802673e4a | R | 28,135 | 787 | library(tidyverse)
library(zoo)
library(broom)
library(glmnet)
library(viridis)
# read behavioral data
data <- read.csv("../data/data_exp3_photometry_behavior.csv")
mouseNames <- unique(data$mouseName)
## Overall psychometric curves
summary_pf <- data %>%
group_by(mouseName,contrast) %>%
summarize(pRight = mean(choic... |
b46308c825f579aeea499b20e1ffe56713305fb16700b07fba6e78b63ff4c7bc | R | 28,244 | 673 |
library(tidyr)
library(ggplot2)
library(glmnet)
library(ROCR)
library(data.table)
library(RColorBrewer)
# Get shared functions between this and runRegressionModel.R
source("./utilityFunctions.R")
library("optparse")
# Get the passed parameters
option_list = list(
make_option(c("-p", "--pValFIMOcutoff... |
48b9a9f6df74b02c033b55312c1066b3b4c0c06eea05fd9fee8d1e6fba9367bc | R | 28,384 | 867 | #' Function that creates (if needed) a new directory in which to store plots
#' @param path_to_directory Path to the desired directory in which to store plots
#' @return NULL
.create_plot_directory <- function(path_to_directory) {
if (dir.exists(path_to_directory)) {
return(NULL)
}
dir.create(path_to_di... |
655e57850efbc840f3edb5cb7483b8014ddbb54ed2b9918f2e547945bc2f0dbf | R | 28,702 | 632 | #!/usr/bin/R
# ----------------------------------------------------------
# Plot fractions + fractions on AD
# Updated 09/22/2020
# ----------------------------------------------------------
library(cbrbase)
set_proj('DEVTRAJ')
source(paste0(bindir, 'multiRegion/load_metadata.R'))
library(tidyr)
library(ggplot2)
libr... |
7de6e040f0fe3486fd4ba04d67578c8a2497b66ab234bd952d96ec42b885a10b | R | 28,785 | 618 | #' R6 class for 3dClustSim automation
#' @importFrom tibble tibble
#' @importFrom stats qnorm qt
#' @export
afni_3dclustsim <- R6::R6Class("afni_3dclustsim",
private = list(
out_dir = getwd(),
clustsim_df = tibble::tibble(),
out_files = NULL,
prefix = "3dclustsim",
pvt_use_fwhmx_acf = FALSE,
a... |
634e4f2c7e7d9f14584436887bff5fb1274fe5288ddd5834c6b7c20d5cbe416e | R | 28,912 | 717 | ---
title: "simulation_paper_plots"
author: "Eva"
date: "2022-11-24"
output: html_document
---
```{r}
library(arrow)
library(dplyr)
library(ggplot2)
library(viridis)
library(gridExtra)
library(grid)
library(latex2exp)
library(cowplot)
library(ggpubr)
```
```{r}
plot_data_path = "{path}" #this should be the same pat... |
947ea712f68c0dc21d481944aa82ea2b4fb4614dafb2e03319cdfe5020d5d5b8 | R | 29,039 | 711 | #!/usr/bin/env Rscript
# Script to train WGD dosage bias scoring model
# Requires:
# An input set of bins to be tested
# A coverage matrix with all training & testing samples corresponding to the bins to be tested
# 1-5 pairs of training sample sets (pairs = one list each for PCR+/PCR-)
# A pair of testing sample... |
66bee5ea0badd52995e6d940058f2e73a538781aac626ae2981f9348a7652556 | R | 29,447 | 682 | ---
title: "import QC sample4 v10"
author: "T Attenborough"
date: "24/11/2022"
output: html_document
---
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(tidyseurat)
library(RColorBrewer)
library(SingleCellExperiment)
libr... |
2af2e39b23d0f8e5f721f6cdb355f87a51fa27fe2bf80493a82e585bcdd5bcc1 | R | 29,486 | 773 | ---
title: "Melanoma single-cell DT data - Responder cell classification"
author: "Yingxin Lin"
date: "Created on 19 Dec 2022, last compiled on `r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
code_folding: hide
number_sections: yes
toc: yes
fig_height: 12
fig_width: 12
toc_float:
... |
20252769101ccde719e58333d905d8e52ceca1cc49b01ce0e5b1259d2cbfe026 | R | 29,730 | 808 | #' This function generates the inputs for an FSL level 2 analysis, where multiple runs for a subject are combined using
#' fixed effects estimation.
#'
#' @param gpa a \code{glm_pipeline_arguments} object containing analysis speecification
#' @param l2_model_names a subset of L2 models to be setup by this function. If ... |
28759dd8746dbbb72e55fd6ca2b439dbbd8037c9b335fd3e473f20734a238e33 | R | 29,948 | 838 | #!/usr/bin/R
# -----------------------------------------------------------
# Aggregate and plot chunked runs of MAST + RE for DGE
# Updated: 01/21/2021
# -----------------------------------------------------------
library(cbrbase)
set_proj('DEVTRAJ')
source(paste0(bindir, 'multiRegion/load_metadata.R'))
library(tidyr)... |
5512d09403734d7134cf27a64f08dbc484df69263e76f57589e28e78254f56ea | R | 30,205 | 833 | # Internal helpers for projecting L2 covariates into SPM L1 design matrices.
resolve_spm_l1_session_mode <- function(mode, lg = NULL) {
if (is.null(lg)) lg <- lgr::get_logger()
checkmate::assert_class(lg, "Logger", null.ok = TRUE)
if (is.null(mode) || (is.character(mode) && length(mode) == 1L && !nzchar(mode))) ... |
2a7c7715f50aa4daba1c05879f0275552e341e94f6db9a2ee88f2eea64a72099 | R | 30,411 | 695 | ---
title: "import_QC_sample1_v10"
author: "T Attenborough"
date: "24/11/2022"
output: html_document
---
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(tidyseurat)
library(RColorBrewer)
library(SingleCellExperiment)
libr... |
4a4b4e26b1219e9da768c952b84308188790a608c994369b4f48a3be19e3d5a1 | R | 30,464 | 477 |
#' archstabms_binding_plots
#'
#' Plot fitness distributions and scatterplots.
#'
#' @param dataset_name character dataset name (required)
#' @param coef_order coefficient order (required)
#' @param base_dir Base directory (required)
#' @param colour_scheme colour scheme file (required)
#' @param outpath output path f... |
bad5a32d555cc1d6e5547a94140f23c6f7337ca15ebe387c05b9b4e25dd9087e | R | 30,503 | 733 |
# Support for:
# "NeuralSpatial: Statistics for Distinct neural mechanisms for heading retrieval and
# context recognition in the hippocampus during spatial reorientation"
# author: "Manuel Miguel Ramos Álvarez and the Muzzio Lab"
source("https://github.com/ManuMi68/StatMmRa/raw/main/RMmRaGen24.R")
source("htt... |
32c4e05deee78c7fcc640cf06cd8e4d0f677872174160f3cda2c56d9e74323bc | R | 30,565 | 1,009 | ---
title: "Bilateral rhizotomy. Analyse MPA UBI vs SO (L, R; hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "11/2/2021"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}
s... |
dcb842bea587d9bdb32e6d89e579bec38929cbdfa9543fe223541c2191efaaa1 | R | 30,590 | 987 | ### read.spc - Import Thermo Galactic's .spc file format into an hyperSpec Object
###
### C. Beleites 2009/11/29
###
#####################################################################################################
## Define constants --------------------------------------------------------------------------------... |
468c9edfb649d505866ac0dfcaead1eeecec4bf92becd8e088d66b427f9d7f05 | R | 30,650 | 1,155 | ---
title: "Interactive model builder in fmri.pipeline"
author: "Michael Hallquist"
date: "11 May 2026"
output:
html_document:
code_folding: show
df_print: kable
mathjax: default
number_sections: yes
theme: spacelab
toc: yes
toc_depth: 4
pdf_document:
code_folding: show
df_print:... |
eacb52e8f4bd92f3fdff9a54803632dfecaa51b8d2b0331c274d6ea9aedf7ac5 | R | 30,677 | 725 |
basepath = "/net/trapnell/vol1/home/readdf/trapLabDir/hubmap/results/2021_07_15_Greg_ATAC_Code_nobackup/"
dir.create(paste0(basepath, "archr/results/NB11/"))
out_dir = paste0(basepath, "archr/results/NB11/")
setwd(out_dir)
set.seed(7)
# load requirements
suppressPackageStartupMessages({
# library(ArchR)
library(m... |
9425d2dd2a33586892062f37f2e5b7ef5c6cc7db9c453d9450540b4435d4709c | R | 30,699 | 736 | #' sccomp_replicate
#'
#' @description This function replicates counts from a real-world dataset.
#'
#' @param fit The result of sccomp_estimate.
#' @param formula_composition A formula. The formula describing the model for differential abundance, for example ~treatment. This formula can be a sub-formula of your estima... |
789a88c70b8f947dd875683757e2e505150f8ae37ed4180ec71d78e6d47a8276 | R | 30,728 | 750 | ---
output:
html_document:
df_print: paged
---
Code for reproducing Figures 2-4.
```{r, echo=F, warning=F, message=F}
library(dplyr)
library(tidyr)
library(reshape2)
library(ggplot2)
library(spASE)
library(viridis)
library(Matrix)
library(latex2exp)
library(RColorBrewer)
library(xtable)
library(RCurl)
library(s... |
604c74dbfd23a6ad7b619df99b4f4ddc04967186030469aa301ded425e3b2090 | R | 30,854 | 493 | ## ---------- Script -----------------
##
## Script name:
##
## Purpose of script:
##
## Author: Szi Kay Leung
##
## Email: S.K.Leung@exeter.ac.uk
##
## ---------- Notes -----------------
##
## ---------- Source function and config files -----------------
LOGEN = "/lustre/projects/Research_Project-MRC148213/lsl69... |
bbc99590939c233166eca2f5cda5c6d669e421fd5835f9fc1edb7dbee2f82fbb | R | 30,888 | 875 | format_3dlmer_datatable_keys <- function(df, id_col = "id", session_col = "session", max_items = 8L) {
if (nrow(df) == 0L) return("<none>")
keys <- paste0(
"id=", as.character(df[[id_col]]),
", session=", as.character(df[[session_col]])
)
keys <- unique(keys)
if (length(keys) > max_items) {
keys ... |
83f2ec16eed2c93127b76dda51e32bd1308c6e8ebac545a95ed544eb628af6ff | R | 31,015 | 1,003 |
###########################################################################################
# library(glmmTMB)
# Load relevant packages
source("/net/trapnell/vol1/home/readdf/trapLabDir/sharedProjectCode/utility/singleCellUtilFuncs.R")
# modStatus <- loadMonoclePackages()
# print(modStatus)
library(monocl... |
74a815b5968a5e38c448a10c2d7b6104eaf41403627b3d935c9c5bb9e7d7fd5b | R | 31,113 | 726 | #' helper function to generate confounds txt file for inclusion as additional regressors
#'
#' @details This function checks for whether an l1 confounds file already exists in the expected location.
#' If it does not, the l1 confounds file will be generated according to the $confound_settings$l1_confound_regressors
#... |
d8f7fa4f920da25208a3103d9b71b7cc9db409fd3a1f62b9ae841728cdbf89f2 | R | 31,248 | 1,037 | ---
title: "Vertical Analysis PAS: Ctrl+Saline, NTI, Nalozone (hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "Date: `r format(Sys.time(), '%d/%m/%Y')`"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type... |
1dd9f83e030e059b7238d4e8f9a47ea89feff9a7984d53d0bb3a10e05605715f | R | 31,268 | 949 | ---
title: "SF, CI dW Ctrl BNI FNA: Bayesian regression of smoothed stretch forces"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "Date: `r format(Sys.time(), '%d/%m/%Y')`"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output... |
6d368276eb32310238a6984712094873a04d138e00dbd5062751a7ad8d057e34 | R | 31,397 | 701 | ---
title: "import QC sample3 v10"
author: "T Attenborough"
date: "24/11/2022"
output: html_document
---
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(tidyseurat)
library(RColorBrewer)
library(SingleCellExperiment)
libr... |
821d0a746a6d48d04c4a92165fd6f591cd779b612584ba6722d2f93638cf61bd | R | 31,615 | 452 |
#' archstabms_coupling_scatter
#'
#' Coupling scatterplots.
#'
#' @param input_file path to MoCHI thermo model fit results (required)
#' @param trait trait name (default:"Folding")
#' @param outpath output path for plots and saved objects (required)
#' @param colour_scheme colour scheme file (required)
#'
#' @return N... |
50c52b71536225c1a5d0f87b94ba035a078b97f4ab841cec3c109725ca4be50a | R | 31,709 | 786 | #' import org.Hs.eg.db org.Hs.eg.db # Organism.HomoSapiens.EntrezGene.DataBase
"_PACKAGE"
NULL
#' Run GSEA and ORA.
#'
#' Run gene set enrichment and over representation analyses with clusterProfiler using fgsea package.
#'
#' @param output_dir output directory for plots, string
#' @param dea_result_file Seurat differ... |
79725f41069fe4205ed74ea7f3200dd498db191618121c95bbe26da583f8333e | R | 32,029 | 933 | #' sccomp_test
#'
#' @description This function test contrasts from a sccomp result.
#'
#' @param .data A tibble. The result of sccomp_estimate.
#' @param contrasts A vector of character strings. For example if your formula is `~ 0 + treatment` and the factor treatment has values `yes` and `no`, your contrast could be ... |
cec801814485b060e0fafee65f9347dad1caf229cdede6598e8b5ee98d3bbada | R | 32,067 | 903 | # GLM backend specification and resolution helpers
# Canonical empty data.frame constructors for the requirement and preflight schemas.
# Using constructors keeps column names/types defined in one place.
empty_requirement_df <- function() {
data.frame(
artifact = character(0),
producer_backend = character(0)... |
914cb18fbe9dbccf953cd75df89953c44eda30800a78d66fa0db343bdf70f367 | R | 32,112 | 711 | ---
title: "stembro_comparison"
author: "Nobuhiko Hamazaki"
date: "2023-05-03"
output: html_document
---
```{r}
library(dplyr)
library(Seurat)
library(stringr)
library(RColorBrewer)
library(tidyseurat)
library(cowplot)
library(ggthemes)
library(ggplot2)
library(biomaRt)
library(grid)
library(cowplot)
library(qs)
set.... |
04e3f7f3fcc9b2137ca8a7807ed32d6b388aabf2ad59109e9b2f23c6d83101b6 | R | 32,286 | 879 | #' Submit SPM jobs to the cluster for unattended MATLAB/Octave execution
#'
#' @param gpa a \code{glm_pipeline_arguments} object containing model specification
#' @param level level of analysis (1 or 3)
#' @param model_names optional model names used to subset SPM runs
#' @param rerun logical indicating whether to reru... |
aa7e021db39b806f83eb8213eb6d19c991e53d6a30431c4ff6e91df9c69155fe | R | 32,418 | 720 | ---
title: "import QC sample2 v10"
author: "T Attenborough"
date: "24/11/2022"
output: html_document
---
```{r}
library(Seurat) #Seurat v4.0.2
library(dplyr)
library(patchwork)
library(here)
library(ggplot2)
library(clustree)
library(ggrepel)
library(tidyseurat)
library(RColorBrewer)
library(SingleCellExperiment)
libr... |
4326a2520501f72d6b1d626b071547feb6680508fc59d7256ba6413484ba9893 | R | 32,486 | 985 | ---
title: "Melanoma single-cell DT data - Melanoma cell states identification"
author: "Yingxin Lin"
date: "Created on 12 July 2023, last compiled on `r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
code_folding: hide
number_sections: yes
toc: yes
fig_height: 12
fig_width: 12
toc_f... |
4ee06c7f0fbe1714d828b2467435d6e435db20270dcd88da563ccace577a90c1 | R | 32,712 | 1,098 | ---
title: "Vertical Analysis Pa: Ctrl, NTI, Naloxone (hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "Date: `r format(Sys.time(), '%d/%m/%Y')`"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline... |
40c0f893fa14ad02111a2203856b0cd5f3ea39f0db6e465947c2f3ac7d616c27 | R | 32,927 | 559 | ---
title: "Familywise error correction for voxelwise GLMs in fmri.pipeline"
author: "Michael Hallquist"
date: "4 Feb 2022"
output:
html_document:
code_folding: show
df_print: kable
mathjax: default
number_sections: yes
theme: spacelab
toc: yes
toc_depth: 2
pdf_document:
code_folding... |
d5651b694aca2fa50e4c43c9c55e8a615e2f498745f7fb1aba2e8f4ed4fe7f4d | R | 33,035 | 1,191 | library(dplyr)
library(tidyr)
library(sccomp)
data("seurat_obj")
data("sce_obj")
data("counts_obj")
counts_obj =
counts_obj |>
mutate(count = count+1) |>
with_groups("sample", ~ .x |> mutate(proportion = count/sum(count)))
set.seed(42)
n_iterations = 1000
if (instantiate::stan_cmdstan_exists()){
my_es... |
cd2326e5d86faada0c4e4ff73577b0c3a77a47af32f32f0f3f88e7261235c612 | R | 33,298 | 760 |
basepath = "/net/trapnell/vol1/home/readdf/trapLabDir/hubmap/results/2021_07_15_Greg_ATAC_Code_nobackup/"
dir.create(paste0(basepath, "archr/results/NB9/"))
out_dir = paste0(basepath, "archr/results/NB9/")
setwd(out_dir)
set.seed(7)
# load requirements
suppressPackageStartupMessages({
# library(ArchR)
library(mon... |
1e3a648e47b0b49e3e1aecccf7fb1d52fbfee27641956aa6e63c3fc162888217 | R | 33,495 | 821 | # TODO: Support ability not to run models at a certain level (e.g., level 3) if only lower-level models are needed, or also
# run just higher-level models if lower levels are already complete.
#' primary function for running a GLM analysis pipeline
#'
#' @param gpa a glm_pipeline_arguments object containing a model s... |
4ba1f08017c40bbcb635477168e691112889ec1644d11409366392061d2198af | R | 33,787 | 494 | ## ---------- Script -----------------
##
## Script name:
##
## Purpose of script:
##
## Author: Szi Kay Leung
##
## Email: S.K.Leung@exeter.ac.uk
##
## ---------- Notes -----------------
##
## ---------- Source function and config files -----------------
SC_ROOT = "/gpfs/mrc0/projects/Research_Project-MRC148213/... |
42a7775fbd44cd61adc80d861d2450a977f8438bed43157903c4147299a3dae7 | R | 34,390 | 928 | ---
title: "postUMI_LimmaVoom_DEG_allregions, HOMER_TFEnrichmentAnalysis, LOLAPromoterEnrichment_MicrogliaChIPseq"
author: "Annie Ciernia, Jenn Kim"
date: "`r Sys.Date()`"
output: html_document
---
# load libraries
```{r}
library(ggplot2)
library(dplyr)
library(cowplot)
library(RColorBrewer)
library(gplots)
library(gg... |
30233e35235c59f4adf3f0f6992715c06b7950cf43ea24d7e9b75044705b78d1 | R | 34,619 | 1,143 | ---
title: "Bilateral adrenalectomy: PAS (Pre, after adx, hand, machine)"
author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>"
date: "9/23/2021"
output:
word_document: default
html_document:
toc: true
toc_float:
collapsed: false
editor_options:
chunk_output_type: inline
---
```{r setup, include=FALSE}
sourc... |
29ef2f0842b6ecc3dac605a7435ebca5b6ebc6bebba452945b2e4800c0d0e375 | R | 34,649 | 838 | #' This is a small helper function that returns the inputs provided in the feat_files field for
#' a set of .fsf files.
#'
#' @details
#' One can also pass in .feat or .gfeat directories and the function will
#' use the design.fsf files within each of these to find the inputs
#'
#' @param feat_list a vector of desig... |
a628980ced0ec603d8b79636a2653c37bad94eb12ba8b2dd7596383fa5147137 | R | 34,829 | 828 |
#' Plot 1D Intervals for Cell-group Effects
#'
#' This function creates a series of 1D interval plots for cell-group effects, highlighting significant differences based on a given significance threshold.
#'
#' @param .data Data frame containing the main data.
#' @param significance_threshold Numeric value specifying t... |
f628ff85d23d697fc1d487a572998a187ce17942fb01a7370824fc33a6ea979c | R | 34,907 | 764 | suppressPackageStartupMessages({
library(ggplot2)
library(GGally)
#library(GSEABase)
library(limma)
library(reshape2)
library(data.table)
library(knitr)
#library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(stringr)
library(NMF)
library(rsvd)
library(RColorBrewer)
library(MAST)
})
... |
b8022afac35858fdac99ac2114aba8569eac6e0da005d1efd214de9cd4b2e2bf | R | 35,030 | 914 |
basepath = "/net/trapnell/vol1/home/readdf/trapLabDir/hubmap/results/2021_07_15_Greg_ATAC_Code_nobackup/"
# dir.create(paste0(basepath, "archr/results/NB6/"))
out_dir = paste0(basepath, "archr/results/NB6/")
setwd(out_dir)
# load requirements
suppressPackageStartupMessages({
library(ArchR)
library(monocle3)
lib... |
6ab7421103468eb46134d6c3486a61bb6bd2e3f87863867020ce29f98dc30d94 | R | 35,064 | 510 | ---
title: "fmri.pipeline overview and design"
author: "Michael Hallquist"
date: "30 Jul 2021"
output:
html_document:
code_folding: show
df_print: kable
mathjax: default
number_sections: yes
theme: spacelab
toc: yes
pdf_document:
code_folding: show
df_print: kable
number_sections... |
b7ecf03cfe6098470be7c13ccc0f4c2cb6337bf4c98a15166060dcf49af06b31 | R | 35,309 | 783 | #' This is a small helper function to validate the glm_model_arguments list structure.
#' It adds a few details such as the output directory to make it less burdensome for to setup a pipeline
#' N.B. gpa is a shorthand abbreviation for glm_model_arguments, to save typing
#'
#' @param gpa A \code{glm_pipeline_arguments}... |
cccda41b8d836ce5283cd88f729e99e55ee2877f6bd709cf4a0ab6bb1155914b | R | 35,545 | 1,148 |
library(Seurat)
library(dplyr)
library(ggplot2)
library(limma)
library(muscat)
library(purrr)
library(scater)
##########################################################################################################
setwd("G:/PFC_429_final_Spring2021/Data")
pbmc=readRDS("Ast_integrated_batch_5000_le... |
9e66379202fb85e79700035cc64d2c330654d2156ab7783d1ea58c63e9c44f76 | R | 35,754 | 844 | #!/usr/bin/R
# -----------------------------------------------------------
# Use the pathology to run some tests on linear mixed models:
# Using Liang's Nebula package to run the fast NBLMM
# Basic overall + per-region interactions, for relevant subtypes
# Updated: 10/28/2020
#
# Compare multiple models (in a per-regi... |
7c0567c44f35c97fe5a316dcb643632f7921af9c8023a1da93667b2ffe879e88 | R | 35,806 | 884 |
centos6LoadMonoclePackages <- function(){
modStatus <- tryCatch({
suppressPackageStartupMessages({
library(dplyr)
library(SoupX)
library(devtools)
# library("uwot")
library("irlba")
library("Rtsne")
library("s... |
353de2ccf4bfbb1e841445c33f0c41db1b2e249d5f217eb555948ecdf6f5fa7f | R | 36,030 | 854 | #' Add IDs to Citation Data
#'
#' This function adds an ID to citation data if missing.
#'
#' @param raw_citations A dataframe containing citation data with relevant columns.
#' @return A dataframe of citations with IDs.
#' @import dplyr
#' @noRd
#'
#' @examples
#' # Load example data
#' data <- data.frame(
#' author... |
7693d689f41a0a08cae6e28b3437d011b56dcfd7f7e863a62478f2e72b1253ed | R | 36,074 | 808 | #' Description of R_batch_job R6 class
#' @importFrom lubridate period_to_seconds
#' @importFrom stats setNames
#' @importFrom utils capture.output
#' @export
R_batch_job <- R6::R6Class("batch_job",
private = list(
# whether the batch and compute files have already been created
batch_generated = FALSE,
#... |
252e1ccfe1c5a09f653840d1535d3fe875d40a97d10e392df4adefe07307cf72 | R | 36,124 | 1,007 | #' Lookup FSL FEAT output images by model and contrast
#'
#' Build a tidy lookup table that maps the human-readable pipeline model and
#' contrast names onto the FEAT folder structure for level 1, 2, and/or 3 FSL
#' outputs. The default result separates the structurally different FEAT
#' levels into \code{$l1}, \code{$... |
8634854e5934c15ea1a7c646e4d76a1de7589375104c5ed36c7c9f0b1fd70dcf | R | 36,146 | 968 | # Playful Song Script
# Author: Brandon Polzin
# Purpose: The script is intended to run relative to the home directory where the script is located.
# Libraries: tidyverse, magrittr, DESeq2
# Load Required Libraries
library(tidyverse)
library(magrittr)
library(DESeq2)
library(clusterProfiler)
# Function Definitions
#... |
e43e3a6657c5dd15362c6465730a8dfef380a2424e9ef67a04f50714c0adc6be | R | 36,154 | 999 | ---
title: "DeepRVAT- Figure 3: Phenotype prediction"
author: "Eva Holtkamp"
output: html_document
---
```{r}
library(ggplot2)
library(gridExtra)
library(ggpubr)
library(cowplot)
library(stringr)
library(arrow)
library(yardstick)
library(gdata)
library(dplyr)
library(tidyr)
library(purrr)
library(latex2exp)
options(d... |
034ebeffee76c1e50c10dc509906ebef499357fa0f469abce1600c8e782dff1a | R | 36,261 | 1,070 | #' Function for setting up level 1 model specifications and corresponding files
#'
#' @param gpa A glm_model_arguments function setup by the \code{setup_glm_pipeline} function
#' @param l1_model_names A character vector of model names within \code{gpa$l1_models} whose l1
#' inputs should be generated. If omitted, al... |
89d505333172ade9f635705484ae9c0b8265218ea1bf5d1d2395e7ec201d9320 | R | 36,545 | 743 | #' function to get interpolated event locked data
#' @param fmri_obj An fmri_ts object containing time series data that are optionally keyed on one or more
#' grouping variables (e.g., ROI). The fmri_obj must also contain trial-level data (in the $event_data field)
#' for event-locking to proceed.
#' @param event N... |
69bbfad799993b0d756c49b05e5eee2691718ade3d63953f5d12b34f55065384 | R | 36,733 | 482 | ---
title: "shinyÉPICo: the user's guide"
package: shinyepico
bibliography: bibliography.bib
author:
- name: Octavio Morante-Palacios
affiliation:
- Epigenetics and Immune Disease Group, Josep Carreras Research Institute (IJC), 08916 Badalona, Barcelona, Spain and Germans Trias i Pujol Research Institute (... |
e6301cc0568ad0f2df3e8cf7cf754aea1edb27932bde8a6a49a9704ccb174c9a | R | 36,733 | 482 | ---
title: "shinyÉPICo: the user's guide"
package: shinyepico
bibliography: bibliography.bib
author:
- name: Octavio Morante-Palacios
affiliation:
- Epigenetics and Immune Disease Group, Josep Carreras Research Institute (IJC), 08916 Badalona, Barcelona, Spain and Germans Trias i Pujol Research Institute (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.