sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
190c610d591d950fc746d68473a2782663453b1cf8116b2ab9931ec25dc461c9
R
7,712
273
--- title: "Tutorial: Repeated Measures" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Tutorial: Repeated Measures} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` This vignette document...
865d8024a33cc08ee1dd122ffb77e929ec567b3986aca65bd4b90066d4a898f4
R
7,741
163
### LIBRARIES ### libs <- c('ggplot2','RColorBrewer','reshape2','devtools', 'pheatmap','flowCore','plyr','scales','coin','grid', 'gridExtra','tidyr','randomcoloR','viridis','tidyverse') for (L in libs){ if(!require(L, character.only = T)) { install.packages(L, dep = T, quiet = T) if (...
28ba25ce39c913fb7061f7b5d104550c6544cbbaad866a22f79700a8772f4c14
R
7,748
147
# universe_policy (SPEC-RICHR-005 REQ-017): an opt-in ORA option counting # tested-but-unannotated universe genes in N and n. The default ("annotated") # must stay identical to the omitted argument on every entry point. Fixtures: # F-AUD inline, F-ORA-C from the committed characterization fixtures. fc_read <- function...
1e0c0719dca6503a1f487ddfa8286bd30be74c703332b4dd72fa3a3a0db29ef5
R
7,771
125
#### Neighborhood Analysis #### #### Initial Data Carpentry #### # prepare quantile normalized neighborhood data (note: neighborhood counts are summed from each object within each neighborhood) master_neighborhood_c <- master_neighborhood names(master_neighborhood_c)[80] <- c('de_novo_regions') mas...
a0f99a5f845150473bc8297a91f31a0dcdd5946d01dc3fbb163c98bf7bb6c3fe
R
7,779
156
##' Dotplot for enrichment results ##' @importFrom ggplot2 ggplot ##' @importFrom ggplot2 aes ##' @importFrom ggplot2 geom_point ##' @importFrom ggplot2 element_text ##' @importFrom ggplot2 geom_text ##' @importFrom ggplot2 theme ##' @importFrom ggplot2 scale_color_gradient ##' @importFrom ggplot2 xlab ##' @importFrom ...
943b6c125ef30b8d6e132bc0c86a8991c9926acdaf43d59d0200a0a2d1c4dddc
R
7,782
182
--- title: "Running estimate_cycle_position from tricycle on Seurat Objects" date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' output: github_document: html_preview: true toc: true toc_depth: 3 fig_width: 16 html_document: df_print: kable theme: united fig_height: 5 fig_width: 1...
a14feb0bd9148ea0d025c9472c43f4c9c7bcdcf8f77fe78cf624f7bb0ec981d9
R
7,798
190
#' Prune Cy3 spots from spatial transcriptomics (ST) array #' #' This takes segmented contours form Cy3 ST array and prunes it from aritfacts #' and detects spots thar are missing.function loads a file as a matrix. #' #' @param segmentation a segmentation list obtained from segment() #' @param array.dim the dimensions ...
f0ca6d4dae313221b840bd368c745e3aa5d17023a02fa8c3a21d022d5b764951
R
7,808
162
#' Stitch image using grid layout #' #' Stitches multiple image tiles. #' @param input input a character vector consisting of the full path name to 16-bit raw tif image files. If length(input)==1 then its a folder and it will get tiffs inside. #' @param stitched.image.name filename of the stitched output, default is th...
cbed86a75d51c26f9a51a7fe0de649e95f70b5a0d11af6c54745c7573ee94811
R
7,817
160
### LIBRARIES ### libs <- c('ggplot2','RColorBrewer','reshape2','devtools', 'pheatmap','flowCore','plyr','scales','coin','grid', 'gridExtra','tidyr','randomcoloR','viridis','tidyverse', 'ggpubr') for (L in libs){ if(!require(L, character.only = T)) { install.packages(L, dep = T, quiet = T) ...
48b2c0e422d14f1ac00e20be6dd38c320c450e8007cb56058549fb1791b2d78a
R
7,920
245
#R/Natverse code for Video 2 of the Jasek et al 2022 desmosomal connectome paper #Gaspar Jekely, Sanja Jasek 2022 source("code/Packages_and_Connection.R") # colorblind-friendly color palette Okabe_ito_noblack <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7") # load landmarks yolk <- c...
854b78bb7820fe5b6cc94f4841c68a11bfb175d98506696d7e971b82713de3ca
R
7,923
156
##### object_import ##### - Repeat for Hi, Med, and Ctrl Conditions # Import post-ez_segmenter data or deepcell data (MATLAB generated) for single object + cell analysis, respectively # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) ##### INSTALL / LOAD PKGS ##### # instal...
e06589f68fa0d7b2594b241de0d8769bf9ea2982791ca7a5f726d2b9fdefc820
R
7,970
246
options(warn=0) args <- commandArgs(TRUE) # What post-hoc comparison we want to do mode <- c(no_ph = "No post-hoc test", co_deco = "Disconnected versus spared", deco_ctr = "Disconnected versus controls", co_ctr = "Spared versus controls") # ph_test <- c(kw = "Kuskal-Wallis", mw = "Mann-Whitney", ttest = "t-test", # k...
88c0a12889c4ca6ac89d7c6b828e017af67dbddb6a641733264169d77f54a54f
R
7,993
169
# Fixtures for the plot tests of SPEC-RICHR-006 (M6.1, pure plots): # test-plot-selection.R, test-plot-fabrication.R and test-plot-reference.R. # fixtures/make-plot-reference.R sources this file too, so the AC-009 reference # and the test that compares against it run the same calls on the same inputs. # Inputs are buil...
b7f8130a04833c8322b7c014acebe85f51436ba5f43c414d9dc9c822c05ba662
R
8,011
139
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
af09909df39d93a3a4db89fb29f482450e35051e9776b558da96af485e6a69cb
R
8,028
139
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
7fa6a92fcfabf0b934fd795d1c4c82e92617fa9f6c0e2712f74d0120b181b046
R
8,114
161
--- title: "Benchmarking Visualization" author: "Will Townes" output: html_document --- ```{r} library(tidyverse) theme_set(theme_bw()) fp<-file.path pth<-"scrna/visium_brain_sagittal" plt_pth<-fp(pth,"results/plots") if(!dir.exists(plt_pth)){ dir.create(plt_pth,recursive=TRUE) } ``` ```{r} d0<-read.csv(fp(pth,"r...
9c470854a392edccf5490bbf2713a489f8d2e63f48e6034c7312b8e69fd8d0f2
R
8,165
170
#!/usr/bin/env Rscript ################################################ ################################################ ## LOAD LIBRARIES ## ################################################ ################################################ library(optparse) library(ggplot2) library(reshape...
f8ea3ddb6e460060f561de343c7bb72afaa37190ce91d13543b3696131e238ec
R
8,255
139
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
3c4cf97447e790f7d59905646a92c9d3a6b2f64b47e2b0760cd62be8c112d920
R
8,337
251
--- title: "Running CoGAPS on Seurat Objects" date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' output: html_document: df_print: kable theme: united highlight: null github_document: html_preview: true toc: true toc_depth: 3 --- This vignette demonstrates the use of the CoGAPS package o...
ebb8317464145d02325dd05b3382916a66c3b2680fa9dec1abe202f5caabf82f
R
8,357
179
# Alpha Diversity adaptable ##### Alpha Diversity Boxplots Script ######## Load Data & functions source("src/load_packages.R") source("src/metadata_prep_funcs.R") source("src/miscellaneous_funcs.R") source("src/community_composition_funcs.R") source("src/stats_funcs.R") alpha_diversity_summary <- function(x, z, tag){...
be4bfc1b2bea061b5cfa661ab397e530bfa76513b8c89402267ec5146c107c3a
R
8,409
188
# ORA plot display labels (REQ-009 .. REQ-011). Upstream-portable: the results # are built by hand (no enrich() labelling), only exported plot functions are # called, and only testthat edition-2/3 expectations are used. # # Two identifiers sharing a label must be drawn as two categories # ("label [ID]"), never merged a...
5e4a54e60241f526a7e7d9bc328db0f661cc150069ad86f99ace64560f6906b7
R
8,438
235
--- title: "Tutorial: Basics" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Tutorial: Basics} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` This vignette documents the basic functional...
d1239dac46b52ac21b5b39cc37e2eeb02999fc4635e732b95e611201ad953dc8
R
8,503
166
--- title: "Benchmarking Visualization" author: "Will Townes" output: html_document --- ```{r} library(tidyverse) theme_set(theme_bw()) fp<-file.path pth<-"scrna/sshippo" plt_pth<-fp(pth,"results/plots") if(!dir.exists(plt_pth)){ dir.create(plt_pth,recursive=TRUE) } ``` Convergence failures * MEFISTO with L>6 or ...
50c8d1f50a3f274eaee4c68b915d0a9302d802a7596a0b5d200d27eee6d09934
R
8,504
202
library(Seurat) library(patchwork) library(dplyr) library(ggplot2) library(glmGamPoi) ### This file will do the Immune integration and output files needed for the integration section of the Shiny ### These 5 RDS files can be downloaded at GEO Accession = GSE198582 wd <- getwd() setwd("Y:/CDBLabs-Bioinformatics/Some_Pl...
5b8c7fec5f5eb43f308ff39c6ab7da02f7772eeb2be38a8debcf1effde170fab
R
8,506
199
#### analysis #### # combine all three datasets - Ctrl, MedAD, HiAD master_obj_data_Ctrl_together <- master_obj_data_Ctrl levels(master_obj_data_Ctrl_together$run_type_id) <- c('Healthy Control', 'Healthy Control', 'Healthy Control') master_obj_data <- rbind(master_obj_data_Ctrl_together, master_obj_data_Med, master_o...
38595f5eacd623ab5db7ddef25e6149b3454ccd01cbb44802ba2d7aff0e0fc13
R
8,521
211
#' @include internal.R #' NULL #' Run miQC on a Seurat object #' #' @param object Seurat object #' @param percent.mt (character) Name of the column in the Seurat metadata that #' contains the percent of reads attributed to mitochondrial genes. #' Defaults to "percent.mt". #' @param nFeature_RNA (character) Name ...
993d7374db51e83c313e4aec08fcdb0139a0a90e63ab8c99941b45a2ecd24b17
R
8,528
278
#Harmonisation functions ############################## # # # Cross-sectional Combat # # # ############################## get_crosscombat <- function(forcombat, from = "Ventricles", to = "Brainstem", is_dti = "no", prior = "parametric"){ #we nee...
df36ccf6c7ecc6fbfa58bd0017881ca33a56850bc62a13c311424d7a5de46cfc
R
8,672
182
# set up ------------------------------------------------------------------ rm(list = ls()) library(tidyverse) library(data.table) library(plyr) setwd("/home/eli/Desktop/Neurobiologia/projects/ongoing/verbal.irony/facilitators/experiment.2/") # general ----------------------------------------------------------------- ...
ce8af90c5c052078ddf388260d9df998c290d8fb0ddca8d8e7c5eadd64f43f09
R
8,733
322
--- title: "GLMM Script for iScience" author: "Kirthana" date: "2023-01-19" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Import Libraries ```{r include=FALSE} rm(list = ls()) graphics.off() gc() # Package names packages <- c("ggplot2", "rea...
363fe0800242f6d55940d1f16af72d433d3d9686edb381359355149fae571f9f
R
8,795
243
#' Plot KEGG Cluster Visualization #' #' This function generates a KEGG GESA cluster plot, showing pathways and their relationships #' across different clusters with customizable aesthetics. #' #' @param data A data frame containing KEGG cluster data. Must include columns: `pathway`, `Level2`, `group`, `Padj`, `Signifi...
96052b7ff888e1c2998fd31e4ec31ec1ffa96466de7d7381076820bd5d9a3a3f
R
8,797
223
#' Finding statistically significant differences in cell type proportions #' #' Calculates cell type proportions, performs a variance stabilising #' transformation on the proportions and determines whether the cell type #' proportions are statistically significant between different groups using #' linear modelling. #' ...
f34f156420b2038267eae79572b7bdb021cb485e504ddef5913c299aceb7fc66
R
8,803
209
wd <- getwd() library(Seurat) library(dplyr) library(ggplot2) WT_1 <- Read10X("Y:/CDBLabs-Bioinformatics/Some_Place_Where_Big_Files_Can_Sit/Giger_2022_CellRangerFiles/Day_3/Sample_WT_sciatic_3_days_1/filtered_feature_bc_matrix") WT_2 <- Read10X("Y:/CDBLabs-Bioinformatics/Some_Place_Where_Big_Files_Can_Sit/Giger_2022_C...
59b2cfd1b1eeb4acc88dc08acc48158cb1f941c263ccab970831b7876550316e
R
8,804
148
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
2a997689280a9a7e062d90e2247690ffe5b440ba5bd43324046fc2f23d6561b5
R
8,807
148
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
cf7e312a5b4b850c41a69cf138c1625462573a7dc3ebe73e1b6db1c7a2bdea83
R
8,896
164
#' Run PaCMAP (Pairwise Controlled Manifold Approximation) #' #' Runs PaCMAP, a method for dimensionality reduction for scRNA-seq data. #' data. Constructs three kinds of pairs of points: neighbor pairs (pair_neighbors), #' mid-near pair (pair_MN), and further pairs (pair_FP) based on positional relationship #' in the ...
d8e7cbc744b99a89b51e70bbfcc07410535b367d515790b31352028cbc27d682
R
8,923
241
#' Find dimensions #' #' Find dimensions of stitched image from number of tiles. #' @param x an integer value which give sthe number of tiles. #' @keywords grid #' @export #' @examples #' find.dim(63) #find.dim<-function(x){ # width<-ceiling(sqrt(x)) # height<-floor(sqrt(x)) # if( (x-width*height)>0){ # ...
38f02f5372a724a8cef7e2c6cceb382e841c4ac02a52e8e346139acbce7478c1
R
8,961
237
--- title: "Controlling Plot Aesthetics" output: rmarkdown::html_vignette description: | Loading in of sample datasets for dabestr. vignette: > %\VignetteIndexEntry{Controlling Plot Aesthetics} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set(...
4ece8b73175c3910426bfa7dbca414e6a2160210243cf9a786a77cc7a9020ef8
R
8,994
225
setwd( "~/Dropbox (ASU)/Placenta/BATCH2_PLACENTA_DECIDUA_ANALYSIS/HISAT_FeatureCounts/batch1_and_batch2/" ) library(reshape) library(ggpubr) library("gridExtra") # read in placenta CPM data df_merged_placenta <- read.delim ("genelists/placentas_batch_1and2/cpm_placenta_df_genes.txt") df_merged_placenta$group <- "t...
c688eb06e1eeb9bb69e570674f1cc0f267044be9b9fd4eb43ddbb2ac92a2a8a7
R
9,027
166
--- title: "Align biological replicate data with blotIt" author: - name: Severin Bang affiliation: Uni Freiburg email: severin.bang@physik.uni-freiburg.de - name: Svenja Kemmer affiliation: Uni Freiburg - name: Marcus Rosenblatt affiliation: Uni Freiburg - name: Daniel Kaschek affiliation: Uni Freiburg output...
95e5cda69c22c2cfb398c5291234a80589a8894cc715b88f5bd69697b0e5204a
R
9,052
148
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
9a7a096ab3ad01ce6b8658e78b9e67acd1303d1c1841946d3f959c0668c08750
R
9,069
301
# This include the Knockoff and Knockoff plus fliter to computer FDR and Power # This master R file includes all the R functions for implementing the knockoff filter and # knockoff filter plus in high-dimensional linear regression with precision matrix of # covariates estimated by the innovated scalable efficient ...
1de436e42c433f76c06077bb15bc02ea2af51b18ee0ab022e320433564f138cc
R
9,075
189
library(EBImage) library(nnet) library(reshape2) library(readr) setwd("/Volumes/KausaliaHD 1/R4R/General/") #Run DeepCellAnalysis.R then DeepCellAnalysisUmapTMAQuntile before using this Rscript to get "gated_UMapData" or "all_data" clusters!!!!!! #DeepCell Segmentation Paths fcsPath = "/Volumes/KausaliaHD 1/AllProje...
658cba65c116e1fc53ca71d5cf909af1f0bac790682bae0b191e894c142fdf3e
R
9,084
213
# title: "decidua MDS plots" # author: "Kimberly Olney" # date: "02/14/2020" # output: # pdf_document: default # html_document: # df_print: paged library(limma) library(edgeR) library(RColorBrewer) library(dplyr) library(ggplot2) library(VennDiagram) library(mixOmics) library(devtools) library(dplyr) library(str...
533a4d9c2af2c159dadf7e016c8caa6c81a012162e1b8377a8e93fbed7c63f02
R
9,112
185
# Function to generate a permutation map from a set of cortical regions of interest to itself, # while (approximately) preserving contiguity and hemispheric symmetry. # The function is based on a rotation of the FreeSurfer projection of coordinates # of a set of regions of interest on the sphere. # # Inputs: # c...
a10e83e6fb3126434ccdf1b517f3d22cc0061d64e51146332c1c52a1b030c43b
R
9,117
211
# ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # # # ---------------------------------------------------------------------- closeAllConnections() rm(list=(ls()[ls()!="v"])) gc(reset=TRUE) library(raster) library(ggplot2...
71b8f855276b201e76404d833b4e39de0fa9c65d02fb85153b2da86829ec7c63
R
9,156
182
# Load data source(here::here("code","01_load_data.R")) load(here::here("data","langrecov.RData")) load(here::here("data","concur_acute.RData")) load(here::here("data","concur_subacute.RData")) load(here::here("data","lagged_subacute.RData")) load(here::here("data","lagged_chronic.RData")) load(here::here("dat...
a2476194cc376c9703a362a7e94650fc7c453513354a48eda1c9f98832d018ea
R
9,221
184
--- title: "Cell-type and tissue specificity" author: - name: "Regina H. Reynolds" affiliation: UCL output: html_document: code_folding: hide theme: paper highlight: kate df_print: paged toc: true toc_float: true number_sections: true --- ```{r setup, include=FALSE} library(data.tabl...
d8c0b321490e3421d12d6756f3834b650f802e30ae9f84d6a005824119a9aef5
R
9,384
221
wd <- getwd() library(Seurat) library(dplyr) library(ggplot2) RG_5 <- Read10X("Y:/CDBLabs-Bioinformatics/Some_Place_Where_Big_Files_Can_Sit/Giger_2022_CellRangerFiles/Day_7/2405-RG-5/filtered_feature_bc_matrix") RG_6 <- Read10X("Y:/CDBLabs-Bioinformatics/Some_Place_Where_Big_Files_Can_Sit/Giger_2022_CellRangerFiles/Da...
28998cc0ec7ba103ca4bd8d2995bd5e433d174b1da2887410e7137a746352da1
R
9,438
246
# Differentially Abundant Features (DAF) Functions #_______________________________________________________________________________ fit_models <- function(obj.name, df_input, df_metadata, cores = 10, plot_scatter = F){ ...
04a70539bf795bcb05e60853bd48808c557f69efcb4e054e066f5ac0f7f54cfe
R
9,480
386
# @DESCRIPTION: de # Library ----------------------------------------------------------------- library(magrittr) library(ggplot2) library(patchwork) library(rlang) library(DESeq2) # Load data --------------------------------------------------------------- se <- readr::read_rds( file = file.path( "analysis/202...
95b3cace07d12ce89e19fd0696a06f0ac9bf170f846d524a9db9edc198826cbf
R
9,501
162
# Read in RGB mask TIF(s) and plot a heatmap of mean expression values per region (and per sample) #### Import All #### # Read in csv with pixel per mask, run info (generated in MATLAB) pixel_regions_info <- read_csv('/Volumes/BryJC_Stanford/other/ForDmitry/fig6_carpet_voronoi/separated_masks_voronoi/pixel_info.cs...
74b5ac19f0d25be17dcf01102bcdb6b3b1d33804180502cbfdaafc23b7c72c82
R
9,505
291
# Sex differences in placenta compared to sex differences in adult GTEx tissues. # Lopes-Ramos et al. 2020 gene lists per tissue # Set working directory setwd("~/Dropbox (ASU)/Placenta/BATCH2_PLACENTA_DECIDUA_ANALYSIS/HISAT_FeatureCounts/batch1_and_batch2/sexDiff_GTEx_version6/") # load libraries library(dplyr) libra...
9d1c92baa9bd80a4224ec1c2ccc5b660c0444c0643cc6a217be5ae950edcff49
R
9,518
216
# The tested table (SPEC-RICHR-004 REQ-001 .. REQ-004): what an analysis # tested, not only what it reported. Fixtures F-ORA and F-GSEA are built in # helper-tested.R with the public API. # ---- ORA (AC-001, AC-002) ------------------------------------------------------ test_that("ORA records every tested term with o...
66699450d9399924c00f0d6182fccb11637d313d49e0f8e4fee454cd5828715c
R
9,586
85
library(tidyverse) library(lme4) source("scripts/R/ReadDataMTurk.R") # read the tables from python code # Distance of each child to adults all_dists = read.table("results/csv/all-dist-to-adults.csv", header=T, sep=",") # Analysis and plots for ICDL20 paper ### Statistics ### # which layer to use (0-6) for (l in 1:6...
4d14e84d49afdc38d1fbbb5b039a0501ce6710d8ead5d2772f6a897da7fc4f4b
R
9,591
292
--- title: "Tutorial: Proportion Plots" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Tutorial: Proportion Plots} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` This vignette documents ...
8bf3075ff66c72c4d2598910d397d72d1aca54b3d5ae8752c0d52b63ec3fef24
R
9,665
218
library(limma) library(edgeR) library(RColorBrewer) library(ggplot2) library(tidyverse) library(matrixStats) library(reshape) library(ggpubr) library("gridExtra") #-------------- # set working directory #-------------- #setwd("~/Dropbox (ASU)/Placenta/BATCH2_PLACENTA_DECIDUA_ANALYSIS/HISAT_FeatureCounts/batch1_and_ba...
19c088fde8e5097e9136786d7a2825f9896076e4340e21afc1788d2f8c4771d7
R
9,692
206
# Gene-set fingerprints (REQ-015 .. REQ-018), canonical form richR-geneset-v1. # Catches: a fingerprint that is missing, R-version-dependent, computed over the # wrong columns, unstable under row order, blind to membership changes, or copied # from a stale Annot into an analysis result. Offline; providers are mocked. ...
2f89cb1499ab3dde6ed9decdf6166be519fd575fa54549f5fe89d6342198547a
R
9,711
288
#' @include internal.R #' NULL #' @inheritParams Seurat::CreateSeuratObject #' @param default.assay Name or index of matrix to use as default assay; #' defaults to name of first matrix in list #' @param slot Name of slot to store matrix in; choose from 'counts' or 'data' #' #' @importFrom methods new #' @importFrom ut...
c8d5372471038bb72094326b5d48dddbbe71fc7b2c67348398e2cc4dff5c95f5
R
9,720
252
--- title: "Running miQC on Seurat objects" date: "Compiled: `r format(Sys.time(), '%B %d, %Y')`" output: html_document: df_print: kable theme: united github_document: html_preview: no toc: no --- This vigettte demonstrates the use of the miQC package in Seurat. Vignette is based off of the [miQC v...
88c83ae7307174fa0da09800203d0f75dfec7c74e0c47e628af046515b8b8f98
R
9,752
192
WD = getwd( ) setwd(WD) source("mirror.R") CHR = "8" FID = "201" # at the end of this code you can find the list of significant IDPs for both Chr 8 and 17 data <- read.csv(file=paste(WD , "/data/Chr_",CHR,"/myData_",FID,".csv",sep=""),head=TRUE,sep=",") Data_Mirror <- data.frame(data) save(Data_Mirror , file = "...
c3cd63492499f2e985c137988c61f0bed01053c092b7ccbd3dd08bbeefe9b733
R
9,757
276
#' Apply Effectsize #' #' @description Generates the dabest effectsize objects given the specified effect size #' #' @param contrasts A list of contrast objects. #' @param effect_size Type of effect size (e.g., "mean_diff", "median_diff"). #' #' @return The list of updated dabest effectsize objects #' @noRd #' apply_ef...
1a9a4bd9b79255f9b549182f3e7aa18b07aa45e87727c0b7f1dacacc5143797d
R
9,778
256
# # This is an example of applying the graphical knockoff filter. # # The master file "isee_all.R" includes all the R functions for implementing the innovated # scalable efficient estimation (ISEE) procedure introduced in Fan and Lv (2015) for # scalable estimation of both the innovated data matrix (n x p matrix X ti...
97b07c4ef1b2a5e1333ff3c6127fc7beaee0607952ae57ffc78352fa427714f4
R
9,860
255
#code to generate Video1 of the Jasek et al desmosomal connectome paper #Gaspar Jekely source("code/Packages_and_Connection.R") # read cells and meshes -------------------------------------------------------------- { #read some meshes and cells from catmaid for plotting an anatomical background outline <- catmaid_ge...
3cd8a13a24f4f25731501e349419d3de87ae74e272b8468824f91010af1351c7
R
9,861
347
# @DESCRIPTION: enrichment.R # Library ----------------------------------------------------------------- library(magrittr) library(ggplot2) library(patchwork) library(rlang) library(DESeq2) # Load data --------------------------------------------------------------- se_group_de <- readr::read_rds( file = file.pat...
c647b4a8bd575b3a65df37dd2c9286cbc2e6519029c8ea209529282c54ad77bc
R
9,903
339
# Obtains bootstraps as well as bca intervals # # Contains functions `effsize_boot`, `bootstrap`, `bca` and `boot_weighted_row`. effsize_boot <- function( data, effect_size_func, reps = 5000, paired = FALSE) { s <- c( rep(1, length(data$control)), rep(2, length(data$test)) ) bootboot <- ...
5ed0d2d51c7830a683262f8e6e0c3f1f1e96ae5afc0020d5d1916b976118382d
R
9,958
201
# mapGenes() (SPEC-RICHR-005 REQ-001 .. REQ-005): explicit identifier # conversion with one recorded decision per input entry. Fixture F-MAP is # inline; only the OrgDb leg needs org.Hs.eg.db (a Suggests package). fmap_table <- function() { data.frame( from = c("a", "a", "b", "b", "d", "e", "g", "h", "k", paste0...
8a790b4d2d8256a3d93866d635cb0713e10284937008b20c1060143319bf7661
R
9,989
372
# @DESCRIPTION: de # Library ----------------------------------------------------------------- library(magrittr) library(ggplot2) library(patchwork) library(rlang) library(SummarizedExperiment) # Load data --------------------------------------------------------------- se <- readr::read_rds( file = file.path( ...
d62ffdf7a7680d5097bfbf44a163a05b51560b82e456a903e2e39037c38857d0
R
10,011
272
calculate_delta_corthick <- function(longdata){ tlong <- longdata tlong <- tlong %>% mutate(across(c("Frontal", "Parietal", "Insular", "Occipital", "Temporal", "Hippocampal", "W...
fd1ef19ca58dec45c2e6fe537091365a8c72c5ddad0449278ffd033407c015b4
R
10,032
206
library(EBImage) library(pheatmap) library(RColorBrewer) library(ggplot2) library(reshape2) library(ggdendro) library(viridisLite) library(scales) allTifsData = data.frame() outputFolder = ("/Volumes/KausaliaHD/AllProjects/BRAIN DATA/MIBI/MIBIData Matlab/May_June2019/TMA/MedResScan_TMA/RResults/BoxScatterplotADScaled...
b32f7ba9cc45e647a60ca0043e597b2a4e1b43c857f9d70b60b397603873bc88
R
10,184
227
#' Read enrichment diagnostics and provenance #' #' Metadata is recorded on newly created Annot, richResult, and GSEAResult #' objects. Legacy objects return an explicit unavailable record. #' #' The \code{testing} element names the family that \code{padj.method} #' adjusted over (\code{family_policy}) and its size (\c...
41bc029250d8e4657e9e32d14a5fc204ba1502b25f04825f9bcacfdae189bc1c
R
10,221
390
library(lmerTest) library(multcomp) library(reshape) library(oro.nifti) library(doParallel) library(foreach) ############################################################################## # Example # basic inputs (see function for more options) # IMAGING_FILE: 4-D file with VBM images # OUTPUT_DIR: output directory #...
cfb2dd680b7102b293633019801111a157591a05e833e1dc4e505d76e6a17284
R
10,233
212
# AC-005 .. AC-008 (SPEC-RICHR-006 REQ-002 .. REQ-005): plots draw only values # the result carries, titled by what they are. # Discrete-axis label of each row of a layer's data (the scale's limits, in # level order, indexed by the mapped position). .m61_axis_values <- function(p, layer, aes = "x") { b <- ggplot2::g...
c5d4af24c2554534032c8199166ff0aa9e65560515f19fd978cdcddd47ece1c8
R
10,244
172
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
60939e72bb88e614fba373df60d46e097c0db759bc1358edefa33f61f7c1182f
R
10,277
261
# Shared fixtures and base-R readers of the report tests (SPEC-RICHR-008), # built from base R, testthat and the public API, with no network and no # package outside DESCRIPTION (report.html is read with regular expressions, # which is exact because richReport() double-quotes every attribute value and # escapes every t...
185413040a727cedd0810e835f396f7b5f31db95957be88399385c3ce1ca3a2f
R
10,282
172
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
c71e88a2d91a67d04d29b4cfaf546651cab87c72ba6c53e921a8086a4c73bcf0
R
10,292
182
# Load data source(here::here("code","01_load_data.R")) # Create subset of data for missing data imputation PWAWM_miss <- PWAWM %>% dplyr::select(sex, age, education, stroke_type, stroke_size, stroke_laterality, stroke_history, old_lesion_load, NIHSS_total, NIHSS_languag...
16f12be6e3ba63e4173ea9156bfc6fc4f2d82dfd8f4e2919be112e0f0e1ce588
R
10,335
333
--- title: "Projection predictive feature selection for the MCED GAGome score" author: "Sinisa Bratulic" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: toc: true toc_depth: 2 toc_float: true number_sections: true df_print: paged editor_options: chunk_output_type: console --...
17a48a2af932e2a44ab0a540946bc40d6ddac2537ad9b888f763dfa8dd2c1819
R
10,336
186
library(Seurat) library(patchwork) library(ggplot2) library(cowplot) library(scatterpie) library(BiocParallel) library(dplyr) library(stringr) library(Matrix) library(scales) library(RCurl) ## total cells analysis # import data data_dir <- "D:/personal_user/Shyr Shyang/00 Tbx3-CreER; Ai14 lineage tracing...
34c0ed55062437ad7614cc75ae1f1bdd88ed07f71c240127b3ee552420323ee3
R
10,336
242
# set up ------------------------------------------------------------------ #rm(list = ls()) library(tidyverse) library(webr) library(rstatix) library(ggstatsplot) library(ggpubr) setwd("/home/eli/Desktop/Neurobiologia/projects/ongoing/verbal.irony/facilitators/experiment.2/") # data ----------------------------------...
dbdaf1c4ba7cd36cafe83fde8a504bbefc812dfd3075548b314454be1df54241
R
10,379
214
install.packages("renv") library("renv") renv::init("/Volumes/BryJC_Stanford/Analysis/KV_BJC_MIBI_Brain_Paper_1/Fig_MedRes/single_object_pipeline") setwd("/Volumes/BryJC_Stanford/Analysis/KV_BJC_MIBI_Brain_Paper_1/Fig_MedRes/single_object_pipeline") install_ez_packages(T) load_ez_packages(T) #Seed seed <- 123 set.se...
154da41aaba339e42883eff296d871038592670aa5efd35e1638b43f34bc70fd
R
10,386
371
# @DESCRIPTION: UV # Library ----------------------------------------------------------------- library(magrittr) library(ggplot2) library(patchwork) library(rlang) # Load data --------------------------------------------------------------- all_expr <- readr::read_rds( file = file.path( "analysis/2022-07-20/r...
6930e9f2afeccee8549c8f5dc6983965873caddc4ba4f6b2c86a752216b45982
R
10,427
146
#' Pathway Enrichment analysis for different level function #' @importFrom dplyr filter left_join #' @importFrom rlang sym #' @param x vector contains gene names or dataframe with DEGs information #' @param kodata KEGG annotation data #' @param level pathway level ("Level1", "Level2", or "Level3") #' @param pvalue cuto...
698f69bd9c7130451b9a28b1f7118d3fb31f1b345fbacae94cd9c08dab94939a
R
10,483
251
gsea_test_annotation <- function() { data.frame(GeneID = c("A", "B", "C", "D"), Term = c("T1", "T1", "T2", "T2")) } gsea_recording_backend <- function(...) { args <- list(...) if (!exists(".gsea_backend_args", envir = .GlobalEnv, inherits = FALSE)) { assign(".gsea_backend_args", list(), envir = ...
c66290c97b312597d637d7791e45db41b41b3a362fa1248fc4e212ad199bd17f
R
10,569
385
#!/usr/local/bin/Rscript #install.packages(c('argparser', 'R.matlab', 'sp', 'gstat'), repos="http://cran.r-project.org") library(argparser, quietly=TRUE) library(sp, quietly=TRUE) library(gstat, quietly=TRUE) library(R.matlab, quietly=TRUE) NAME <- "cokrige.r" DESCRIPTION <- "Cokriging of a csv dataset, where a head...
07732840052c2bd22d65c252983ab905f81d6a97f38ece89a3cfc63fc75672f7
R
10,589
304
# Helper functions that generates plot components. # # Contains functions `create_rawplot_components`, `create_deltaplot_components` and `create_violinplot_components`. #' Generates list of TRUE/FALSE for raw plot components that will be built #' #' This function generates a list of booleans determining whether certai...
9a700e51babcb65afaeceda9c5e82ff8f0e84a5b1eda4e6ce109cd8ebdbbc33a
R
10,636
174
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
99208b61e98ea5aaecb467676e032a9c603ec73eae6f6ce014fcb722b44769be
R
10,672
174
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data ann deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
4d85c884edbc3b663ba826d46c72387384c599215bfe760582578ac175eb7271
R
10,709
340
# TODO Add documentation effect_size_mean_func <- function(control, test, paired) { mean_diff <- mean(test) - mean(control) if (paired == TRUE) { mean_diff <- mean(test - control) } mean_diff } # TODO Add documentation effect_size_median_func <- function(control, test, paired) { median_diff <- stats::med...
5beabef0be25e8e213eb5a236f89807064c13508063dc743798a0c8802a4d2d6
R
10,756
167
##RUN DeepCellAnalysis_HiAD_Gated_NormAllChannel.R to generate all_data ### # Import existing all_data from the enviroment using Import Dataset. Rename simply into all_data # Need to pool all the new Mantis corrected csv into one folder. library(readr) dataPath = "/Volumes/KausaliaHD/AllProjects/BRAIN DATA/MIBI/MIBID...
2378e3a211e249bdea69713d6f3d2e7d5d373d29311755aa8a5118b02852c570
R
10,766
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
d28c40493582408b156ec6529c4ad87ce49c3d62739b7beb1bba653f148327e5
R
10,770
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
d3288d381d6c782e914e18dd072a5ac0cbe3b61227de3222d4ef9ea032ca660e
R
10,798
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
67053176e924eaba370fc1067c4f9d6278383ae02fa5e1a9acab244ee955e334
R
10,799
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
085a6cc463023bff3a4fbb11723bf3ed1fcc52ec1331393e972c89d153085085
R
10,804
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
853f09efc0463c0375d09b44e519d1d3988ca37f5084090b6a2ccc0db1da93e5
R
10,806
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
559e10f15000e8221fcceee79bea75a5470b03eaf410e3ce604062eb20a7a1e1
R
10,812
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
f86fb45b735832ae39a64a11b82a3ac4ee77fd58ee4b31d4cba87a563011443b
R
10,814
182
##### object_image_writer ##### - Repeat for Hi, Med, and Ctrl Conditions # Working with post-ez_segmenter data and deepcell (MATLAB GUI generated) for single object image creation # Author: Bryan Cannon 2020 (multiple code snippets taken or built from DM, FH, EFM, DT) # install and / or load ez_pkgs if you have...
f98bf4292269ea9ed40d8ed90384296414afc36d3b1e363c033d47f19951749b
R
10,877
274
## BART: Bayesian Additive Regression Trees ## Copyright (C) 2018 Robert McCulloch and Rodney Sparapani ## mc.gbart.R ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the...
905cef5621b04b2ac0bbfa745785d0c75f63813a07a91b239e1b8f44a9bb1d6a
R
10,883
189
# Read in RGB mask TIF(s) and plot a heatmap of mean expression values per region (and per sample) #### Import All #### # Read in csv with pixel per mask, run info (generated in MATLAB) pixel_anat_info <- read_csv('/Volumes/BryJC_Stanford/Analysis/KV_BJC_MIBI_Brain_Paper_1/Fig_MedRes/data_outputs/mask_expansion_pi...
3fbd18f23beed4ee662cdd118752cdfc61c3ca16207accbc0f398c2f467cbc5f
R
10,929
381
#' @include internal.R #' NULL #' Run optimizeALS on a Seurat object #' #' @inheritParams rliger::optimizeALS #' @inheritParams RunFastMNN #' @param object A merged Seurat object #' @param split.by Attribute for splitting, defaults to "orig.ident" #' @param ... Arguments passed to other methods #' #' @return A Seurat ...