sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
ea89138da2eda9b5f791a9f706a6fdb1ebad852fca4313d604573b904e3bb0d3 | R | 9,871 | 270 | library(dplyr)
library(RColorBrewer)
library(gplots)
library(stringr)
library(purrr)
load("cluster_1_2_3.RData")
load("sc_exp.RData")
load("celltype.RData")
load("neuronal_non neuronal_cells.RData")
zscore = function(x){
x = (x - mean(x))/sd(x)
}
mean2 = function(x){
mean(x,na.rm = T)
}
#neur... |
63c6c1d05b0946e7b149f654a77c91390b1371d16a471f65222bb64a36160784 | R | 9,873 | 262 | # This code is to explore the relationship between three phenotypes and
# plot Fig. 6 and S12
# WANG. 03-April-2024
# Remove all objects created before to prevent clash
rm(list = ls())
library(dplyr)
library(ggplot2)
library(reshape2)
library(patchwork)
library(RColorBrewer)
# Set the working directory to the pat... |
e598fb64036bfca7dd2f90645479d7c0337665553cfbefa168a1895f32e5c21b | R | 9,901 | 470 | # ====================== #
# 4. APOE interactions #
# meta-analyses #
# ====================== #
## Set up ----
filepath <- ""
setwd(filepath)
## Load libraries ----
library(data.table)
library(dplyr)
library(magrittr)
library(metafor)
library(purrr)
## Read in data (APOE e2) ----
nshd <- read.csv("resu... |
ff279f3c772bfd9b0c47e8776f8f2dbf6665fc3e8d6369f42aebc3af70983236 | R | 9,904 | 180 |
library("gamlss")
pop_norms <- read.csv("~/r_files/pop_norms.csv")
boys = subset(pop_norms, pop_norms$Gender == 1)
girls = subset(pop_norms, pop_norms$Gender == 2)
x_axis = make.names("Age")
y_axis = make.names("TMT.PRED.AVG.filtered")
data_perc_boys <- data.frame(boys[,x_axis],boys[,y_axis])
data_perc_girls<- dat... |
2fc90551ee8697e62caae99ac95c00250efef6caad9cdda8ee2b43d8559f51ab | R | 9,912 | 285 | library(Seurat)
library(Seurat)
library(dplyr)
library(Matrix)
library(ggplot2)
library(ggpubr)
library(limma)
setwd("./20220125")
data_dir <- getwd()
list.files(data_dir) # Should show barcodes.tsv.gz, features.tsv.gz, and matrix.mtx.gz
data <- Read10X(data.dir = data_dir)
nUMI = colSums(data)
names(... |
85aa01e2321ea9090eebdbf644ca9c758ea5b98c195a047e52049792a86afa2a | R | 9,916 | 180 |
library("gamlss")
pop_norms <- read.csv("~/r_files/pop_norms.csv")
boys = subset(pop_norms, pop_norms$Gender == 1)
girls = subset(pop_norms, pop_norms$Gender == 2)
x_axis = make.names("Age")
y_axis = make.names("TMT.PRED.AVG.filtered")
data_perc_boys <- data.frame(boys[,x_axis],boys[,y_axis])
data_perc_girls<- dat... |
2a867ec802ada3c810df1a70d93ad8bb4acea793cfe796320bd43cdd3e1cc6bf | R | 9,954 | 358 | library(Seurat)
options(Seurat.object.assay.version = "v5")
library(SeuratObject)
library(stringr)
library(purrr)
# support R new feature in 4.2
Sys.setenv("_R_USE_PIPEBIND_" = TRUE)
library(R6)
library(future)
options(future.globals.maxSize = 10e9)
library(future.apply)
plan(multicore, workers = 4)
library(ggplot2)... |
341c915c5600950fc8f3b5c9ed39d41e6e462c02d231faa12bb5b8801a92b21b | R | 9,963 | 317 | #####
p.C3ph <- ggplot(data=dataset, aes(x=PosthocPhaseC3, group=Condition, fill=Condition, color=Condition)) +
geom_density(adjust=1.5, alpha=.4) +
scale_fill_manual(values=c("red", "blue")) +
scale_color_manual(values=c("red", "blue")) +
xlab("phase (left)") +
theme_bw()
p.C4ph <- ggplot(data=dataset, aes(... |
65283b00f76909f2b0f466e90504c10546f9f1f8b154e5c7a736c77e448231ae | R | 9,964 | 186 |
library("gamlss")
pop_norms <- read.csv("~/r_files/pop_norms.csv")
boys = subset(pop_norms, pop_norms$Gender == 1)
girls = subset(pop_norms, pop_norms$Gender == 2)
x_axis = make.names("Age")
y_axis = make.names("TMT.PRED.AVG.filtered")
data_perc_boys <- data.frame(boys[,x_axis],boys[,y_axis])
data_perc_girls<- dat... |
ec481c5d53d34194efee4ac53a1760a0c556471e8477a07959f4e9d98dc3ce0d | R | 9,982 | 188 | ---
title: "Calling Hits on N2a 410 Data"
author: "Stephen P Plassmeyer"
date: "7/17/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
source('../../../code/mpra_tools/mpra_tools.r')
```
Updates 08-05-2020:
* Moved threshold selection to the qc markdown file.
* Adde... |
2352b223c3b288c9588f0d6367e96ca940d06eacd5a98d452fe633481cd9ff58 | R | 9,985 | 242 | # This code is to
# 1. calculate and plot the CV
# 2. plot the percentage change of each region with box plot
# WANG. 20-Jun-2024
# Remove all objects created before to prevent clash
rm(list=ls())
library(dplyr)
library(ggseg)
library(ggplot2)
library(tidyr)
library(patchwork)
# Set the working directory to the ... |
e91fdab890ab84ec074471d4300c1d41ed2dc89fe989a2ca6ac704dac5d9997a | R | 9,986 | 296 | # visium spatial analysis
#########################
# figure umap
library(Seurat)
library(here)
library(ggplot2)
plots <- here("ckd","figures")
dir.create(here(plots))
spatial <- readRDS(here("ckd","spatial","step1b_spatial.rds"))
paletteMartin <- c(
"#000000", "#004949", "#009292", "#ff6db6", "#ffb6db",
"#490092", ... |
0e7d9c37ecff7bb31495386732afff7816d71b2c42e852806ce66521af6eec0e | R | 10,118 | 162 | source('scripts/config.R')
source('scripts/aux_functions.R')
source('scripts/plot_functions.R')
source(paste0(main_dir,'results/hg38/hic/config.R'))
source(paste0(main_f,'scripts/main_functions.R'))
source(paste0(main_f,'scripts/aux_functions.R'))
source(paste0(main_f,'scripts/plot_functions.R'))
source(paste0(main_f,... |
1121062aeecf50f1fc3f3947d7cd3be536b310d50955a84db8d4187eebcf1f1e | R | 10,191 | 286 |
#packages(?) check package loader in case something is missing
# library(Seurat)
# library(randomForest)
# library(future)
# library(doMC)
#Notes for use
# - This will take data from the RNA assay not the integrated assay, because we want to compare expression rather than distance
# - clustering should be the name ... |
931093e0838b25611121879d07cd38df9197b73efa7bb0e035b7cb52c3008016 | R | 10,193 | 257 | library(stats)
library(dplyr)
library(tidyr)
load("domain_elegans.RData")
load("cluster_1_2_3.RData")
load("Cel_dup_N4Cel.RData")
load("Cel_dup_N1N3.RData")
load("Single_copy_genes.RData")
load("genes_dNdS.RData")
load("sc_exp.RData")
load("celltype.RData")
load("L4_exp.RData")
load("Genes19997.RData")
loa... |
e199c499d2081f681f9aaca924cf29b3f1cb8d003386155972a4aa9ba830bcd0 | R | 10,219 | 363 | ##' Global_Zcut
##'
##' @title Global_Zcut
##' @description The internal functions of the \code{scapGNN} package.
##' @param MAT Internal parameters.
##' @param seed Random number generator seed.
##'
Global_Zcut<-function(MAT,seed=123) {
VEC<-apply(MAT, 1, function(x){
return(min(x[x>0]))
})
set.se... |
926103f3a5086d05cb3c915ee5e4e424fb54f31f0f0d94d312a8163ca065a25e | R | 10,225 | 236 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(RColorBrewer)
library(rcartocolor)
library(ggpubr)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
## AUCell object for DNA damage estimates
library(AUCell)
## for plots
... |
dccf08ebbf5b4927543fffe78bc2c33c98a6f081eac6c7b6e8278d4864621bd6 | R | 10,267 | 216 | ---
title: "Ranges of Expression. Effect Sizes, Comparison to in vitro"
author: "Stephen P Plassmeyer"
date: "7/29/2020"
output: html_document
---
To Do's:
* Apply count filtering!
* Handle extreme outlier values
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
source('../../../code/mpra_tools/mpra_to... |
7516636dd1222d298c5fcda755ce90ee1c53df7da04c18d454bd2cb23185f310 | R | 10,280 | 316 | suppressWarnings(suppressPackageStartupMessages(library(xbioc)))
suppressWarnings(suppressPackageStartupMessages(library(MuSiC)))
suppressWarnings(suppressPackageStartupMessages(library(reshape2)))
suppressWarnings(suppressPackageStartupMessages(library(cowplot)))
## We use this script to estimate the effectiveness of ... |
8328e11082cd1466fc4652d1195ac0be8f9514dea9fbdf05966dfce914ef1744 | R | 10,292 | 277 | fastenrichment <- function(signature_ids,
gene_ids,
measurements,
enrichment_space = c("go_bp","kegg","tf_dorothea","msig_db_h",
"msig_db_c1","msig_db_c2","msig_db_c3",
... |
2bdc5317fba8dbd8862b669a211c50baf69fad646b0b7e6734898ff34054daad | R | 10,321 | 260 | # compare cell type with allen data
# load Allen Seurat data: https://portal.brain-map.org/atlases-and-data/rnaseq/mouse-whole-cortex-and-hippocampus-smart-seq
load("../scRNA/Seurat.ss.rda")
ss.seurat$subclass_label
table(ss.seurat$region_label)
genes = intersect(rownames(merFISH_integrated), rownames(ss.seurat))
... |
3e3f85bfe62580a340c51ae9cc0d34a243db5f1fdf1273fe02e4beb572dbabc2 | R | 10,337 | 225 | ---
title: "Other phenotypes - Gut microbiome TransplantLines"
author: J.C. Swarte
output: html_notebook
# ==========================================================================================
# By: Weersma Group, TransplantLines (UMCG)
#
# UMCG Transplantlines Pr... |
ad5fa3bb130996f4e4913cfba8d77db741404c7242cf116b4cb55fcc53b7f6fb | R | 10,343 | 167 | source('scripts/config.R')
source('scripts/aux_functions.R')
source('scripts/plot_functions.R')
source(paste0(main_dir,'results/mm10/hic/config.R'))
source(paste0(main_f,'scripts/main_functions.R'))
source(paste0(main_f,'scripts/aux_functions.R'))
source(paste0(main_f,'scripts/plot_functions.R'))
source(paste0(main_f,... |
f8f4b29175bc885f8a0b2480e1ce8c4e1d762377fec37a0e0d5a0e0f0b0b107e | R | 10,360 | 267 | ############################################
### Analysis carried out in response
### to Reviewer #1. Specifically, these
### analyses seek to explore whether the main
### result holds when we only consider species
### in the Paris Vertebrate Collection.
### This analysis seeks to provide additional
### perspective on ... |
8d5ce6209f414a4bc4850793acbf2d0e0cf9cb21224867d1c6cb5f0b12e6fe77 | R | 10,363 | 284 | #/Users/luisacutillo/Manchester/Alexis/Oscope++/OscopeRcode/casestudy/H1
library('igraph')
library('biomaRt')
library('neat')
library('Oscope')
mypath='~/Manchester/Alexis/Oscope++/'
source(paste(mypath,'OscopeRcode/CustomLibrary.R',sep=''))
#mypath='/home/luisa/Manchester/Alexis/Oscope++/'
mypath='/Users/luisacutillo... |
4a5d40920d732dce30ae64205754fa527dec6aeddef281578f7e6fe0327c2644 | R | 10,366 | 263 | #' Plot gistic results.
#' @description takes output generated by readGistic and draws a plot similar to oncoplot.
#'
#' @details
#' Takes gistic file as input and plots it as a matrix. Any desired annotations can be added at the bottom of the oncoplot by providing \code{annotation}
#'
#' @param gistic an \code{\link{G... |
dd4a65e0254adac1f2813a2f5732a9280f7c9972a0f620d4eb92f48dd7087e0b | R | 10,390 | 339 | ##################################################################
# LC snRNA-seq analysis pipeline: testing some alternative methods
# adapting code from Matt N Tran, June 2022
# Lukas Weber, June 2022
##################################################################
# run in interactive session on JHPCE
# screen -... |
06aa647b88609e65d2f6482e333d348bd2e7cdb6f3c896c02306e0a1882902be | R | 10,400 | 234 | ---
title: "Figure 5"
author: "Stephen P. Plassmeyer"
date: "5/03/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../../../code/mpra_tools/mpra_tools.r')
library(ggpubr)
library(MASS)
theme_set(theme_bw(base_size = 6))
library(lawstat)
library(o... |
ff15bfa32709f5377147ff896df87f12f385e67568d7e17389e0057e6e011390 | R | 10,415 | 390 | ---
title: "LC analyses: cell type markers"
author: "Lukas Weber"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
number_sections: true
toc_depth: 3
toc_float:
collapsed: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
```
# Introduction
Analysi... |
db3bd52f5a920bba785b0bf46a5f2d6eea77220688a7728921dc7b3e28fb2301 | R | 10,441 | 231 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
#set all directory paths
sourcedir<-"~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/03_log_odds_calculation/"
histodir <- "~... |
e8aaa0a70a53e50aeef57d9bbfe1d06ffa52dad0f4e17226a90af561aa6d90b3 | R | 10,477 | 274 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
dc0097bbfcfbe04824f0c16ec2416982cd57e533df2be02626733d476d53fcc0 | R | 10,515 | 208 | ## Author: Youtao Lu <luyoutao@sas.upenn.edu>
## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania
## All Rights Reserved.
## This Source Code Form is subject to th... |
83cbcff2e823efc3061bc1a4fcd26e1112dc029f50d83add59667a1e3e034939 | R | 10,523 | 238 | #library(formattable)
### Update on 7.16.21: rerun codes to update der_hemeNOS, der_heme, der_cancer_type
### Update on 7.23.21: for der_tri_rt_dx,create der_tri_rt_dx.v2, collapse the "Jan-Apr" and "May-June"
### Update on 8.26.21: use udpated dataset
library(plyr)
library(tidyr)
library(dplyr)
library(Hmisc)
library... |
87a230bc54415ad850c16b5abfe5534fa5a8e734a0320d5a2ec736e67f0bb281 | R | 10,529 | 156 | #---Load Libraries and data--------------------------------------------------------------------------------------------------------------####
library(loomR)
library(tidyverse)
library(EWCE)
library(limma)
library(readxl)
library(tidyverse)
library(stringr)
setwd("~/projects/LDSC_Regression/Data_preLDSC/Zeisel2018/")
... |
4ee285c352496b073fdc93ec80c577313b1e1cc50ea77587918708f823d1e7ea | R | 10,557 | 230 | # Gregory Way 2017
# PanCancer Classifier
# scripts/viz/ddr_summary_figures.R
#
# Visualize summary for DNA Damage Repair/Response (DDR) classification scores
#
# Usage: Run by assigning where the within classifier summary is and where the
# Pan Cancer classifier summary is
#
# Rscript --vanilla scripts/viz/... |
341f555132a41a83ff384cdbb33bcee029713515c1a5ffdcfdbd28c429d0e017 | R | 10,558 | 256 | ### Between -cluster comparison
#For this analyses, we will use the **lme4** package in R to fit generalized
#linear mixed effects models. We are going the model the change in the chance
#(or more formally the odds) of cells from a given mouse belonging to a given
#cluster from the 3 genotypes to the fE4 genotype. T... |
8e663c7e71ada773d420e164282a4922c20c7fccc3e2e387c150891bfcee86d7 | R | 10,563 | 256 | ### Between -cluster comparison
#For this analyses, we will use the **lme4** package in R to fit generalized
#linear mixed effects models. We are going the model the change in the chance
#(or more formally the odds) of cells from a given mouse belonging to a given
#cluster from the 3 genotypes to the fE4 genotype. T... |
bb0811f79ca58e0a1cfde0603d0435b71dab2e48e167ecefe8525148150312e9 | R | 10,563 | 256 | ### Between -cluster comparison
#For this analyses, we will use the **lme4** package in R to fit generalized
#linear mixed effects models. We are going the model the change in the chance
#(or more formally the odds) of cells from a given mouse belonging to a given
#cluster from the 3 genotypes to the fE4 genotype. T... |
1860e1d6f984f6bd35cfd3aa6c8a24888cacb625c64a3f2627240b92314702ca | R | 10,568 | 207 | ## Author: Youtao Lu <luyoutao@sas.upenn.edu>
## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania
## All Rights Reserved.
## This Source Code Form is subject to th... |
c9703d56654e4ab664b7100fb1d6364620719f1f427587fa08d1589b1d2dc46b | R | 10,628 | 219 | library(tidyverse)
library(readxl)
library(ggplot2)
library(ggsignif)
library(ggpubr)
library(factoextra)
library(ggridges)
### Load embeddings and data and combine them
#Load data
human_expr <- data.table::fread('data/human_exprs.csv') %>% column_to_rownames('V1')
human_hiv <- data.table::fread('data/human_metadata.c... |
242ea7c8be8d63d4056d8cbd51fb2db7ec96952c0776952261f11b234733f393 | R | 10,638 | 231 | # Gregory Way 2017
# PanCancer Classifier
# scripts/compare_within_models.R
#
# Plots pancancer classifier performance compared to within cancer
#
# Usage: Run by assigning where the within classifier summary is and where the
# Pan Cancer classifier summary is
#
# Rscript scripts/compare_within_models.R
#
#... |
807b4adb8529bd97bb33b33e999f179bb01a7aaa8acf4fd260e01b676385d470 | R | 10,649 | 223 | setwd("/media/storageA/lisa/2020_zonal_paper/analysis/hic/200925_repeat_heatmaps/")
library(data.table)
library(dplyr)
library(ggplot2)
library(ggpointdensity)
library(tidyr)
library(stringr)
library(readr) # read_delim
library(tibble)
library(cowplot)
library(RColorBrewer)
# resolution of analysis
bin_size <- 50000
d... |
3f141f22886c22432d7558d3ab4a907166677220d4219497f8cd463cd6562a20 | R | 10,661 | 198 | library(tidyverse)
library(caret)
library(ggplot2)
library(ggpubr)
library(ggpattern)
library(corrplot)
library(reshape2)
# results_cpa <- data.frame()
# for(cell in c("PC3","HT29","MCF7","A549","NPC","HEPG2","A375","YAPC","U2OS","MCF10A","HA1E","HCC515","ASC","VCAP","HUVEC","HELA")){
# tmp <- data.table::fread(past... |
6e41a56fd5c9f6c35935384402049c2d089cd2fc4b23f667ab59329826e1c414 | R | 10,661 | 216 | ## ---------------------------
##
## Script Purpose: Figures demonstrating microstructural indirect efffect sizes
## I.e how DTI microstructure appears to mediate the VRF-CF association
## (1) Rename variables from supplementary table to abbreviated form
## (2) Create a n... |
2a5d012eb58f638f024ebf3da691c43270ccdb914cd2e1a825d6202222da7b4b | R | 10,718 | 325 | library(data.table)
library(Matrix)
library(ggplot2)
packdir <- file.path(here::here(), "package/R")
import::from(.from = "cembav2env.R", .directory = packdir,
cembav2env)
import::from(.from = "peak.R", .directory = packdir,
getTopRankClusterForPeakModule,
rankModules)
import::from(.from = "utils.R", .directory ... |
df7f0e33e06501020299e27a616335c10fba0c74a12a2c005d1d30354ff89209 | R | 10,757 | 281 | ---
title: "testing_count_compilation"
author: "Stephen P Plassmeyer"
date: "4/2/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source("../code/mpra_tools/mpra_tools.r")
```
```{r}
data<-c()
```
```{r}
reformat_element_name <- function(counts.data){
counts.data[,Elem... |
ac6f4eb1ce02ef3452fa5dfa96b1e04e9738f387ded8a11aaf4ffb0ea8fd9fb4 | R | 10,766 | 219 |
#' @title Filter genes in sigs according to reference
#' @description Filter genes in sigs according to reference
#' @param sigs a character vector of genes or list of character vectors to filter
#' @param ref reference genes to filter sigs according to
#' @param conserved the minimum allowed fraction of genes reta... |
518996ff6c44e46f3af6758ee03be3b32781581aa971ab57da62362d31193b0d | R | 10,771 | 297 | ---
title: "Quality control and filtration"
author: "Sergey Naumenko"
date: "`r Sys.Date()`"
output:
html_document:
code_folding: hide
df_print: paged
highlights: tango
number_sections: true
self_contained: true
theme: default
toc: true
toc_float:
... |
bcb866a6abf6475db00c0b01464cc41ecca57828a3ce333fd8a57bebd96973a2 | R | 10,777 | 196 | #1. load peak file
#2. how to remove the low expressed ones
#3. BIC
#4. contrast
ROOT='/sc/arion/projects/CommonMind/roussp01a/fetal_hic/hicpro/loop/DE'
input_path=file.path(ROOT,'input_mat_techrep_25000.Rdata')
load(input_path)
options(mc.cores=4,scipen=20,stringsAsFactors = F)
STEP_QC_PATH='/path/to/hicchip/scripts/... |
0916008ebe246195b190eac517958b30a8d8c0f2c2c92e6f30e5bc1ae8192bd1 | R | 10,913 | 199 | #' Read MAF files.
#' @description Takes tab delimited MAF (can be plain text or gz compressed) file as an input and summarizes it in various ways. Also creates oncomatrix - helpful for visualization.
#' @details This function takes MAF file as input and summarizes them. If copy number data is available, e.g from GISTI... |
a5358921cf93920eb3b22fab6243b5c8db9f1430b8f06066bcafb592ef33f7c8 | R | 10,915 | 229 | library(data.table)
library(dplyr)
library(ggplot2)
library(ggpointdensity)
library(tidyr)
library(stringr)
library(readr) # read_delim
library(tibble)
library(cowplot)
library(RColorBrewer)
library("ComplexHeatmap")
library(circlize)
######################################################################
# SCRIPT TO G... |
3cbe76c5987dcbc6e5382572c52283f83679ada34dd0a0f541931e4a046c6dbb | R | 10,990 | 230 | #### Master Script 01c: Perform multiple imputation of missing study values before analysis ####
#
# Shubhayu Bhattacharyay
# University of Cambridge
# email address: sb2406@cam.ac.uk
#
### Contents:
# I. Initialisation
# II. Perform multiple imputation of study measures
### I. Initialisation
## Import libraries and p... |
912ae1ff905e41215f7b2c752cfd5b757e6bc467e7196f8e130f35508b9c8357 | R | 10,998 | 174 | source('scripts/config.R')
source('scripts/aux_functions.R')
source('scripts/plot_functions.R')
source(paste0(main_dir,'results/hg38/hic/config.R'))
source(paste0(main_f,'scripts/main_functions.R'))
source(paste0(main_f,'scripts/aux_functions.R'))
source(paste0(main_f,'scripts/plot_functions.R'))
source(paste0(main_f,... |
d08f8b6deddcd06fdf03d2388a78f5314f831fce8f607b6690f6bef6edf1a91a | R | 10,999 | 288 | #########################
# figure 2a atac umap
library(Seurat)
library(here)
library(ggplot2)
# create a plot dir
plots <- here("ckd","figures")
dir.create(here(plots))
atac <- readRDS(here("ckd","atac_aggr_prep","step6_atac_loy.rds"))
atac <- RenameIdents(atac,
TCELL = "LEUK",
... |
1ec9722244cb79eee884e6c73b0c9d2fe96f955b7617c142b5a38ebf8504b16e | R | 11,002 | 257 | ### Between -cluster comparison
#For this analyses, we will use the **lme4** package in R to fit generalized
#linear mixed effects models. We are going the model the change in the chance
#(or more formally the odds) of cells from a given mouse belonging to a given
#cluster from the 3 genotypes to the PS19-fE4_Saline... |
7d2e3c35ae9f447e5abeecda381505a2990532c26b490ce4825dd3f1b7c052d6 | R | 11,021 | 286 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
9a7b3dd74418a28e7155b8f01bfc7bcfb49e890966682906fea19ee134c4ca3f | R | 11,041 | 259 | ### Between -cluster comparison
#For this analyses, we will use the **lme4** package in R to fit generalized
#linear mixed effects models. We are going the model the change in the chance
#(or more formally the odds) of cells from a given mouse belonging to a given
#cluster from the 3 genotypes to the PS19-fE4_Saline... |
d28e8441af51c481bd6d5841a01a7fe8318477a301c02f72f54ebd4697ca208d | R | 11,074 | 253 | # Shared utilities keep input handling, standardisation, and BF01 calculations
# identical across the bilateral, prior-width, and unilateral analyses.
find_repo_root <- function(start_dir = getwd()) {
path <- normalizePath(start_dir, mustWork = TRUE)
repeat {
if (file.exists(file.path(path, "DATA_USE.md")) && d... |
5f7a83448ce0b406163c6dab3707ae43c398ed580b81d3d748961c198ffd13fd | R | 11,086 | 179 | ## Author: Youtao Lu <luyoutao@sas.upenn.edu>
## Copyright (c) 2017-2023, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2017-2023, James Eberwine, Perelman School of Medicine, University of Pennsylvania
## All Rights Reserved.
## This Source Code Form is subject to the... |
72c636b4948c2370d5fa8589851102bacfc34ffab6bb1ce3a3ac63b62aa5b3ad | R | 11,108 | 247 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(RColorBrewer)
library(rcartocolor)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
## gene expression heatmap plots
library(Nebulosa)
ss <- function(x, pattern, slot = 1,... |
96e61767c16b928caec9aefd5233421c22a797cb2bccb76af2c87a38565a769a | R | 11,157 | 259 | ---
title: "Figure 3"
author: "Stephen P. Plassmeyer"
date: "5/02/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../../../code/mpra_tools/mpra_tools.r')
library(ggpubr)
library(MASS)
theme_set(theme_bw(base_size = 8))
```
```{r}
get_densit... |
c785a034aa0c74755b13bee87a6de9f008722f8c77ca5f73fb957f271553d294 | R | 11,177 | 281 | ---
title: "Evaluating logFC Threshold for Case Enrichment"
author: "Stephen P Plassmeyer"
date: "7/27/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(data.table)
library(patchwork)
library_annotations <- fread('../../library_design/mr_library... |
b5748d9844cc987c2429eb3b6faa78e556c4f5fda3eccf9d6b1b17966144fb76 | R | 11,212 | 266 | summarizeMaf = function(maf, anno = NULL, chatty = TRUE){
if(!is.data.frame(maf)){
#try to coerce into data.frame
maf = data.table::as.data.table(maf)
}
if('NCBI_Build' %in% colnames(maf)){
NCBI_Build = unique(maf[!Variant_Type %in% 'CNV', NCBI_Build])
NCBI_Build = NCBI_Build[!is.na(NCBI_Build)]... |
8b5b42a2845dddce7f7bc4bd090e182a075768d9f2f64804fe2a5eb2e3c92ae4 | R | 11,214 | 279 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
d28c92dcba31cafb0606c946d80ccc68083bd699b0943e18a83b09c7b2707846 | R | 11,231 | 274 | ###############################################################################
# Neural substrates of parallel devaluation-sensitive and
# devaluation-insensitive Pavlovian learning in humans
# analysis for revisions only
# last modified on JUNE 2023
######################... |
4b9493dc7c484beff3e309fa0bf30dbecb73f2be0e1d1798436ee4b022787845 | R | 11,296 | 293 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
f53807f4e101f3b76bba97f3b9e1b9ee325a5decfa2b546596e6fffa1876488a | R | 11,322 | 250 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
library(pheatmap)
#set all directory paths
histodir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/",
"10_HMGB1i... |
6953da69bcc545dbe7d9ef9df292008fb9cbd6c573d07cf11482364b591596e7 | R | 11,365 | 384 | #' @export
getPeakCoords <- function(peakdf, sep1 = ":", sep2 = "-") {
r <- paste(
peakdf[,1],
paste(peakdf[,2], peakdf[,3], sep = sep2), sep = sep1)
return(r)
}
#' @export
normalizePmat <- function(snap,
method = "abs",
scaleFactor = 1e6) {
pmat <- sna... |
67a80964e8044ab94f78580bb0e8c2ac584382e1a45f65d50348b1452a5d55aa | R | 11,399 | 316 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
library(ggplot2)
library(gridExtra)
#set all directory paths
outdir <- paste0("/gladstone/bioinformatics/projects/",
"mn-1318-maxine-nelson-yadong-huang-snrnaseq-mm10-aug-2022/",
"results")
indir <- paste0(... |
ffffafb839237d0743352dae9ee15949bfa98da3b8f5e30fcd1479293e6ffe0d | R | 11,400 | 203 | ---
title: "Analysis of Outliers in 410 Data"
author: "Stephen P Plassmeyer"
date: "4/17/2020"
output: html_document
---
Temporarily putting this aside and usign the notebook used for development to run the analysis because the function doesn't seem to work as implemented in mpra_tools.R (for annoying reasons I'll hav... |
4e3766d9d3140680941ff27648319d380cba12f8c19e6b0bc842bb32743438bc | R | 11,425 | 237 | #' Compare mutation load against TCGA cohorts
#' @description Compares mutation load in input MAF against all of 33 TCGA cohorts derived from MC3 project.
#' @param maf \code{\link{MAF}} object(s) generated by \code{\link{read.maf}}
#' @param capture_size capture size for input MAF in MBs. Default NULL. If provided plo... |
f23c3d18b2dbcb4722050c2af5534fa3a36992475828bd1635a59673a09dc04d | R | 11,452 | 220 | library(SeuratDisk); library(Seurat); library(dplyr); library(ggplot2); library(patchwork);library(RColorBrewer)
library(ktplots); library(pheatmap); library(viridis); library(tidyverse)
## load each data set
readRDS("PRJCA001063_210830.rds") -> PRJCA001063
readRDS("GSE154778_210830.rds") -> GSE154778
readRDS("O... |
cf11448aff490205c300f8829384be3526f8a671a8270565ff9f04899414b154 | R | 11,457 | 252 | ---
title: "Generating cell-type dataset for AIBS 2019"
author:
- name: "Regina H. Reynolds"
affiliation: UCL
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
bookdown::html_document2:
figure_caption: yes
code_folding: hide
theme: paper
highlight: kate
df_print: paged
toc: true
toc_f... |
cf35a3f80ea0aa882ac00c9a1c3f297efc11507fc86c66ec64c871733bb55875 | R | 11,495 | 485 | ---
title: "Reliability of youth MRI"
author: "Vlad Drobinin"
output:
html_notebook:
toc: yes
toc_float: true
number_sections: no
theme: cerulean
code_folding: hide
---
```{r, message = F, warning = F}
# Load packages ---------------------------
# this installs missing packages, description bel... |
be6428d17d1eae9d374c65dd3d117366ed59cf8882a62e68ca2a1997059267c8 | R | 11,517 | 371 | ---
title: "metaboli pathway analysis KEGG"
author: "AZ"
date: "7/4/2020"
output: html_document
---
```{r setup, include=FALSE}
library(tidyverse)
```
```{r cars}
getOrganismInfo <- function(hsa){
KEGG_INFO_BASE <- "http://rest.kegg.jp/info/"
info_REST_url <- paste(KEGG_INFO_BASE, "hsa", sep="")
info <- readLin... |
5b54aec38da66624135f43bb364e869d26c39130e109337836cdeb0e93bbd1eb | R | 11,561 | 249 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
library(pheatmap)
#set all directory paths
histodir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/",
"10_HMGB1i... |
7cb9a2b035b131e1a8a179cb3fe6fa481989d3e24f92bd6d91f8abd8e93d3495 | R | 11,586 | 300 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(rlang)
library(writexl)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
## main differential gene expression package
library(SingleCellExperiment)
library(DelayedArray)
li... |
265d09f54fe64f274667d60e2786ed8b3275a77b9b6504afa166601cb6cd5c97 | R | 11,599 | 305 | ##' ConNetGNN
##'
##' @title Construct association networks for gene-gene, cell-cell, and gene-cell based on graph neural network (GNN)
##'
##' @description This function implements a graph neural network with two autoencoders. 1. AutoEncoder (AE) based on deep neural network:
##' Infer latent associations between... |
0acbbea4b84edb16e772b9eac2c97952c0dbd519a9b3e48e152d1877c3cd7c7d | R | 11,600 | 318 | #' Compute Local Inverse Simpson's Index (LISI)
#'
#' Use this function to compute LISI scores of one or more labels.
#'
#' @param X A matrix with cells (rows) and features (columns).
#' @param meta_data A data frame with one row per cell.
#' @param label_colnames Which variables to compute LISI for.
#' @param perplexi... |
54268442cd404a7ad78b36c6f6bfa291450fe68a907d915a1d3e2c9cedf25947 | R | 11,618 | 246 | #' Read and summarize gistic output.
#' @description A little function to summarize gistic output files. Summarized output is returned as a list of tables.
#' @param gisticDir Directory containing GISTIC results. Default NULL. If provided all relevent files will be imported. Alternatively, below arguments can be used t... |
4b75046c08b4094722fe45c8f48d8689ad773cea0139a9ee95a8ec6a04bdcc16 | R | 11,630 | 403 | ###############################################################
# LC snRNA-seq analyses: clustering and supervised thresholding
# Lukas Weber, Oct 2022
###############################################################
library(here)
library(SingleCellExperiment)
library(scater)
library(scran)
library(bluster)
library(gg... |
861002f76a4d73c628ad43fe64621478abd6329a5e0d16ff99f686851fb9b592 | R | 11,630 | 249 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
library(pheatmap)
#set all directory paths
histodir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/",
"10_HMGB1i... |
c93c6d2b8549c6b564a9685f49e6b8c65c4ef0b25229c086ce44e6ba39a8d80c | R | 11,638 | 290 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
c2a8daae5ee0f51b5fa3aea70ce46c0f87f192e18865dd12bf069f225198fe9c | R | 11,639 | 369 | # Cumulative vs sliding plot
library(tidyverse)
library(viridis)
library(sjmisc)
library(glue)
library(patchwork)
library(qvalue)
# load data
path <- "bids/derivatives/meg-derivatives/grand_ave/brain-space/visual_model/"
main_data = list()
count <- 0
files <- list.files(path,pattern = "*.csv")
# read csvs corresp... |
327e7c82530134546f25f77b51585c2abf23390a7544b7e27da7d6ddf96cb49c | R | 11,645 | 437 |
---
title: "Add cancer reactive gene signature information for CD8+ T cells"
author: "Wei Sun"
date: "`r Sys.Date()`"
output:
html_document:
theme: journal
highlight: tango
toc: true
toc_depth: 3
toc_float:
collapsed: true
smooth_scroll: false
number_sections: false
df_print: p... |
edf217bcf488ac961196b3383888ec28a67527d87a95234aeca90aa0809edef0 | R | 11,647 | 249 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
library(pheatmap)
#set all directory paths
histodir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/",
"10_HMGB1i... |
516fff69f477c28f294926ea5ffdedb7077b24d0eb9b9d676c7649e220f02e20 | R | 11,664 | 275 | library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
#set all directory paths
basedir <- paste0("~/Dropbox (Gladstone)/YH_MN02/",
"seurat_analysis_no_S521G/")
histodir <- "~/Dropbox (Gladstone)/MT/Maxine/input/"
indir <- paste0(basedir,
"05_subcluster_astr... |
a8a12568220d30565777cef8114108aaa88b9a88e04f8a684afed2513a6837fb | R | 11,680 | 243 | #' A graphical summary of the diseases of interest.
#'
#' Given an object of class \code{molecularComorbidity}, a graphical summary of
#' the main characteristic of the disorders is obtained.
#'
#' @param input Object of \code{molecularComorbidity} class.
#' @param database The default value is set to \code{'CURATED... |
bbd710465dca51354fc120e199541e5995bd85048e7cda9fb05edfabb8257e56 | R | 11,730 | 302 | ##################################################################
### ANALYSIS SCRIPT FOR
#Would you exchange your soul for immortality? –Existential Meaning and Afterlife Beliefs Predict Mind Upload Approval
### Authors (this R document): Michael Laakasuo, Jussi Palomäki
#######################################... |
be58ade95d811aaf90041dffd9ccb2876b0573ee34aed3310ce3917225109e05 | R | 11,738 | 276 | library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
#set all directory paths
basedir <- paste0("~/Dropbox (Gladstone)/YH_MN02/",
"seurat_analysis_no_S521G/")
histodir <- "~/Dropbox (Gladstone)/MT/Maxine/input/"
indir <- paste0(basedir,
"06_subcluster_micr... |
f110b8a276e4e9fc7d1f395757eecfc2e41cf7c04f0ca95eace48605ae30ee81 | R | 11,770 | 219 | ---
title: "Comparing IVT to Click-It"
author: "Stephen P Plassmeyer"
date: "2/16/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.R')
library(ggsignif)
library(ggpubr)
library(lawstat)
library(onewaytests)
library(patchwork)
```
... |
f25301cc0fb1ab04673283c0726db2c9d1f253ebf36184084f94361ecb450cd5 | R | 11,784 | 276 | library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
#set all directory paths
basedir <- paste0("~/Dropbox (Gladstone)/YH_MN02/",
"seurat_analysis_no_S521G/")
histodir <- "~/Dropbox (Gladstone)/MT/Maxine/input/"
indir <- paste0(basedir,
"06_subcluster_micr... |
0936accadbc51bfdc6cdcaf207465d993545a85ff71ad7c33d4dd99d7d42caf4 | R | 11,808 | 397 | ---
title: "LC analyses: segmented analyses"
author: "Lukas Weber"
date: "18 Nov 2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Introduction
Analyses for LC project.
Here we investigate the number of features per spot for each sample.
## Load data
Notes:
-... |
d64804ee85bb22c18124aad10453a1427d674d4736200c726bc26b86d6d8b5a1 | R | 11,817 | 298 | #############################################################
# Generate Figure 3A, 3B, Supplementary Figure 4,6
#############################################################
library(ggplot2)
library(scales)
library(ggpubr)
library(clusterProfiler)
library(openxlsx)
library(org.Hs.eg.db)
library(org.Mm.eg.db)
library... |
79e8a1b45af18b75124cfdcb0143c2f3d3e7266bf0146428109169b4e05e6eae | R | 11,818 | 293 | ---
title: "Evaluation"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library(s... |
a0e3261e18a2146be9b0fdb649cac8360ae6e89597c9c6b72224e0d134a6ad6e | R | 11,824 | 272 | ### LC snRNA-seq analysis
### Build SCE from raw count matrices; perform nuclei calling
### qrsh -l bluejay,mf=32G,h_vmem=34G -pe local 2
### Adopted from https://github.com/LieberInstitute/DLPFC_snRNAseq/blob/main/code/03_build_sce/build_basic_sce.R
### Initiated MNT 13Dec2021
library(SingleCellExperiment)
library(Dr... |
f27d6cf5c4f145f369c3cec95752ceb8b5964b6341ec7f426862f47efe6aeced | R | 11,824 | 219 | #' Converts annovar annotations into MAF.
#'
#' @description Converts variant annotations from Annovar into a basic MAF.
#' @details Annovar is one of the most widely used Variant Annotation tools in Genomics. Annovar output is generally in a tabular format with various annotation columns.
#' This function converts suc... |
2b83c5085d2c4c4f28b0da2e146ac81c8179ca953e90bb2ad326a9fdc2b1a435 | R | 11,834 | 237 | ###JNS changed line 184 to do aggregation with raw transcripts rather than cell size normalized
#'
#' @param cds the cell_data_set upon which to perform this operation
#' @param reduction_method The dimensionality reduction method used to generate the lower dimensional space in which genes will be clustered. Currently ... |
e0b4e42254a8f4449be1ca7b7df0ee6cda75d4e8d862f4fd6dd5d5761ea00a92 | R | 11,854 | 440 | #' @export
colFn <- function(col.fn = min) {
a <- function(mat) {
apply(mat, 2, col.fn)
}
return(a)
}
#' @export
rowFn <- function(row.fn = min) {
a <- function(mat) {
apply(mat, 1, row.fn)
}
return(a)
}
#' Prepare path for a new output file.
#' @param outf characters, file name with desired path
... |
6d094328ec4693713061f3305b08c6976a9493b72b053021c0eb93fad5516068 | R | 11,861 | 366 | library(Seurat)
library(clustree)
library(dplyr)
library(plyr)
library(ggtree)
library(MetaNeighbor)
library(Matrix)
library(dendextend)
library(SingleCellExperiment)
library(scrattch.hicat)
library(phylogram)
library(mrtree)
setwd('/local/projects-t3/idea/bherb/Hypothalamus/PubRes/Rewrite/')
flexsplit <- function(da... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.