sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
6007ecf74deb1f8ea4dc8343e099956230ece48055028fbe5fea6b1453006d58
R
4,383
97
#' @title #' CBDA Top-Ranked selection function for Compressive Big Data Analytics #' #' @description #' This CBDA function has all the features of the *Consolidation()* function but allows to choose a #' different **top** value (i.e., different from the one specified in the main *CBDA()* function #' @param top_new ...
89881d44f9d1675645aabf7f7c5678c735e183721533334e8fc7896f3ada96f8
R
4,400
92
#' Main workhorse of dcca_factor #' #' Given the two matrices (given by \code{svd_1} and \code{svd_2}) and the #' CCA solution in \code{cca_res}, compute the common scores. #' This calls the functions #' \code{.common_decomposition} and \code{.compute_distinct_score}. #' #' @param averaging_mat sparse matrix #' @para...
83da6ef8898024ac6555d773ba1586452e3516fb6d0a9e6cdfe689f554aab607
R
4,418
101
# Data preprocessing Part 2 (generative values) library(tidyverse) # Load data load("processed_data/allValues/allValuesAuditory_before_DPP_pt2_generative.Rda") load("processed_data/allValues/allValuesVestibular_before_DPP_pt2_generative.Rda") load("processed_data/allValues/allValuesVisual_before_DPP_pt2_generative.Rd...
9d472acde5e6ac0744934b8f428939d357b7276e617b2c242cf2489da0485430
R
4,421
105
context("Test .tiltedCCA_common_score") ## .tiltedCCA_common_score is correct test_that("(Basic) .tiltedCCA_common_score works", { # load("tests/assets/test_data1.RData") load("../assets/test_data1.RData") mat_1 <- test_data$mat_1 mat_2 <- test_data$mat_2 svd_1 <- test_data$svd_1 svd_2 <- test_data$svd_2 ...
11a7ad38769cf6086cd34021698b773327f4631682678704aabb3434b684c7f9
R
4,451
132
--- title: "add_motifs_run_chromvar" author: "Nate Mullin" date: "12/01/2022" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(Signac) library(Seurat) library(patchwork) library(tidyverse) library(EnsDb.Hsapiens.v86) library(Matrix) library(SummarizedExperiment) library(...
bf874d1f80d0984365dce88f2073ec4f5dc1344f63bcc870b9fbd1a92e6b49de
R
4,465
210
/home/toolkit/tools/R4.2.0/bin/R setwd('/home/disk/database/data/ICS_scHIC/f04_multi') library(Signac) library(Seurat) library(EnsDb.Mmusculus.v79) #diyn.load('/usr/local/hdf5-1.8.17/lib/libhdf5_hl.so.10') set.seed(1234) rna <- Read10X("./data/rna/", gene.column = 1) atac <- Read10X("./data/atac/", gene.column ...
3cf2c6dfe79acee4fe02ba585601a3c3cf0dba18ceaaa50367de62bae75adf0d
R
4,480
97
#' @title #' CBDA Top-Ranked selection function for Compressive Big Data Analytics #' #' @description #' This CBDA function has all the features of the *Consolidation()* function but allows to choose a #' different **top** value (i.e., different from the one specified in the main *CBDA()* function #' @param t...
9475894364b184dddb86ff466329d5bfeac06687300f7cf4b8cef34c21728f1e
R
4,512
156
--- title: "dge_multiome" author: "Nate Mullin" date: "02/01/2023" output: html_document --- ```{r} knitr::opts_chunk$set(echo = TRUE) library(Signac) library(Seurat) library(ggplot2) library(patchwork) library(tidyverse) library(EnsDb.Hsapiens.v86) library(Matrix) library(SummarizedExperiment) library(ggpubr) #librar...
0a85254da2ea1a813aafd21eee8e1d7612e8e21a7d217bb12b1887f8a8e52b78
R
4,553
100
setwd(dirname(rstudioapi::getSourceEditorContext()$path)) library(ggplot2) library(dplyr) library(tidyr) library(scales) library(tibble) library(ggpubr) library(reshape) library(taxonomizr) library(data.table) library(purrr) library(forcats) #fetch NCBI db prepareDatabase('accessionTaxa.sql') #load RefSeq data table...
d686a7163af6ec3272af20f04a13fcaa26826ed6df26a3ebba78c180519348e9
R
4,611
111
# Analysis of Microinjected dataset with RaceID # For detailed explanation of each step, #please refer to the RaceID Manual: https://cran.r-project.org/web/packages/RaceID/vignettes/RaceID.html # load packages. library(RaceID) library(FateID) require(tsne) require(pheatmap) require(MASS) require(cluster...
6c5342f481f8ff4d1d7022dedaefd0a9dd7810883e4231fafeefd2c985a3dba0
R
4,638
102
library(Seurat) library(ggplot2) library(SeuratDisk) library(plyr) original_engineered_samples = c("Cre-P61-d112-Live", "Cre-P61-d50-Live", "Cre-P61-d50-Methanol", "Cre-P63-d23-Live", "Flp-P61-d112-Live", "Flp-P61-d50-Live", "Flp-P61-d50-Methanol", "Flp-P...
a8cf659b529bef060a186c5f9038d69f6844f5cdc34030337d7629ee654049b1
R
4,647
90
#Load Packages library(Seurat) library(dplyr) library(Matrix) library(ggplot2) library(patchwork) library(future) library(DoubletFinder) #Set it to 500GB options(future.globals.maxSize = 500000 * 1024^2) # Load Data obj.data <- Read10X(data.dir = "filtered_feature_bc_matrix") # Create Seurat object obj <- ...
2103859b8d43007a3559f463cb9c6df1f61030b61be88066d9d72b8a94d16a12
R
4,656
117
# load environment library(Seurat) library(ggplot2) library(ggpubr) library(tidyverse) library(plyr) library(readxl) source('../../functions/_global.R') source('../../functions/_visualize.R') # load data fetal = readRDS('single_cell_projects/10X-Pak/reference/fetalBrain_Bhaduri_Nature/public_h5ad/Bhaduri_raw.rds') fe...
169ca4f619a141fcc7674566f7aeb796e064db6abfa8a855ea5881e004b2eaf1
R
4,707
135
--- title: "SiT - Supplementary Figure 01" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression i...
7c883b82898f99229baabb169a7304b593e8b33b7e62961bc54ed11dc42ae401
R
4,721
136
### S.vickery October 2020 ## ### Age regression model for IXI human sample ### library("readr") library("plyr") library("dplyr") library("ggplot2") library("stringr") library("MatchIt") library("optmatch") library("rgenoud") library("emmeans") chimp.dat <- read.csv("Chimp_brain_meta.csv") IXI.dat <- re...
93263e8596b048d186ebf2781006940d0a9e2e62e87dece6d1fd92791e84c46f
R
4,813
108
library(data.table) library(dplyr) ptv_raw <- fread(paste0("/camhpc/dept/human_genetics/UKBB_exome_variant_450k/UKB_Freeze_456k_HC_LOF_canonical_bychr/chr2_lof_carriers_v3.txt")) %>% dplyr::filter(gene=="TTN") ptv_raw <- ptv_raw[which(ptv_raw$alt_af<0.001),] pheno <- fread("~/muscle_targets/regenie/UKBB_maxHGS_WBLM.p...
622c12ea04b2af4680de9ab95d81694e176823bb85f8accce16dc054bc6d7854
R
4,820
117
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("clusterProfiler") if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("AnnotationDbi") if (!requireNamespace("BiocManager", quietly = ...
553d3cccd41db31ae49a01812196aa2153ba613de28b66fcb39a2da5b5e985a6
R
4,834
117
#' Friedman-Rafsky (FR) test #' #' FR test is a multivariate generalization of nonparametric two-sample test. This function is an implementation #' with customized options, including a visualization of the minimum spanning tree (MST). #' #' @param samp1 Numeric matrix or data frame for Sample 1. Rows are multivariate ...
3325d07efdc7ca4bd89a43e6380bdff8f6779cbb4fc58389d73be7035bf130a1
R
4,928
179
# Observer Model (Transition Probabilities) - 2022 library(tidyverse) # Add function to shift down vector n rows and replace with NA shiftdown <- function(x, n){ c(rep(NA, n), head(x, -n)) } # Main function CountEventMarkov <- function(s, omega = Inf){ # Store input sequence in dataframe df <- enframe(s, na...
18755db3158ca9d08fce48fc9c706337c82a5e7cb367d64d258ceda2bbd2f386
R
4,951
99
setwd(dirname(rstudioapi::getSourceEditorContext()$path)) library(ggplot2) library(dplyr) library(tidyr) library(scales) library(tibble) library(ggpubr) library(grid) library(ggrepel) table1 <- read.csv("heterozygosity_summary.txt", header=TRUE, sep="\t") datalist = list() for (i in 1:ncol(table1)) { data<-data.f...
3631c1f826d23f3825b2502d569830be9c6fa468047c1368f976feaa2e42a939
R
4,954
158
# /home/toolkit/tools/R4.2.0/bin/R library(Signac) library(GenomicRanges) library(Seurat) #args <- commandArgs(TRUE) #opath=args[1] source('https://gitee.com/jumphone/BEER/raw/master/BEER.R') .getYesNo<-function(DType,CType){ DType=DType CType=CType i.yes=c() j.yes=c() i.no=c() j.no=c() ...
0f8fe56741a8086492d19af904e4d1772ed1ae13d4798f4a9e174bc436b6898c
R
4,986
152
--- title: "SiT - Mouse Coronal Brain Section (CBS1) - 01.spatial" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landsc...
1935253b2df88ed20f79bbb3567eae3c1d5f10ebe45b4d3474fc58a84cd38e06
R
5,002
153
--- title: "SiT - CBS1 deconvolution" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression isofor...
07dac50b2df0f9b0f32ab96b1dafa1f27531bb23a10d96781a6e5c8384297dd4
R
5,014
87
AAmpD = function(path_to_files,t_cluster, tumor_prefix, normal_prefix, normal_clusters, mapp_file ,blacklist, genome_file ,bin_size,sd, cut_off) { print(paste0("Processing cluster ", t_cluster)) mappability=read.table(mapp_file, stringsAsFactors = FALSE) black_list=read.table(blacklist, stringsAsFactors = F...
539d357b1246fe1b4e09481f27b409859c9729a3b1722d7444b9d7de475199db
R
5,040
162
Get_Number_of_Populations <- function(folder_name){ filename = list.files(path = folder_name,pattern="*_Data.dat"); print(filename) full_filename <- paste(folder_name,"/",filename,sep=""); print(full_filename); data <- read.table(full_filename, header = TRUE, sep = "\t") data <- data[, colSums(is.na(dat...
b8457c04e9f86db31e0d75d37a2ae767d058e8c3ea222a452fb72c4f45e82e4d
R
5,093
119
#' Perform CCA #' #' This function takes either two matrices or two SVDs. Both \code{input_1} #' and \code{input_2} must be "of the same type." Calls the \code{.compute_cca_aggregate_matrix} function. #' #' @param input_1 first input #' @param input_2 second input #' @param dims_1 desired latent dimensions of data mat...
a22ff35c66c6ce91b9e998003f0c654c84f36466db25d8d0e96a556caa696c1b
R
5,098
170
# /home/toolkit/tools/R4.2.0/bin/R library(Signac) library(Seurat) library(GenomeInfoDb) library(ggplot2) library(patchwork) set.seed(1234) library(Signac) library(GenomicRanges) pbmc=readRDS('./scATAC_pbmc.rds') TYPE=pbmc$type #############################################################i getCicero<-functio...
db064598ad768116840b7d2a1850278b32ce371c8af61cdff230d3d9c68977b4
R
5,102
164
Get_Number_of_Populations <- function(folder_name){ filename = list.files(path = folder_name,pattern="*_Data.dat"); print(filename) full_filename <- paste(folder_name,"/",filename,sep=""); print(full_filename); data <- read.table(full_filename, header = TRUE, sep = "\t") data <- data[, colSums(is.na(dat...
cf390dd3da32eaaf89cdd331fe25da26cae0eddb54039f5f31544c82d1ad0e56
R
5,149
118
#' @title #' Stopping Criteria function for Compressive Big Data Analytics #' #' @description #' This CBDA function generates a stopping criteria for the *max_covs - min_covs* nested #' predictive models generated in the previous step. It also populates the CBDA object. #' @param label This is the label appended to ...
38fc34b0022276235a447ae2ba570e8eb83513ca5278abe2358db901333bf569
R
5,165
120
#This script is used to run FR-Match #The goal is to test if the differentiated neurons at E18.5 match those at P5 #Ref: Zhang et al. 2022. Cell type matching in single-cell RNA-sequencing data using FR-Match. Scientific Reports #Tutorials: https://jcventerinstitute.github.io/celligrate/FRmatch-vignette.html #Ins...
8f82f1b8f2234de2f9661124942462c9d77ba94b42cec4db1bdb5949c165ee2a
R
5,171
112
# RPCA (fast integration using reciprocal PCA) library(Seurat) library(ggplot2) library(patchwork) library(plyr) library(SeuratWrappers) library(monocle3) options(future.globals.maxSize=(90*1024^3)) # set max memory size as 60G # megre 10x outputs organoid.list = list() samples = list.files("../processed data/") for ...
19f5c20fa74d4c1d87ad9528568e9274d7890b39b488d3900573962bc3e37162
R
5,182
161
--- title: "SiT - Mouse Olfactory Bulb (MOB) - 01.spatial" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of g...
83ce63641503d42b0dbf5f35dacdfb9222446ff79aee82ee671135cbf6a23dbd
R
5,202
128
context("Test SNN") ## .form_snn_mat is correct test_that(".form_snn_mat works", { load(paste0("../assets/test_data1.RData")) svd_1 <- test_data$svd_1 dimred_1 <- .mult_mat_vec(svd_1$u, svd_1$d) res <- .form_snn_mat(dimred_1, num_neigh = 10, bool_cosine = T, ...
9bd392c28690cb74b858f06f3b4ea8bc009db04b58d1bb786ad2882b7c99a357
R
5,204
169
#' cursub.closer #' @export #' @author Léo Botton-Divet cursub.closer<-function(cur,req) { mat<-as.matrix(dist(cur)) DPO<-NULL for (j in 1:nrow(cur)-1) { a<-mat[j+1,j] DPO<-c(DPO,a) } DCO<-NULL for (j in 1:length(DPO)) { DCO[j]<-sum(DPO[1:j]) } DN<-sum(DPO)/(req+1) DCN<-DN*(1:req) c...
2fdfb6f94a8bb6241474f1e90c36e7fca928a36295a5e09247d73a2580fef9f4
R
5,225
114
# Analysis steps of the PACNet web app, free of Shiny so they can be tested # (tests/testthat) and reused by server.R. PANEL_TISSUES <- c("heart", "hspc", "intestine_colon", "liver", "lung", "neuron", "skeletal_muscle") OTHER_TISSUES <- c("esc", "endothelial_cell", "fibroblast", "kidney", "b_cell", "t_cell", "monocyte...
43be9abe6f45b2aa27f7834ed1c3ecdfbba4d434cd41436dc650f34873b700df
R
5,267
118
#' @title #' Stopping Criteria function for Compressive Big Data Analytics #' #' @description #' This CBDA function generates a stopping criteria for the *max_covs - min_covs* nested #' predictive models generated in the previous step. It also populates the CBDA object. #' @param label This is the label appen...
f525d00ce4b3a909726d71f4fbad898f061944ca7b903c189f37222493ab5dea
R
5,269
120
#' "Barcode" plot #' #' This function plots expression pattern of a cluster by marker genes, a.k.a. barcode plot. #' #' @param sce.E1,sce.E2 Data objects of the \link[SingleCellExperiment]{SingleCellExperiment} data class. If only \code{sce.E1}, #' then the "barcode" is a self plot, i.e. both cluster (\code{cluster.na...
5d12dfb0899972fa8fba31dc85544e806a5733a1da3d70c6d735cae051bbd810
R
5,306
155
--- title: "SiT - Mouse Coronal Brain Section (CBS2) - 01.spatial" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landsc...
42af2e84d25958fbbb6e5a10743841354d83b7462d887dea168755db39054673
R
5,321
144
library(logistf) library(data.table) library(dplyr) irnt <- function(x, k=3/8, randomties=FALSE, seed=NULL){ if (randomties == FALSE){ set.seed(seed) return(qnorm((rank(x,na.last="keep")-k)/(sum(!is.na(x))+1-(2*k)))) }else if (randomties == TRUE) { # Modified from Pain et al. Eur J Hum Genet 2018 s...
1d822b0e9bd481fbed31ab649e7add25bfec90722239257e9c9c8db94b25e49a
R
5,355
154
library(data.table) assemble_connections<-function (cicero_model_list, silent = FALSE){ types <- vapply(cicero_model_list, FUN = class, FUN.VALUE = "character") char_hbn <- cicero_model_list[types == "character"] gl_only <- cicero_model_list[types == "list"] if (!silent) { print(paste("Succes...
19f31570b2b030b1a685bf9fc62c67d8aa903a5075f514f73f3068562ed56dc0
R
5,358
202
suppressMessages(library(tidyverse)) suppressMessages(library(TmCalculator)) suppressMessages(library(optparse)) suppressMessages(library(fs)) #Parse arguments option_list <- list( make_option(c("-d", "--dataset"), type = "character", default = NULL, help="CSV file with dataset, efficiency, grna_energy, and grna_sca...
b990369ceb60494a89925c12badbcae0de09876f223d3eabd258b8b1ca5b0fe7
R
5,418
143
#' Build a PubMed search query programmatically #' #' It helps to build a valid PubMed search query using the Entrez query language, #' combining multiple search terms with Boolean operators. #' #' @param terms is a character or character vector. Search terms to look for in title and abstract fields. #' @param fields i...
2550ebe1329c313d3d01d4eefb674c3d76f99175ef0b015aa77bdfae764479ac
R
5,509
167
--- title: "SiT - Supplementary Figure 10" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression i...
c6770a4e86cf036630034a247da2a98cb9c0e936df4762ecf197772dea049182
R
5,520
139
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) dataset_file = as.array(args[1]) workspace_directory=as.array(args[2]) label=as.array(args[3]) maxRowsValidationSet=as.numeric(args[4]) maxColumnsChunks=as.numeric(args[5]) jobID=as.numeric(args[6]) maxRowsChunks=as.numeric(args[7]) print(dataset_file) prin...
882c972922685e3df51a05eb5a3814062b33de6bafb79f90891d0f0def5ead6d
R
5,641
229
context("discovery_regression") library(magrittr) # Extract names of relevant NMR biomarkers nmr_biomarkers <- dplyr::intersect( colnames(df_demo_metabolic_data), df_NG_biomarker_metadata$machine_readable_name ) test_that( "discovery_regression returns expected output for linear regression", { # Select only...
b537538492df07ac6f5cca868a0cad2e226a066bbbd549a2f3738523c74fb815
R
5,663
155
#' Collect and process PubMed bibliographic data in one step #' #' A convenience wrapper that executes the full pubmedR workflow: #' query building, record count check, metadata download, conversion to #' data frame, and (optionally) citation enrichment via NCBI E-Link. #' #' @param query is a character. A PubMed searc...
9b43ec1cf2beb373267e1fab1b13bd374c6e7313469fc45214fb4fe44af8e73e
R
5,719
161
--- title: "heteroplasmy_plotting_06182021_nkm" author: "Nate Mullin" date: "11/04/2022" output: html_document --- ```{r setup, include=FALSE} library(Signac) library(Seurat) library(ggplot2) library(patchwork) library(tidyverse) library(EnsDb.Hsapiens.v86) library(Matrix) library(SummarizedExperiment) library(ggpubr)...
06ccb186cd7b46af7b4f8c4732d61c223f86fe354a2cfb9c2b2e72b84c7e614c
R
5,720
130
plot_decomposition_2d <- function(vec1, vec2, common_vec, gridsize = 100, col_levels = 21, plot_bg = T, renormalize = T, xlim = range(c(0, 1.1*c(vec1, vec2, common_vec))), ...
2a3aae9aa5614b078ae33b74a11b1de41d26464df9b4fb8b8e813605c5e17ce9
R
5,739
171
######################## Description and Setup ################################# # This script performs statistical analysis of neurite orientation and dispersion # Load Libraries library(sciplot) library(rstatix) library(ggthemes) library(tidyverse) # load preconfigured custom plot theme source('code/analysis/paper...
861638d30a7ecaae9522a1d7336dfbeddd7cca36c2fa28a8290be65abe9157ef
R
5,755
120
# Data preprocessing for quantifying orthogonal predicitons between # response-based models and stimulus-based models library(fs) library(tidyverse) ### === SOURCE FUNCTION === ### source("functions/CountRatio.R") ### === LOAD DATA === ### file_list <- dir_ls("processed_data/LLhood_Easy_vs_Difficult/") |> path_...
81da0be6329891ab3d2502e9498c20c5e9dd87acb59a2d3d53bd689ccf47dcd6
R
5,830
193
GetFiles <- function(test_no){ searchPattern = paste("Test",toString(test_no),"*",sep=""); all_files = list.files(pattern=glob2rx(searchPattern)); #filename = list.files(path = folder_name,pattern=glob2rx(searchPattern)); #full_filename <- paste(folder_name,"/",filename,sep=""); #df <- data.frame("data" = ful...
c1b020770b1defd98e1ff6a7c3d795c176593e6df858853692000c4d6857be17
R
5,890
207
context("Test variable selection") ## .generic_variable_selection is correct test_that(".generic_variable_selection works", { set.seed(10) n <- 100; p <- 50 mat <- MASS::mvrnorm(n = n, mu = rep(0, p), Sigma = diag(p)) vec <- runif(p) colnames(mat) <- paste0("g_", 1:p) rownames(mat) <- paste0("c_", 1:n) ...
a7a2b24335f9509abedbc8bab7c608f8f6ec1c3359b5f92dbe5c11ea75e22cad
R
5,907
129
#!/usr/bin/env Rscript ############################################################# # crispro_stats.R # Provides statistical analyses and visualization of CRISPR # score and peptide annotations ############################################################# library(ggplot2) library(readr) library(dplyr) library...
184b37c5bdb9c31ea98210275785520afbe14dcd4616c1f486c6e7ca1731543f
R
5,929
134
#' @title #' Stopping Criteria function for Compressive Big Data Analytics #' #' @description #' This CBDA function generates a stopping criteria for the *max_covs - min_covs* nested #' predictive models generated in the previous step. It also populates the CBDA object. #' @param label This is the label appended to ...
fe08258600b227a49eac93d442bdb983d9d083afe7fe2934f561beb1e5f72937
R
5,936
102
# Significance Tests for shifts in psychometric curves library(tidyverse) library(coin) # Load the data load("processed_data/Psychometric/auditoryPsychometricData.Rda") # Reallocate df dfa <- auditoryPsychometricData aa_ba_fs <- wilcoxsign_test(dfa$auditory_shift_givenAA_fs ~ dfa$auditory_shift_givenBA_fs, di...
014a0af0a38f23ba91a890769a00413085d750f2074cf459fe535c0bf82ae876
R
5,938
123
server_fn <- local({ source(app_file("server.R"), local = TRUE) server }) upload <- function(f) list(name = basename(f), datapath = example_file(f), size = file.size(example_file(f)), type = "text/csv") test_that("CellNet analysis runs end to end for a panel tissue", { shiny::testServer(server_fn, { session...
3426fb3e3f1c7df283bc368c53256a60bd727c7513d5329090578393ac743e32
R
6,000
132
library(crayon, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAGES/") library(backports, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAGES/") library(withr, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAGES/") library(rstudioapi, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAG...
7655e6add9712f391f9b0e1f693888b9d7ac94ad2b8b85c3e13b98c2099a09fe
R
6,026
122
# PACNet web app UI. Packages and helpers are loaded in global.R. page_head <- tags$head( # Google Analytics tags$script(async = NA, src = "https://www.googletagmanager.com/gtag/js?id=G-836SPJH7DH"), tags$script(HTML( "window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);...
3669b348556f8ce060ea189aaa531a35e3f99ba1a6766ca82f641175b751cfb0
R
6,028
121
#object_path: path to RData object #clust_num_column: final_cluster_labels or equivalent (column of meta.data with cluster numbers) #subset_logical: TRUE or FALSE (should a subset of the object be performed before dge?) #subset_set_ident: "celltype" or equivalent (column name of meta.data for the subset). Unique values...
c7a229165b8906ab0f195587ef03557b7ab3d04d90d5a91fca6d116a07ea1155
R
6,063
134
#' @title #' Stopping Criteria function for Compressive Big Data Analytics #' #' @description #' This CBDA function generates a stopping criteria for the *max_covs - min_covs* nested #' predictive models generated in the previous step. It also populates the CBDA object. #' @param label This is the label appen...
f3275988c0af70954df5dce45948a1702cff33cedd26136635046aeeac65f100
R
6,081
132
# Author: Danyang Li # Date: 21/05/08 # The brainspan data is downloaded from https://www.brainspan.org/static/download.html #import significant genes fh <- read.csv('FH_Global_Cells_Sig_Genes.csv', header=T) pb <- read.csv('Pb_Global_Cells_Sig_Genes.csv', header=T) colnames(fh)[2] <- 'ensembl_gene_id' ## brainspan ...
ee7d05385e8fa7aac2b527568aeeeb788d2ff9907eb3b650de66a75a79fe8006
R
6,097
179
--- title: "Grabowski et al. - SBR2 - Bayou Setup - log Brain Size ~ log Body Size" output: html_notebook editor_options: chunk_output_type: console --- All Primates Analysis ```{r} rm(list=ls()) require(bayou) library(treeplyr) library(dplyr) library(plyr) options(scipen=999) #For execution on a local, multicore C...
8051c51b6f891ee2afc6fd8243e54c8a5acd4b3ad63edf1fe7a390aeebe22f32
R
6,099
129
--- title: "CBDA-SL and Knockoff Filter Results on a AD HOC Binomial Dataset - 9000 jobs" author: "Simeone Marino" date: "December 24, 2016" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Some useful information This is a summary of a set of 30 experiments I ran on Cr...
6ae2ba7465b2356be8f90d6bfa3ecb69ad4c86c33021346a7c81c63b6edd9106
R
6,100
117
#' Compute how aligned the common component for a feature is with that feature in the original data modality #' #' The common matrix for modality \code{input_assay} is extracted, and then #' compared against another matrix (depending on \code{bool_use_denoised} is set). #' (For example, if \code{bool_use_denoised=TRUE}...
fa908f8685aff6dfd6129d02db510a057d5aff4c9f5a459cb776a7e4151eb7df
R
6,128
140
context("Test common SNN") ## .compute_common_snn_hardclustering is correct test_that(".compute_common_snn_hardclustering works", { load(paste0("../assets/test_data3.RData")) mat_1 <- test_data$mat_1; mat_2 <- test_data$mat_2 svd_1 <- test_data$svd_1; svd_2 <- test_data$svd_2 multiSVD_obj <- create_multiSVD(m...
c45e83bc2fa5614cb25d2b1401e6d43dcecbc3ad8ca412b61ee07a904c939696
R
6,135
133
# NOTE: THIS WAS EDITED FROM APV'S RIBO CCA SCRIPT TO CONVERT FROM RMD AND BE RUNABLE BY NKM ON ARGON. # MODIFIED/TESTED ON 01NOV2022 library(crayon, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAGES/") library(backports, lib.loc = "/Shared/IVR/apvoigt/programs/R-4.1.0/bin/PACKAGES/") library(withr, lib.loc...
f8322221ff3c50134ff651a2a3540d4f9cbdba7dd9b1f2ea5a9d3d14901d0c70
R
6,149
194
--- title: "SiT - MOB deconvolution" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression isoform...
0bfaef37eeb7aa4e5303c69a58ed30d7cb04caa1632cc6bded2ef2b2c9514d06
R
6,219
130
#' Compute the negative log-10 p-values across all cell types #' #' This function does the following: There are varible cell types #' stored in \code{de_list$level_vec}. For each cell type, enumerate #' the p-value (across different features, i.e., genes or proteins) #' when comparing that cell type against all other...
516d433b70fa181a3d629960a1c045c2a462ad0389d90ebcf53bf2c4ce5ac54f
R
6,278
119
##' Import PTS files from Checkpoint #' #' @param ptslist a character vector of file names indicating the pts files to be imported #' @param curveinfo the output of the function \code{create_curve_info}. #' @param subsample a logical value specifying whether or not to subsample the semilandmark curves to equal lengths ...
a0d8d48f1e26b392b2fe3579c3b176863a7ba9e48f42bc495fcac2af30eda659
R
6,299
128
#' Information and Grouping for Nightingale's Blood Biomarkers #' #' A data frame with information on the Nightingale Health Ltd. NMR-quantified #' blood biomarkers. #' #' @format A data frame (tibble) with 252 rows and 8 columns: #' \describe{ #' \item{abbreviation}{Biomarker abbreviation, i.e. the one delivered wit...
7d563e4278b57d878abf286a5a4aa24cfcc5b8dafcc5281790270eece60c2e65
R
6,353
166
context("Test .compute_cca_aggregate_matrix") ## .compute_cca_aggregate_matrix is correct test_that("(Basic) .compute_cca_aggregate_matrix works", { set.seed(10) n <- 20; p1 <- 50; p2 <- 40 mat_1 <- scale(MASS::mvrnorm(n = n, mu = rep(0,p1), Sigma = diag(p1)), center = T, scale = F) mat_2 <- scale(MASS::mvrno...
ba9f34d0497b44e39ae162d0478ccbb0c04a7362402761fc56a33bde91fa7939
R
6,371
206
--- title: "SiT - Supplementary Figure 05" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression i...
8f7e02b572a704b3f7c444478b428298c6eeb8c3a4c7d0bd9e3a295b3e951961
R
6,411
203
# /home/toolkit/tools/R4.2.0/bin/R library(Signac) library(GenomicRanges) library(Seurat) #args <- commandArgs(TRUE) #opath=args[1] source('https://gitee.com/jumphone/BEER/raw/master/BEER.R') COL_LIST=list(DType=c('scATAC'='indianred1','scHIC'='royalblue1'), CType=c('Astro'='red','MG'='gold1','Neuron....
71d23a6f3d42397a551de219b4c914085014842b9ae9b842bcc0a64c6db9b02f
R
6,462
155
#' Plotting function for FR-Match results #' #' This function takes in the \code{\link[FRmatch]{FRmatch}} output and generates plots for the matching results. #' #' @param rst.FRmatch The \code{\link[FRmatch]{FRmatch}} output. #' @param type If \code{type="matches"} (default), it plots the one-way matches. #' If \code...
8e85b0afa4ff85620d4c9a37ce1475961ebb54f6b8bf94d088e6d647ff2f5258
R
6,505
337
--- title: "Figure 5" output: html_notebook --- ```{r message=FALSE, warning=FALSE} rm(list = ls()) library(circlize) library(scales) library(dplyr) library("openxlsx") ``` # Read Data ```{r} df.all <- readRDS("../Data/Physio_data.RDS") demographics <- read.csv("../Data//Demographics.csv")...
cd1e7eee3ab785bdde6414a0726349ef265a84f7738084c5bf69ab73a9f528b5
R
6,533
177
# Plot Accuracy for all data sets set.seed(81) # because of geom_jitter library(tidyverse) library(patchwork) library(equatiomatic) library(ggtext) load("processed_data/allValues/allValuesAuditory.Rda") load("processed_data/allValues/allValuesVestibular.Rda") load("processed_data/allValues/allValuesVisual.Rda") # ...
d9dc889ede02eaf68546ea272ea6d95170ca3df03197de6cc659d8052bc021b5
R
6,543
177
# Plot Accuracy for all data sets set.seed(81) # because of geom_jitter library(tidyverse) library(patchwork) library(equatiomatic) library(ggtext) load("processed_data/allValues/allValuesAuditory.Rda") load("processed_data/allValues/allValuesVestibular.Rda") load("processed_data/allValues/allValuesVisual.Rda") # ...
9b5e72c3d9e106b381b42df6e8ee5076dcc008f43fa4333d21e220be15632a09
R
6,598
164
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) print(args) arg_file = as.array(args[1]) print(arg_file) j_global=as.numeric(args[2]) alpha=as.numeric(args[3]) dataset_file = as.array(args[4]) workspace_directory=as.array(args[5]) label=as.array(args[6]) i_exp=as.numeric(args[7]) print(label) print(worksp...
db84fbfd33707b0b969dabc5e60b3308292e41a40256714e2a4efcc0caadf599
R
6,658
154
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) print(args) arg_file = as.array(args[1]) print(arg_file) j_global=as.numeric(args[2]) alpha=as.numeric(args[3]) dataset_file = as.array(args[4]) workspace_directory=as.array(args[5]) label=as.array(args[6]) i_exp=as.numeric(args[7]) print(label) print(worksp...
2c535156364b35268b242c7f7ab22e0c8cc30bda6e5b0b72eeecfc41bcd8fbfa
R
6,732
161
# Analysis of Electroporation datset using single cell gene regulatory network inference and clustering (SCENIC) # Perform seurat analysis and then export the seurat objects for control and treated cells for this analysis # Initial prepaprations # All required objects and data files are provided in this repositor...
b06134779d550e8c2f32b5d46e40604aefafeaff9401a960d05f6851b2e240e2
R
6,880
271
--- title: "Figure S6" output: html_notebook --- # Libraries ```{r message=FALSE, warning=FALSE, echo=FALSE,include=FALSE} rm(list = ls()) library(lmerTest) library(lme4) library(emmeans) library(dplyr) library(ggpubr) library(ggplot2) library(rstatix) library(effsize) library(magrittr) library(knit...
10d8c9686e7d1e1655f01aa84b04c297d04ec375a4baeeae428fc65afebbc2df
R
6,884
220
--- title: "SiT - Supplementary Figure 14" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression i...
e284faeeade18f8234efb23ed9a5901f370458edef299ac6965e53fadc106abc
R
6,928
208
--- title: "Introuduction of Github and Loni PipeLine" output: pdf_document: default html_document: default --- ```{r,echo=F} setwd("~/Desktop/fengyu/picture") ``` ## Learn about Version Control with Git Git is a free and open source distributed version control system designed to handle everything from small to...
cd0139a746f26f663c9b8e5c268280b254c63ea809e455bd67650a5b7349fe94
R
6,964
233
#' Construct cell-type subsamples #' #' Sample at most \code{min_subsample_cell} cells from each #' unique level of \code{membership_vec} #' #' @param membership_vec factor vector #' @param min_subsample_cell positive integer #' #' @return indices #' @export construct_celltype_subsample <- function(membership_vec, min...
3230d4fd6a21c087c10b3e5e65ce247c2084ba55e0a87a1a9f934be2ce07db24
R
6,991
305
library(tidyverse) library(foreign) library(kableExtra) library(pROC) ## ROC library(caret) ## ROC library(rpart) library(rpart.plot) library(gtsummary) library("scales") hex_codes1 <- hue_pal()(6) # Data Preparation ad.raw = read.csv("../data/ad_full_data.csv")%>% mutate(PET = as.factor(PET), ...
36e3a56eaf54a4acc0d8271b9acd77834f8f1ba65d832d1d766bf2ee9f27c657
R
6,996
311
--- title: "DEXSeq_AF22" author: "Marika Oksanen" date: "6/30/2021" output: html_document --- ##DEXSeq ```{r} library(DEXSeq) library(biomaRt) library(VennDiagram) library(tidyverse) ``` ## Preparations Find the countfiles that are calculated using python scripts ```{r} countFiles = list.files("/Users/k6-c02dm8d6ml...
00af34b039a266733ce393225e46479284cb5a6f8a15081228f675b0ac0ec6df
R
6,997
151
#!/usr/bin/env Rscript # Builds the slim reference data in data/ from the original PACNet web-app # objects on S3, and records golden outputs of the ORIGINAL pipeline in # tests/golden/ for the regression tests. # # Usage (from repo root): # git show 748297c:webApp/pacnet_utils.R > /tmp/pacnet_utils_orig.R # Rscrip...
205fe3b8b65f19db4fa311d731250e57a52c63818e2e986af3a642dc0d5ea1af
R
7,018
102
library(data.table) library(dplyr) library(ggplot2) library(ggpubr) library(ggrepel) library(forestplot) pheno <- fread("/mnt/depts/dept04/compbio/human_genetics/users/yhuang5/muscle_targets/regenie/UKBB_maxHGS_WBLM.pheno") cov <- fread("/mnt/depts/dept04/compbio/human_genetics/users/yhuang5/muscle_targets/regenie/UKB...
a18a77733b53596031100c89bb85718cf1c165bac7b7efd2ffb115e8609ab850
R
7,078
222
library(icd.data) library(data.table) get_icd10_chapter <- function(icd_code){ my_letters <- toupper(letters[1:26]) first_letter <- which(my_letters == substr(icd_code,1,1)) first_number <- as.integer(substr(icd_code,2,3)) if(first_letter == 21){ ch_name <- "ICD10: Codes for special purposes" return(ch...
13253e2d1791d446f5887910e3e6e5cf178351771a290c6dc29d56daa3294748
R
7,104
212
library(rstatix) library(car) library(DescTools) # for visualization library(ggplot2) library(ggpubr) dat <- read.table('../Output/Classical_measures.txt', header = TRUE, sep = ",") # total distance traveled dat <- as.data.frame(dat[,c('day','group','mouse','tot_distance')]) dat$group <- as.factor(dat$group) dat$day...
dbccc40891c67cbc66f3a51468d16fbf0a8e448c818c338e390aed583a603d27
R
7,132
191
# Data preprocesing for LLhood (without Stimulus-Only Model) # IMPORTANT: It is absolutely necessary to start a new R Session before # running this script! # .rs.restartR() # Purpose: For plotting! library(fs) library(tidyverse) ### === LOAD DATA === ### file_list <- dir_ls("processed_data/LLhood_Easy_vs_Difficul...
cc39b8da204e843a8f6ef647f54207e5e85533c4749b484aa5ef6df2cfc42c5c
R
7,251
305
--- title: "Figure S12" output: html_notebook --- # Libraries ```{r message=FALSE, warning=FALSE, echo=FALSE,include=FALSE} rm(list = ls()) library(dplyr) library(ggpubr) library(ggplot2) library(rstatix) library(magrittr) library(knitr) library(openxlsx) library(tidyr) ``` # Read Data ```{r} ...
4f73c4542d953b6b1cbcb27c7bd40feba2b86efe964d39521c14b3ab029d02ba
R
7,285
136
--- title: "CBDA-SL and Knockoff Filter Results on a AD HOC Binomial Dataset - 9000 jobs" author: "Simeone Marino" date: "December 24, 2016" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Some useful information This is a summary of a set of 30 experiments I ran on Cr...
cd0c91904571bef59026dd563cc661997c974a446a090b6c441618fc43032754
R
7,380
209
--- title: "SiT - Supplementary Figure 16" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression i...
64298ff3240fea6ae55e98e3c5aae94b8ae2e4f9b9281fb62e8453a878baa004
R
7,496
217
--- title: "SiT - CBS2 deconvolution" author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg' date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' abstract: 'The spatial landscape of gene expression isofor...
204ce8361f1d287615c5fc705128d451e34ca87e44e3ec36cea58b07b97e1d59
R
7,519
86
--- title: Mulivariate analysis of neural development in GSE$^\dagger$ adolescents with ANTs author: "Brian B. Avants et al." date: "March 16, 2015" output: html_document bibliography: ants.bib --- # Specific Aims The overall specific aims have not changed. $\dagger$: Gestational substance exposure # Studies and ...
796fbd355c0f5c115f3bce68f266efdc03ca4bab4a01405bb7417ecdf963fff4
R
7,531
278
context("Test utility") ## .mult_vec_mat is correct test_that(".mult_vec_mat works", { trials <- 100 n <- 10 bool_vec <- sapply(1:trials, function(x){ set.seed(x) vec <- round(100*runif(n)) mat <- matrix(100*runif(n^2), n, n) res1 <- .mult_vec_mat(vec, mat) res2 <- diag(vec) %*% mat ...
d7a132868963c924406be0094971005026e134c8bb61696f8a100cd5413e32ad
R
7,588
151
#requires input files with clade associations, here from full_species_data, and output from BayesTraits analyses, here myrateslist.R, code for generating this from BayesTraits output included below species_data<-read.csv("./Raw_Data/full_species_data.csv") load(file="myrateslist.R") tree_labels<-c("70_75","75_80","8...
7748c92a72fb6c2984243a6336b0b4199708f2bfb35d08073d2bee8157d6ad0c
R
7,617
116
library(data.table) library(dplyr) library(ggplot2) library(ggpubr) library(ggrepel) library(forestplot) pheno <- fread("/mnt/depts/dept04/compbio/human_genetics/users/yhuang5/muscle_targets/regenie/UKBB_maxHGS_WBLM.pheno") cov <- fread("/mnt/depts/dept04/compbio/human_genetics/users/yhuang5/muscle_targets/regenie/UKB...
f9d997cb7662fffb00a52f3b0d6e29bf4097076d17e43e88d343ba8dff5be3b8
R
7,620
185
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) print(args) arg_file = as.array(args[1]) print(arg_file) j_global=as.numeric(args[2]) alpha=as.numeric(args[3]) dataset_file = as.array(args[4]) workspace_directory=as.array(args[5]) label=as.array(args[6]) i_exp=as.numeric(args[7]) print(label) print(worksp...