sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
3c88680fea261a0dee52dc0e2b0badd55fedb678b114c21144956d2d6025178c | R | 12,306 | 341 |
library(rstatix)
library(ggplot2)
library(ggpubr)
library(openxlsx)
library(dplyr)
library(RColorBrewer)
library(wesanderson)
library(lme4)
library(nparLD)
library(lmerTest)
library(jtools)
Sys.setlocale(,'greek')
# Load the data
data = read.xlsx('Dataset.xlsx')
str(data)
data$condition=factor(da... |
f1b014a3058969d136b48a4f9e2635a3a80d42a29a537d1455f2e97d068bca27 | R | 12,314 | 327 | ---
title: "Spatial Trajectories"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# load required packages
require(data.table)
require(future)
require(tidyverse)
require(ggpubr)
library (Seurat)
source("Helper_scripts/figure_themes.R")
```
The following 3 chunks were run on a... |
c5a8f1893cba27eb4c6e61bc0ede9e59ba32aa9f3e948777c295c03ebfb5a5dc | R | 12,318 | 209 |
#' mochims_coupling_scatter
#'
#' Coupling scatterplots.
#'
#' @param input_file path to MoCHI thermo model fit results (required)
#' @param validation_couplings validation coupling ids (required)
#' @param outpath output path for plots and saved objects (required)
#' @param colour_scheme colour scheme file (required)... |
4832433db9f5ab934250918a80ba89bd18e64525e3dbd42ef18fc6a72dbf5751 | R | 12,393 | 232 | ##############################################################################
#
# Time delay projection map for HC contrast
#
# This script is used to examine the HC-contrast time delay estimation and
# the diverge pattern of the HC-contrast maps among the MDD subtypes.
#
# The analysis includes:
# 1. t test for HC ... |
062cdbd2991dc120be12f3d6cd80afd8ddaf95476ab4c8fb41ff226c89366916 | R | 12,427 | 278 | # FNIH Project 2
# make longitudinal dataset
#### Coded: Kellen Petersen
#### Date as of commenting and documentation - 05/28/2024
# load libraries
library(tidyverse)
library(here)
# here::i_am("make_master_dataset_CLEAN.R")
# Parameters
year <- 365.25
cut_years <- 1
cut_centiloids <- 20
cut_centiloids_sens <- 37
cu... |
6ec2b3959057f80d080510569a19bdbfa36313a4160cc39ec047e357f49bb5ea | R | 12,441 | 223 | # promoter neuron
library(GenomicRanges)
library(ggplot2)
library(plyr)
library(scattermore)
library(rtracklayer)
load('/sc/arion/projects/CommonMind/roussp01a/INGELHEIM/rnaseq/test/DAC.Rdata')
cmp=c('Forebrain__BasalGanglia','Forebrain__MidDen','MidDen__BasalGanglia','Limbic__Neocortex','Midbrain__Dien')
broad... |
a14788b3c4a509d71057b34e41b51789177045ddfa7fb8ace4d7638fbab067c0 | R | 12,463 | 263 | makeDynamicChip <- function(chipIn,
chipSize,
cellSize){
chipIn2 <- sf::st_drop_geometry(chipIn)
inFeat <- sf::st_read(paste0(chipIn2[1, "featPth"], chipIn2[1, "featName"]), quiet=TRUE)
inRaster <- terra::rast(paste0(chipIn2[1, "imgPth"], chipIn2[1, "imgNa... |
4a7ec5cf4b5b6fb5cdb7316d430bf5c91d57a9b444439f1bd24b909dc0e60fb6 | R | 12,500 | 282 | #' predictSpatial
#'
#' Apply a trained semantic segmentation model to predict back to geospatial raster data
#'
#' This function generates a pixel-by-pixel prediction using input data and a
#' trained semantic segmentation model. Can return either hard classifications, logits, or
#' rescaled logits with a sigmoid or s... |
e23797c67394194a3b35c7b1f191a78c253bd713362b3d363caf76b2c9ecdbda | R | 12,532 | 322 | # docker run -ti --entrypoint /bin/bash -v /cis/project/ndmg/batch_effects/:/data -v /cis/home/ebridge2/Documents/research/graphstats_repos/causal_batch/:/base neurodata/causal_batch:0.0.1
# docker run -ti --entrypoint /bin/bash -v /mnt/nfs2/batch_effects/:/data -v /home/eric/Documents/research/graphstats-repos/causal_... |
8ef282308731d2ed33ae93e4a7f7b80a41d03718353a3ecbd07665f4c713f65d | R | 12,534 | 356 | library(optparse)
library(glmnet)
library(RSQLite)
cat('-----PrediXcan----- \n')
option_list = list(
#general
make_option("--main_dir", action="store", default=NA, type='character'),
make_option("--plink_file_name", action="store", default=NA, type='character'),
make_option("--expression_file_name", action="s... |
60e2e39379b5e992f1a044464b43c837907def13f898169ef5a321d5399615f8 | R | 12,545 | 264 | ##########################
#
# Subjects information description
#
# This script is used to summary
# the demographic information about
# subjects between MDD and HC
#
# Liang Qunjun 2023/07/19
library(tidyverse)
library(NbClust)
library(ggiraphExtra)
library(ggsci)
library(ggeasy)
library(tidyLPA)
library(psych)
lib... |
8e8d632257b47e5bb68cf11c38b03eca10f23fde964632a791cf17e2a723f9d3 | R | 12,561 | 402 | # Auxiliary functions to format print output
#
# Package: meta
# Author: Guido Schwarzer <guido.schwarzer@uniklinik-freiburg.de>
# License: GPL (>= 2)
#
bylabel <- function(subgroup.name, subgroup.levels, print.subgroup.name,
sep.subgroup, big.mark = "") {
if (print.subgroup.name) {
if (lengt... |
e91ea1aea1a9b8f3eb0acfc23ecc8534252f88736d3fc0371245e93cd5597e1b | R | 12,567 | 410 | ---
title: "Simulated Bimodality (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
gene.metadata.path: "../../data/gene_metadata"
input.samples.rds.path: "../../results/01_Filter_Samples"
input.variability.rds.path: "../../results/03_Variability_Plo... |
d3494993ea3d6bc3b327235e4be84244c78c81ff7ae5118db7974ca059d82ec5 | R | 12,568 | 246 | source('./scripts/01_Setup.R')
all2= readRDS("./data/processed/rds/SignificantCells.rds")
All_cnv_stat2_genome <- readRDS("./data/processed/rds/All_cnv_stat2_genome.rds")
All_cnv_stat2_genome=All_cnv_stat2_genome[All_cnv_stat2_genome$id%in%unique(all2$id),]
merged_read = merge(all2, All_cnv_stat2_genome, by = c("id", ... |
7ccb7eb458bdac6372b5e7a09355a6399914109555ace3506fa72a096fb1246f | R | 12,627 | 361 | # validation the ABC links using biccn data
library(GenomicRanges)
library(ComplexHeatmap)
library(circlize)
library(dplyr)
library(RColorBrewer)
library(stringr)
library(reshape2)
setwd('/hpc/users/songl05/PF_25BR/')
# validate the ABC links using biccn brain data
options(stringsAsFactors = F)
load('/sc/arion/proj... |
de95ca13f47be01e0dc111cab9aa375c2d1e1c6dc5a6e186c8af4576bb690f5a | R | 12,633 | 614 | ---
title: "SEFL10K6c_Analysis"
author: "Zach"
output:
html_document:
fig_height: 4.5
fig_width: 4.5
highlight: kate
number_sections: yes
theme: journal
toc: yes
toc_depth: 6
editor_options:
chunk_output_type: console
---
# Set Global Options
```{r global_options}
knitr::opts_chunk$s... |
c2657fc3ee4bcf1b812d22ac53d6c1e1b47716c26214420a6849bb059976ea8e | R | 12,661 | 268 | #' Causal Conditional Distance Correlation
#'
#' A function for implementing the causal conditional distance correlation (causal cDCorr) algorithm.
#' This algorithm allows users to identify whether a treatment causes changes in an outcome, given assorted
#' covariates/confounding variables. It is imperative that this... |
0236f47af2cb4179f486b045cd163ef4c1d4f9cfd451c88ffba8356b8a783648 | R | 12,721 | 319 | # File: AP_simulation.R
# Author: Kelly Chang
# Date: Oct 2017
# Version: 1.0
#
# Description: R script to run action potential (AP) simulations with the
# IKr-dynamic ORd model. Drug effects are simulated using
# previously fitted hERG binding kinetic parameters... |
780e8414f9cf14c557b569f9c6f136d0300e9e9b1009fd26a97a47a73b347823 | R | 12,730 | 313 |
#UTMOST *modified
args=as.numeric(commandArgs(TRUE)) #subjobs
options(stringsAsFactors=F)
library(glmnet)
library(foreach)
#load glasso function
source('/home/z***/script/v8/utmost/glasso.r')
#get full gene list
gene_list_geno<-dir('/data/c***/z***/data/gtex/geno/v8/gene/p_1m/')
gene_list_exp<-sub('.... |
0d8edb1a638670ad964d3e4af0f20572f2f017f67ce0b31f2692c54acc315d85 | R | 12,839 | 365 | # Filename: iidp_caide.R
# Date: 08-11-2023
# calculation of caide & mcaide after munging data
library("tidyverse")
library("gtsummary")
library("missForest")
library("dplyr")
library("glue")
library("magrittr")
library("MASS")
library("readxl")
data <- read_excel("CAIDE_Risk_Score_and_APOE_project_with_Shea.xlsx",
... |
dc474881072989a8a8efaebddc1969981908752b422eaade2b9bbd0e086655ce | R | 12,841 | 177 | ---
output: word_document
bibliography: doc/references.bib
csl: doc/springer_basic.csl
link-citations: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
```
```{r}
library(data.table)
library(flextable)
library(magrittr)
library(table1)
library(CMplot)
source("... |
c71bd60e4ca3387afa3b3a94f11e097c7733b171aa5dccb68c212440829764f5 | R | 12,868 | 199 | #----Figure_S01-----------------------------------------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure S01 for the connectivity analysis for
# Reinhard and Fukuda et al. 2024
# 'morphology_cluster.csv' was last updated 05.2023... |
66a2a3e2ded1d322393db44252ee8d2c2b55d9df86f9c1a6587f07cf9baf2fbd | R | 12,957 | 372 | ---
title: "Figure 3 and related supplement tables"
author: "Meng-Ching Ko (MaggieMCKO)"
date: "07/17/2024"
output:
html_document:
df_print: paged
pdf_document: default
editor_options:
chunk_output_type: console
---
This [R Markdown](http://rmarkdown.rstudio.com) Notebook contain codes for reproducing Fig.3... |
512112168a2289688d7a5045fe2c43b5522df1457ed680885aa998404ec6683b | R | 12,959 | 259 | #Doublet Finder pipeline
library(Seurat)
library(Matrix)
library(fields)
library(KernSmooth)
library(ROCR)
library(parallel)
library(DoubletFinder)
library(SingleCellExperiment)
library(Seurat)
library(tidyverse)
library(Matrix)
library(scales)
library(cowplot)
library(RCurl)
library(DeconRNASeq)
l... |
c3f2398a9d88eb7be69bcb0e9dcc99672a9a10b93f46744747dcc4d4bed671e1 | R | 13,075 | 336 | ---
title: "SupplFigure_kmeans_70Clusters"
author: "Fabienne Rössler"
date: '2023-05-10'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("DLCAnalyzer.R")
source("BFA_BFF.R")
library(sp) #tested with v1.3-2... |
9a6f64e35a1002d058e3d2448fd96d62598c31b0da9e094146d166e387882f0c | R | 13,088 | 311 | ---
title: "SensitivityCurves_CSI"
author: "Fabienne Rössler"
date: '2023-02-24'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("DLCAnalyzer_Functions_v4.R")
source("UnsupervisedAnalysis_Functions.R")
library(sp)... |
cd3f7aa9edae87cf146fa8d391125aaa415af6395b9278d996ad2746bb10f090 | R | 13,143 | 322 | ---
title: "TEBC pre-discharge faecal samples: species-level (shotgun data) associations with brain imaging markers (Maaslin)"
author:
- "Kadi Vaher"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(RColorBrewer)
library(knitr)
library(g... |
0a582a59e424cb4b63c906a533899ddb310f7b66548faf175944a995f49677cb | R | 13,149 | 389 | ---
title: "C4A LocusZoom"
author: "Jack Humphrey"
date: "31/05/2023"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(ggrepel)
library(patchwork)
library(ggrastr)
```
## R Markdown
from fanny
```{r}
gwas <- read_tsv(here::here("data/farrell_psp_f... |
7bd529d9434b99eed831ee0dd494dc8121104909356848b6ed776360047d70cd | R | 13,196 | 228 | source('./scripts/01_Setup.R')
key_df <- data.frame(Variable = c('id',
"amplification method",
"bin size",
"MAD",
"hg38_500kb_MAD",
"confidence score... |
62cd22c6a09e659ab7e60fa5626da78077118f8caea4471010fe6bb690a46a60 | R | 13,241 | 399 | ---
title: "TEBC faecal samples: shotgun functional data (gut-metabolic modules) statistical analysis"
author:
- "Kadi Vaher"
- "PERMANOVA analyses for the perinatal covariates"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(phyloseq... |
6905d75bcea6417bdb602bdc72efecb8d0da42d34e48a3f6192ea0bbb1a786df | R | 13,305 | 403 | ---
title: "Optic Nerve Combined: Microglia"
author: "Katie Emberley, Jonathan Nelson, and Jeremiah Reyes"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
code_folding: hide
... |
84ed76479e755fc23e31a091fcc7f28cb9f17903243c6980a8fe8c82781dd720 | R | 13,374 | 252 | ---
title: "Supplementary Figure 3"
author: "Katie Emberley, Greg Duncan and Jonathan Nelson"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
code_folding: hide
highlight: py... |
7f58b9659b07b8ae3822c3c3e1593191f362414c8e99caf9f46a2d547081c549 | R | 13,379 | 316 | #' Initialize autofocus data struct from data matrices
#'
#' Takes as input a data matrix, annotations on the samples and annotations on the molecules
#' and creates a list structure, R with the hierarchical clustering structure and cluster informations.
#'
#' @param data.matrix Matrix with samples as rows and biomolec... |
b0c6477a8bc58c9fb570c4f3281bf199dfe4a00fc06742e2a438163443ac6524 | R | 13,420 | 216 | ---
title: "Tutorial III: From the residuals to the generation of a co-expression network"
author: "Juan A. Botía, juanbot@um.es, @juanBotiaBlaya"
date: "26/02/2018"
output:
pdf_document:
toc: yes
fig_caption: yes
html_document:
toc: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRU... |
2f9747310cd20175da220ab270c7c2cd0dd7fac2a5399b4b0dc894b6c975ee2e | R | 13,440 | 521 | ---
title: "20240408_synbot_puncta_processor"
author: "Justin Savage"
date: "`r Sys.Date()`"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r load libraries}
#author Justin Savage
#js664@duke.edu
#Version 1.0
#8/16/21
#This script is for combining the data from the ... |
379184b152f945bc55dbb952800a3292f36743f1b3364fdab207eb51639779b2 | R | 13,446 | 337 | ---
title: "TEBC pre-discharge faecal samples: associations between gut-brain modules and brain imaging markers (Maaslin)"
author:
- "Kadi Vaher"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(RColorBrewer)
library(knitr)
library(ggpub... |
dbb265d06946dd43db255d957a3d01ec249fd259d4a5740ffacc6480dfa2fdd8 | R | 13,450 | 344 | # Aims of script
# 1. Identify outliers - regions above predefined threshold
# 2. Plot FST (& PBS) - average values across rivers
# load libraries
library(optparse)
library(ggplot2)
library(dplyr)
library(tidyverse)
option_list <- list(make_option(c('-c','--CT'), action='store', type='character', default=NULL, hel... |
7d8f0ea95e51deda67c7e4342e8196a4f1c8770b5c5aab91a67e6cf9e6084d78 | R | 13,463 | 255 | ## FUNCTION FOR MIXED-EFFECT VERTEX-WISE TFCE ANALYSIS
## FOR USE IN THE COGNITIVE AND BRAIN HEALTH LABORATORY
############################################################################################################################
###################################################################################... |
a2649e21dd2eac33bad1e0dff05c24b87f95046d6421b6bf141a0bc2330b6116 | R | 13,498 | 258 | #' @title SCMvextract
#'
#' @description Extracts surface-based measures from the python toolbox "SubCortexMesh" in each subject. These can be based on FreeSurfer ASeg or FSL FIRST subcortical segmentations. SCMvextract() reads through the metrics .vtk files outputted by SubCortexMesh (surface_metrics/ directory), extr... |
48a7232aa3bf89b9d65cf8c4887d166a8dcd9344b1a1f12cbabb7ed3c17679c7 | R | 13,501 | 290 | ---
title: "Tutorial I: Introduction to co-expression networks with CoExp"
author: "Juan A. Botía, juanbot@um.es, @juanBotiaBlaya"
output:
pdf_document:
toc: yes
fig_caption: yes
html_document:
toc: yes
---
# Introduction
This document is an introduction to co-expression networks. We will learn how to... |
7b4037f44fe163ba31e7aa00449fa1ff0c34f03df5bf387c9caf053f593c2bb1 | R | 13,543 | 229 | ---
title: "DEGage Tutorial"
output:
rmarkdown::html_vignette:
number_sections: true
toc: true
toc_depth: 2
vignette: >
%\VignetteIndexEntry{my-vignette}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
... |
7a8caf46432a8f218ae2bec4b4d8dddb982d77e1bbe440e269f0d42f6acc53e7 | R | 13,571 | 392 | # validation the ABC links
# 5' vs non 5'
# enhancer peak length: 1000
library(GenomicRanges)
library(ComplexHeatmap)
library(circlize)
library(dplyr)
library(RColorBrewer)
library(stringr)
library(reshape2)
setwd('/hpc/users/songl05/PF_25BR/')
# validate the ABC links using biccn brain data
options(stringsAsFacto... |
295b060024b2c9784a130aaeae35d0d0485eafefa228c8e8809ece85dfd1ee79 | R | 13,591 | 221 | #this script makes figures for the microbiota-brain associations from 16S-based data
####################################
#libraries
library(tidyverse)
library(ggpubr)
library(cowplot)
library(here)
library(patchwork)
library(readr)
library(ggtext)
source(here("src", "utils_kadi.R"))
################################... |
06b634c07fb1a5748222dbd7eb50cf77eee5e7eb60d791d1abc3a6e50f2c3b88 | R | 13,602 | 307 | ## GBM States (Neftel et al.,)
library(dplyr)
library(tidyr)
library(stringr)
library(pheatmap)
library(ggplot2)
library(pals)
library(reshape2)
####### OVERLAP
THRESHOLDS <- data.frame(V1 = c(0.95, 0.8, 0.5, 0.2, 0.05, 0, 0.05, 0.1, 0.025), V2 = c(1.0, 0.95, 0.8, 0.5, 0.2, 0.05, 1, 1, 1))
MD <- read.csv("Spots_meta... |
7a9fa5ef9e1982dd58104a35ff1c812a01d63c4748410543e142b4dd8ac45780 | R | 13,646 | 249 | source('./scripts/01_Setup.R')
all2= readRDS("./data/processed/rds/SignificantCells.rds")
All_cnv_stat2_genome <- readRDS("./data/processed/rds/All_cnv_stat2_genome.rds")
All_cnv_stat2_genome=All_cnv_stat2_genome[All_cnv_stat2_genome$id%in%unique(all2$id),]
merged_read = merge(all2, All_cnv_stat2_genome, by = c("id", ... |
5a1d074d69f24baeade07d38d83e1d1d8c39c5f987d91958b9ad1bcbcd2643ec | R | 13,706 | 105 |
setwd("...")
library(Seurat)
library(dplyr)
library(ggplot2)
library(viridis)
library(data.table)
library(stringr)
# Load the dataset
data <-read.table("GSE75330_Marques_et_al_mol_counts2.txt",
sep="", header = TRUE, row.names = 1, quote="")
dim(data) #23556 5069
# Initialize... |
df75912b5571925b6c1a9f6377d88d79d7ff8967555992f8aa6dd75c3d5f0e14 | R | 13,709 | 407 | # Single cell RNA-Seq of Tlx3 WT vs KO samples
# Budhaditya Basu
library(Seurat)
library(tidyverse)
library(scCustomize)
library(SCP)
library(ggrepel)
library(ggthemes)
# =========================================================
tlx3.combined <- readRDS("sc_PN5_tlx3.combined_annotated.rds")
head(tlx3.combined... |
7b4d9a1b0f92b3ab3c7ae81fdd487a29f065bda659580e48dc672e370d99a49f | R | 13,744 | 267 | ### scripts for correlating teratoma time series data with Human Fetal Atlas data
library(Seurat)
library(dplyr)
### transcriptomic similarity
# fetal data from Shendure et. al
HF_Cbrum <- readRDS('/media/Scratch_SSD_Voyager/sammi/Teratoma_TS/ref/Fetal_Atlas/Cerebrum_gene_count.RDS')
dim(HF_Cbrum)
# switch gene n... |
b3bb751da209edc3e2544bc318c2cb67ae331f242ffa7c85940315eb587aaf53 | R | 13,785 | 404 | #!/usr/bin/Rscript
# Clear workspace
rm(list = ls())
# Load libraries
if(!require(NBR)) install.packages("NBR"); library(NBR)
source("https://raw.githubusercontent.com/zchuri/BilingualBrainNet/main/Code/AuxFunctions/valid_url.R")
# Read phenotypic data
info <- read.csv("https://raw.githubusercontent.com/zchuri/Bilin... |
bffdd0c14b6274a2fc6d2c1713ca56dac1a394c011003122959e7e6f2ef76ac9 | R | 13,797 | 449 | mean_sd_iqr <- function(n, median, q1, q3, method.mean = "Luo") {
#
# Check arguments
#
if (missing(n))
stop("Mandatory argument 'n' missing.", call. = FALSE)
if (missing(median))
stop("Mandatory argument 'median' missing.", call. = FALSE)
if (missing(q1))
stop("Mandatory argument 'q1' missin... |
4890c6cd0f145938842e1e5df27fd404a178697105023a3418a7b2dd909c7e8b | R | 13,854 | 396 | ##################################################################################################################################
######
###### Program: PhenotypePreparationDBP.R
###### Written by: Geng Wang
###### R packages loaded: dyplr
###### Datafiles : ukb6221.csv
###### Objective : ... |
c1db1254145305d2ed6727faa3178d34b52bc6808726c9c15fa08d66dbae8744 | R | 13,857 | 395 | ##################################################################################################################################
######
###### Program: PhenotypePreparationSBP.R
###### Written by: Geng Wang
###### R packages loaded: dyplr
###### Datafiles : ukb6221.csv
###### Objective : ... |
88eceb0a5a0d15c137729bedec63c0372cba4ca3ece267fd0faa36b415bfefff | R | 13,936 | 503 | ---
title: "Phenotypic Analysis"
author: "Giulio Centorame"
format: html
editor: visual
---
This notebook contains the phenotypic association analysis between breastfeeding and our outcomes of interest
```{r setup, include = FALSE}
library(dplyr)
library(purrr)
library(tidyr)
library(gtsummary)
library(modelsummary)... |
33f1d927b45f5c3a671e5f2fc71d2818f8c4ff672f2e8a077c6622817838d1aa | R | 13,941 | 475 | library("tidyverse")
library("missForest")
library("glue")
library("dplyr")
library("broom")
library("ggplot2")
library("gtsummary")
library("rmarkdown")
library("lubridate")
library("vcfR")
setwd("~/gitcode/CAIDE_APOE")
## Import datasets
### Key variables
merge.raw <- read_csv("resources/ADNI/ADNIMERGE_25Sep2023.c... |
ae787745e2b8dbb7ae9c53c1fa1c4166ed84d220f732e7edce9b2435dfa08b9e | R | 13,964 | 444 | ---
title: "Variability Plots (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
gene.metadata.path: "../../data/gene_metadata"
input.samples.rds.path: "../../results/01_Filter_Samples"
input.variability.rds.path: "../../results/02_Variability_Jackkn... |
ce3798d40bd57ebd6e69b424dd651bda553a7dcc525066eb318cd0d3b6b276b8 | R | 14,089 | 391 | #### Notes ####
#### Libraries ####
library(ggplot2)
library(gplots)
library(viridis)
library(colorBlindness)
#### Sourced functions ####
source("../functions/external/heatmap.3.R")
source("../functions/unit_tests.R")
#source("../functions/annotate_boxplots.R")
#### Plotting functions ####
plot_detected_genes_vs_map... |
fc5a850b4a2a626609c183e7b3916b9f8aac1d8112786295ee49aa5cba78e7cc | R | 14,159 | 242 | ---
title: "Figure 3"
author: "Greg Duncan, Katie Emberley, Jonathan Nelson, and Jeremiah Reyes"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
code_folding: hide
highlight:... |
41e07bb660c85e048cd9efbc507a8dd41d2fe491f046d34c80fa3b2342164cd7 | R | 14,171 | 261 | #----Figure_03_B and analysis as basis for A,C,D--------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure 03 Panel B for the connectivity analysis for
# Reinhard and Fukuda et al. 2024
#-------------------------------------------... |
670594d5eec754158d6c2aabc99dabb4386c492990f9d7dc692934e8151ff540 | R | 14,171 | 355 | library("GenomicRanges")
library(BiocManager)
library(ComplexHeatmap)
library(circlize)
library(dplyr)
library(RColorBrewer)
setwd('/hpc/users/songl05/PF_25BR/codes')
# Abc result
load('/sc/arion/projects/CommonMind/roussp01a/INGELHEIM/atacseq/step3_neuron_width500/files/abc_piso/fine/ABC_summary.Rdata')
Br_color <... |
ca3b65dca0ab002abe3f00f7ed5b1b5686b2a4ac5847bfdf2e0fa10e44897d9f | R | 14,207 | 324 | #' makeChips
#'
#' Generate image chips from images and associated raster masks
#'
#' This function generates image and mask chips from an input image and
#' associated raster mask. The chips are written into the defined directory.
#' The number of rows and columns of pixels in each chip are equal to the
#' size argume... |
964a97726f18ce48c5a2085577c009ae633efec7a09d7fe123fd565b2b31c9cf | R | 14,216 | 223 | ---
title: "Applying CCN to an existing taxonomy"
output: html_notebook
---
# Overview and preparations
This script will allow easy application of the Common Cell type Nomenclature (CCN) to an existing hierarchically-structured taxonomy of cell types. , An early verion of the CCN is available at the [Allen Brain... |
39a2d6a3b009fc6ae2b7682eae4668bc42e7f26a18e2230f4208494874d564ed | R | 14,279 | 219 | ---
title: "Applying CCN to an existing taxonomy"
output: html_notebook
---
# Overview and preparations
This script will allow easy application of the Common Cell type Nomenclature (CCN) to an existing hierarchically-structured taxonomy of cell types. , An early verion of the CCN is available at the [Alle... |
646b6548e967dd69c2fecf33182a6fdb8f7c4acab8a4655fd98804a2847e049e | R | 14,289 | 290 | #' defineSegDataSet
#'
#' Instantiate a subclass of torch::dataset() for geospatial semantic segmentation
#'
#' This function instantiates a subclass of torch::dataset() that loads
#' data generated using the makeChips() or makeChipsMultiClass() function. Can also
#' define random augmentations to combat overfitting. N... |
e70438776783678426df997a69f323971f51143e1e19af7a85cb5938783ce6c4 | R | 14,354 | 300 | ---
title: "20240116_invivo_a2d1_plots"
output: html_document
date: "2024-01-16"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r load libraries}
library(tidyverse)
library(ggplot2)
library(agricolae)
library(ggsignif)
library(multcomp)
library(nlme)
```
```{r load data}
manual_synbot... |
a0edc087408912bb2b7ed3285514f36c57fd6cd6fa72b33549e30cd49e354d79 | R | 14,359 | 300 | ---
title: "20240116_invivo_a2d1_plots"
output: html_document
date: "2024-01-16"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r load libraries}
library(tidyverse)
library(ggplot2)
library(agricolae)
library(ggsignif)
library(multcomp)
library(nlme)
```
```{r load data}
manual_synbot... |
ac77fc0f3c65d656124c8e3486c78a937648478c2dfa6eef2fcec1c603e535e5 | R | 14,384 | 220 | ---
title: "Applying CCN to an existing taxonomy"
output: html_notebook
---
# Overview and preparations
This script will allow easy application of the Common Cell type Nomenclature (CCN) to an existing hierarchically-structured taxonomy of cell types. , An early verion of the CCN is available at the [Alle... |
17cc343a76c2bafc22bf8b5962649096d31b0f1ad81902d1da5db6e1b96f7d1a | R | 14,417 | 247 | library(BayesSpace)
library(ggplot2)
library(SingleCellExperiment)
Juvenile15yr_DH1_1 <- readVisium("/scratch/mshruv003/visium_08_10_21/Hockman_Visium/X201SC21082979-Z01-F001_01/raw_data/run_spaceranger_count_DH1a/outs")
set.seed(102)
Juvenile15yr_DH1_1 <- spatialPreprocess(Juvenile15yr_DH1_1, platform="Visium",
... |
74de367811e2e01f7cdd1d7066d8cb889ed72f19700dbb484808464b4228bf25 | R | 14,420 | 377 | ---
title: "Figure4_TransferClustering"
author: "Fabienne Rössler"
date: '2023-03-24'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("../DLCAnalyzer_Functions_v4.R")
source("../UnsupervisedAnalysis_Functions.R")
... |
b0d05943998dd39b0b712e0aea6097e00a9ecd49493001082253b018dbacb726 | R | 14,557 | 458 |
# Readme ----
#
# Thu May 25, 2021
#
# Currently supported species:
# Name Abbreviation DbID TaxID
# 1: Bos taurus BTA 48898 9913
# 2: Caenorhabditis elegans CEL 68320 6239
# 3: Canis familiaris CFA 49646 9615
# 4: Danio rerio... |
6a74f0cedfa06731bed3d818cf02fec4fdbea578d53c3864c374adbb59d8e826 | R | 14,565 | 355 | cal_prop_pearson <- function(prediction, truth, level = "all"){
prediction <- as.matrix(prediction)
truth <- as.matrix(truth)
prediction <- prediction[rownames(truth), colnames(truth)]
if (level == "spot"){
prediction <- prediction / rowSums(prediction)
truth <- truth / rowSums(truth)
... |
36d6a2c387634da92a4822ca2352e00c9fd3687f6f929977022885f5692225d3 | R | 14,590 | 230 | ---
title: "Extracting surface data in VertexWiseR"
author: "Charly Billaud, Junhong Yu"
date: "2026-03-23"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Extracting surface data in VertexWiseR}
%\VignetteEngine{rmarkdown::render}
%\VignetteEncoding{UTF-8}
bibliography: references.bib
---
```{... |
0c53a157f421b4bdfea0a53e211c38d5ebbe93caaf5811a941cbe1b1d75e97e7 | R | 14,594 | 355 | #Quality control including (1) cell-level filtering, (2) gene-level filtering, (3) Doublet removal based on
#doublets identified by the three different doublet removal pipelines (scripts 3-5)
# Load libraries
library(SingleCellExperiment)
library(Seurat)
library(tidyverse)
library(Matrix)
library(scales)
lib... |
b58811fed643b4e076a03c341e2483d26eb5b44fcd1910d2f254bfa963354630 | R | 14,730 | 379 | ---
title: "Figure6_TFS_Analysis"
author: "Fabienne Rössler"
date: '2023-04-18'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("../DLCAnalyzer_Functions_v4.R")
source("../UnsupervisedAnalysis_Functions.R")
librar... |
e1972f827820f1662166daa296d2540ee127781733cbf403f59aaf537578bcdd | R | 14,752 | 373 | # FNIH Project 2
# make models for ROC plots
#### Coded: Kellen Petersen
#### Date as of commenting and documentation - 05/28/2024
make_model <- function(data.in0,covars_TF,vars_outcome){
data.in <- data.in0
#Covariates
age_var <- "AGE" #variable with age
sex_var <- "PTGENDER" #variable with sex
educ_var ... |
3d563591ebe437384fc3a91b6c9e2a7ca8ca4875eff147da2c1f9c997e14d8f0 | R | 14,785 | 388 | #### Notes ####
#### Libraries ####
library(dplyr)
library(tidyr)
library(ggpubr)
#### Sourced functions ####
#### Functions ####
# Classify genes by organ bias based on tau cutoff
classify_genes_by_organ_bias <- function(df, tau.cutoff=0.30) {
df.with.bias <- df
# Broadly expressed, focal-biased, t-biased, ... |
c0ea412bafdd00d5ea2a253e9f05955ebbfefbb6313322768e04ceafd9d36ad0 | R | 14,926 | 429 | ---
title: "figure3_and_s3_plots"
author: "Amy Tresenrider"
date: "2024-03-22"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
suppressPackageStartupMessages({
library(tidyverse)
library(ggplot2)
library(tidyr)
library(viridis)
library(ggridges)
library(purrr)
... |
73adbdd05d6c3681580ae5d7259d5bd722f592b82ad03ef6d249eb6a46fd8b9f | R | 14,927 | 418 | gaussPyramids <- torch::nn_module(
classname = "gaussPyramids",
# Define the constructor
initialize = function(inChn, spatDims) {
self$inChn <- inChn
self$spatDims <- spatDims
# Define the custom kernel as a non-trainable tensor
gauss <- torch::torch_tensor(c(1, 4, 6, 4, 1,
... |
17febfa9044d70d41b48bf18ecfb235a963628e488867d46bc01cf9a1692ebb2 | R | 15,000 | 440 | ---
title: "Optic Nerve Combined: Microglia DEG Pathway Analysis"
author: "Katie Emberley, Jonathan Nelson, and Jeremiah Reyes"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
co... |
1997928af88f890af5567a3ac639103535cfc86e342be682c2ebe4dbdbe6c117 | R | 15,157 | 465 | hetcalc <- function(TE, seTE,
method.tau, method.tau.ci, TE.tau,
method.I2, level,
subgroup, control,
cluster = NULL, rho = 0) {
Ccalc <- function(x) {
res <- (sum(x, na.rm = TRUE) -
sum(x^2, na.rm = TRUE) /
... |
58b805c690474b744aa44c9347fe0544b966e6dd70627cf790fde5ff61df9b64 | R | 15,210 | 437 | ######################################################################
# Program to produce the tables for the ADNI-NACC dataset
######################################################################
setwd("/Users/elinorvelasquez/Desktop/adni_nacc/")
library("tidyverse")
library("missForest")
library("glue")
library("... |
6dc575c1cbe1082f12f368362bac944ef805b964a68bd0382077fe101a61788e | R | 15,257 | 425 | library(reshape2)
plot.nnet <- function(mod.in,nid=T,all.out=T,all.in=T,bias=T,wts.only=F,rel.rsc=5,circle.cex=5,
node.labs=T,var.labs=T,x.lab=NULL,y.lab=NULL,line.stag=NULL,struct=NULL,cex.val=1,
alpha.val=1,circle.col='lightblue',pos.col='black',neg.col='grey', max.sp = F, ...)... |
a332b5ec557b58c1fe3bc4d75b3519950064d277e7f08a789a0ddde6c7001631 | R | 15,320 | 477 | ---
# For vignette ---------------------------------------------------------------
title: Calibration of Quinine Fluorescence Emission
subtitle: "Example Workflow for Fluorescence Emission Dataset `flu`"
description: "flu: Example workflow for fluorescence emission dataset `flu`."
# Authors -------------------... |
9020449ecccd693dbaa3e1047c37bf92d12345d0516024635b66b8b2ab116c0d | R | 15,364 | 292 | setwd("/home/wangmg/Documents/deconvolution/Data_and_code_for_reproduction")
source("Code/utils/generate.R")
source("Code/utils/metrics.R")
library(ggplot2)
library(reshape2)
#################### Construct datasets
### The original data can be downloaded from https://singlecell.broadinstitute.org/single_cell/study/... |
99360a59a87dc17d2755587a864175683718c5414d35a755e35b8d5e5f543a62 | R | 15,375 | 433 | ---
title: "Optic Nerve Combined: Microglia DEG analysis"
author: "Katie Emberley, Jonathan Nelson, and Jeremiah Reyes"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
code_foldi... |
b392254cd88fa2f8f1df279798addda6330807ff28e38933356d1023ecff70b7 | R | 15,397 | 319 | # --------------------------------------------------------------------------------- #
# #
# Hippocampal volumes in UK Biobank are associated with APOE only in older adults #
# ... |
7f3c02f6300e02bff75569b38bb923162ec2c7383d3a70cab51a0ab347c74676 | R | 15,435 | 326 | #' @title Get cell type name which can not find by ROC method
#' @description Get cell type name which can not find by ROC method.
#' @param anno Data anno.
#' @param new_sample_data Pse data.
#' @param new_meta Pse meta.
#' @return A dataframe contains annotation of cell type name
#' @export
GetCellTYpeNameExt... |
5496d5bbc313bb6e35a194bdabd73aaf479a8988d3fac58f6be20e7b47335e5d | R | 15,454 | 313 | ###########################################
##-------- Read meta information --------##
##-------- Cluster library batch --------##
###########################################
## load meta information
meta<-read.table("meta.txt",sep="\t",head=T)
meta$LibraryBatch<-as.character(meta$LibraryBatch)
## LibraryBatch clust... |
57045da3b8cdf1c0d247e83474371efeed99fe390b64281f4d9f103a9f55d8ac | R | 15,459 | 437 | calculatePathWeights <- function(paths,inpN,outN,adj_all){
nTransmitter = 6
nPaths = length(paths)
NTW = matrix(0,nPaths,1)
colnames(NTW) = c("all")
k = 1
for (currPath in paths){
pathLength = length(currPath)-1
edgeW_all = matrix(0,1,pathLength)
for (layer in 1:pathLength){
edgeW_all[la... |
9b90ac9a98a2152610e54b50a03114fb11cdb061ca5e31f184decf5645bd2fdc | R | 15,520 | 267 | #' Matching Conditional ComBat
#'
#' A function for implementing the matching conditional ComBat (matching cComBat) algorithm.
#' This algorithm allows users to remove batch effects (in each dimension), while adjusting for known confounding
#' variables. It is imperative that this function is used in conjunction with ... |
5fc1ead015a664c480a205955806cf77573015cb21437fcebd9d4fa2fbddc2af | R | 15,533 | 323 | library(SingleCellExperiment)
library(Seurat)
library(tidyverse)
library(Matrix)
library(scales)
library(cowplot)
library(RCurl)
library(DeconRNASeq)
library(gplots)
library(dplyr)
library(MCL)
library(clusterProfiler)
library(mygene)
library(tidyr)
library(R.utils)
library(foreach)
library(doParallel)
... |
712b1bc6424759ab62ceaa5165c31f60ce7900a90634b9791c1bade33f7a19e2 | R | 15,553 | 382 | #' Process and save data
#'
#' This function processes the input data from an RDS file, selects specific clusters, and saves the processed data as a CSV file.
#'
#' @param input_rds_file Path to the input RDS file containing the original data.
#' @param output_csv_file Path to save the processed data as a CSV file.
#' ... |
7b225e938faf2084ac27ad77d5d28c7e9d17b81525db6f125836ae4b6d182d2c | R | 15,579 | 279 | # ODDS RATIOS OF GENE ONTOLOGIES IN TRAJECTORIES ############################
############################################################################
# Load table of enhancer-gene positive correlation links.
positive_links<-read.table("positive_pairs.tsv", header = T)
positive_links<-positive_links[,c(2,3,4,1,5,6... |
23dcc8932591d6540f5f49634e7c6d14752ce3e3dcea94a9e4c7b05e78b165e5 | R | 15,588 | 475 | #' Get dendogram
#'
#' Hierarchically clusters data in R.
#'
#' @param R R struct.
#' @param method Hierarchical clustering method. If NA (default), get optimal choice of all clustering methods.
#' @param cores Number of cores to be used in this step.
#'
#' @return hclust object of dendrogram
#'
#' @noRd
get_dendro <- ... |
52d0c07ebdc0ee5fe7a18139aaf95c9b6fece66069a8a7e45e00b4ce540e3672 | R | 15,597 | 384 | ---
title: "Figure_otherDatasets"
author: "Fabienne Roessler"
date: '2024-03-08'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("DLCAnalyzer.R")
source("BFA_BFF.R")
library(sp) #tested with v1.3-2
librar... |
367d50b7c74db224ec0b4a612448205013c060a010311852570c63746ce5ddd5 | R | 15,613 | 387 | #========================================================================================#
# Written by James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, Department of Psychology
# University of Oslo, Norway
#========================================================================================... |
f171f76c04414402d468b96ace124cc9e4abd55a5619ba4f7ca09baa4640f1ce | R | 15,614 | 389 | #' Automatically format an annotation file. From libary(scrattch.io)
#'
#' This takes an anno file as input at any stage and properly annotates it for compatability with
#' shiny and other scrattch functions. In particular, it ensures that columns have a label,
#' an id, and a color, and that there are no factors... |
0152e33ccd3373a7fe975ddb1bed5669a33adcae56ba338a460108efb5f60111 | R | 15,687 | 351 | library(dplyr)
library(tidyr)
library(stringr)
library(openxlsx)
library(tibble)
library(ggplot2)
library(survival)
library(survminer)
library(DESeq2)
library(fgsea)
library(RColorBrewer)
set.seed(123456)
## Load expression data
# TCGA - NEW
# expMat <- read.table("TCGA/TcgaTargetGtex_RSEM_Hugo_norm_count", sep="\t",... |
0de66132b7ec994e483e8f8e1259aacb4d0b0c7e73234978009f989d7608ac18 | R | 15,716 | 377 | ---
title: "Figure1_kmeans_70Clusters"
author: "Fabienne Rössler"
date: '2023-02-27'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("DLCAnalyzer.R")
source("BFA_BFF.R")
library(sp) #tested with v1.3-2
li... |
85666c90f3ea20ef609a120e5b04a15f94f47afd4a65160543748b8d8835d348 | R | 15,762 | 359 | ##############################
### SUBSET BAMS #############
##############################
#subsetear cada celltype a 350 celulas (que son las celulas de la PN3) para hacer los heatmaps de la figura final
metadata<-noack_obj@meta.data
barcodes_nsc<-rownames(metadata)[metadata$predicted.id=="NSC"]
barcodes_ipc<-rowna... |
0fa6135450aeb603625ef19cdb58ac8871ee22d1e9a8f40042b59165c301a6c7 | R | 15,837 | 252 | #!/usr/bin/env Rscript
options(stringsAsFactors=F)
## load R libraries
library(SAIGE)
require(optparse) #install.packages("optparse")
print(sessionInfo())
## set list of cmd line arguments
option_list <- list(
make_option("--plinkFile", type="character",default="",
help="Path to plink file for creating the ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.