sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
802d29f0d3285000e6e84c5bd36b613c956b36daaf5c016f49f36cb76951ab08 | R | 6,678 | 127 |
library(ggplot2)
# Read the data
Data = read.csv('AllFinalResultsOnset+5sec_200msec_bins.csv')
CellType.Trials = aggregate(ByCellType ~ Cell + SessionType + Trial, data = Data, sum) # sum all ByCellType per the Cell, trial and Session Type
CellType.Animal = aggregate(ByCellType ~ Cell + SessionType + Animal, da... |
81be03de703daa7e2fc1121f2f3a9ed43f566298fde8f3570a062f86399a5eb5 | R | 6,685 | 161 | ---
title: "Supplemental Figure 1"
author: "Stephen P. Plassmeyer"
date: "5/17/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)
library(patchwork)
theme_set(theme_bw(base_size =... |
72d499d42bdbb89c8e8688c93f56f870cbfd0ca0848d046c47eaea9ae31495e3 | R | 6,702 | 145 | #############################################################
# Generate Figure 2C,2D, and Supplimentary Figure 3
#############################################################
library(ggplot2)
library(openxlsx)
library(ggpubr)
library(reshape2)
Col_plate <- c("#E64B35FF", "#3C5488FF", "#4DBBD5FF", "#00A087FF",... |
2330b76d20bcbf565add855d42d63d989d51c2a50ed0001d42e21466fb83c4e0 | R | 6,713 | 155 | library(monocle3)
library(SingleCellExperiment)
library(purrr)
library(dplyr)
library(here)
library(ggplot2)
library(projectR)
library(stringr)
library(ggpubr)
library(biomaRt)
#These have pattern plotting on umap with clipped colors, correlation with features and pattern usage
source(here("scripts/accessory_functions... |
2637952350c05eaa742c4b8b35b07dcdee2d31fd48a99b976a9ab645eeb9d785 | R | 6,723 | 133 | library(GenomicFeatures)
library(DESeq2)
library(Rsamtools) #needed for BamFileList
library(rtracklayer) #needed to import GTF as GRanges object
library(GenomicAlignments) #used for summarizeOverlaps
library( "RColorBrewer" ) #for making heatmaps
library(gridExtra)
library(ggrepel) # for labeling points on plot with ge... |
b42db67f3e266205c69348ac25e9dcdfef7006d2795f339c607b451956b672a4 | R | 6,725 | 166 | require(R.matlab)
rm(list = ls())
ecgpath='/data/p_02186/TMS_ECG2/analyses/EEGsham/EKGsham/'
setwd(ecgpath)
fdipath='/data/p_02186/TMS_ECG2/analyses/EEGsham/FDIdata/'
bigdata=c()
subids=c('VP01', 'VP02', 'VP03', 'VP04', 'VP05','VP06', 'VP07', 'VP08', 'VP09', 'VP10', 'VP11',
'VP12', 'VP13', 'VP14', 'VP15', 'VP1... |
c00b1d1d40f35f67c80f3993eb39e09290c86b2cdbb544f382ccc8fda8c95fcf | R | 6,741 | 136 | ## 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... |
bf33e7f2972d012ae147380b0f6101cf7680b12fc093098acf34332d1045f968 | R | 6,746 | 168 | ---
title: "R Notebook"
output: html_notebook
---
---
```{r}
library(ggplot2)
library(pheatmap)
library(RColorBrewer)
library(tidyverse)
library(ggpubr)
library(ggsignif)
library(openxlsx)
#library(viridis)
library(jcolors)
```
```{r}
setwd("//atlas.uni.lux/users/isabel.rosety/GBA/DA ELISA")
#data <- read.csv("WB data... |
78651fa446145ff0842e66816cc8e397d47424cfa17beac50a5bc67b5b683850 | R | 6,758 | 160 | library(dplyr)
InputExp <- openxlsx::read.xlsx("../Data/mmc6.xlsx", colNames = FALSE)[,-1] %>% unlist() %>% as.numeric()
OutputDir <- "../Data/discrete/"
sim_discrete <- function(InputExp, OutputDir,
NGenes = 1000,
NX = 30, NY = 30, numSlices = 10,
... |
ffc2f369c90cdb6038e87a44f13937e9794918b2875be276d9c63244a706eb02 | R | 6,772 | 171 | library("readr")
library("ggplot2")
library("modelr")
library("parallel")
library("RColorBrewer")
library("tidyverse")
library("fuzzySim")
library("smplot2")
library("ggrepel")
library("scales")
library("colorspace")
setwd("your directory")
###########################################################
##... |
69a9666528c586d7035e333495d1c49189fd728ee038f509bb1bb413184039ad | R | 6,784 | 189 | #!/usr/bin/env Rscript
rm(list=ls())
options(stringAsfactors = FALSE)
args <- commandArgs(trailingOnly = TRUE)
print(args)
kdepairs <- function(x, n=25, density=TRUE, contour=TRUE, ...) {
require(MASS)
library(gplots)
y <- data.frame(x)
fun.lower <-function(x, y, col = par("col"), bg = NA, pch = par(... |
2836b7b762a92310d200f314b43f14fcd78cba84611cf3127de1edaa59b06989 | R | 6,797 | 228 | ---
title: "IPD_genes"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(tidyverse)
library(limma)
library(edgeR)
library(tidyverse)
library(clusterProfiler)
library(org.Hs.eg.db)
library(RColorBrewer)
library(ggsignif)
```
```{r}
setwd("Z:/16-Our Papers/In P... |
ecf05bf99b9df12f0f1f9dd1ddc2cb69fc354f9a3265e8514d1cf8c34a5ce705 | R | 6,803 | 166 | #-----------------------------------------------
# LICENSE
#-----------------------------------------------
# Copyright 2019 Novartis Institutes for BioMedical Research Inc.
# Licensed under the GNU General Public License, Version 3 (the "License");
# you may not use this file except in compliance with ... |
64e91bfe809b472d96bfe6135c875dbe74af565f0616c25f177672265a9a62de | R | 6,815 | 223 | ---
title: "R Notebook"
output: html_notebook
---
# Set Up
```{r setup}
knitr::opts_knit$set(root.dir = normalizePath("../.."))
```
# Imports
```{r}
library(lavaan)
library(semPlot)
library(factoextra)
source('functions/heatmaps.custom.R')
source('functions/explained_variance.R')
```
# Load Data
```{r}
merged.data.c... |
2dbd27ba532f4506500f3cd9f313dcbd4c27c9603428f0ce13bd1dd50e5703dc | R | 6,824 | 145 | ## packages for data table processing
library(tidyverse)
library(igraph)
library(network)
library(sna)
library(stringr)
library(RColorBrewer)
library(data.table)
library(here)
library(leiden)
"%ni%" <- function(x, table) !(match(x, table, nomatch = 0) > 0)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strspl... |
571bd6053d36907c0a96c00c44a0bda5a717aecf5e2e67591fa9608149ce5816 | R | 6,825 | 111 | ---
title: "Using Aracne"
author: "Juan A. Botía"
date: "30/03/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Introduction
This is a set of instructions to use Aracne-AP, introduced here <https://github.com/califano-lab/ARACNe-AP>. You can use it directly from Jav... |
391768463d3f5220c2318425eed954a80577838faa063ba9312441d6653d19fc | R | 6,828 | 218 | ---
title: "hNESCs_polar_Final"
author: "Alise"
date: "2019 M10 9"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
setwd("Z:/16-Our Papers/In Preparation/IPD_metabolism _ Alise/Figures/Figure1/originals/Polar_mets")
metdata <- read.csv("hNESCs_polar_GC_MS.csv", hea... |
0cb9fccb703b8012bb13ec919699efb2851b3b69d8c0793f11cb275faabc2bf6 | R | 6,832 | 111 | ---
title: "Using Aracne"
author: "Juan A. Botía"
date: "30/03/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Introduction
This is a set of instructions to use Aracne-AP, introduced here <https://github.com/califano-lab/ARACNe-AP>. You can use it directly from Jav... |
295352819167948750bc4d323c7745f37c3e8f8a020c02e71ff078e9623ef893 | R | 6,832 | 212 | # Figure 4 neuroPN
# SP | 2022 | sebastian@pechmannlab.net
library(ggplot2)
library(reshape2)
library(ggdendro)
library(cowplot)
library(edgeR)
setwd("M2/neuro/")
# Figure 4B ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coevo <- as.data.frame(read.table("data/processed/coevo/coevoDF.txt", header=T)... |
93d71452223703e2c7f5e8501f1f8f689cc9b5abea54761f1643b23c4e7c5542 | R | 6,838 | 177 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
## for maddie
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(SeuratWrappers)
library(future)
## packages for QC metric computation
library(SingleCellExperiment)
library(scds)
library(fl... |
c5e8efc740ac2c86d4d542f2cc4aa4df838e6b4c4ff8225eb34098fbe3b1e706 | R | 6,861 | 219 | library(tidyverse)
library(rlang)
library(R6)
Sys.setenv("_R_USE_PIPEBIND_" = TRUE)
projdir <- here::here()
rdir <- file.path(projdir, "package/R")
import::from(.from = "cembav2env.R", .directory = rdir,
cembav2env, cluSumBySa2)
import::from(.from = "peak.R", .directory = rdir,
mapL4pc2L4)
# load tf light summary... |
6dfbb555734498379473be42adfa95a38d5ab85e16c14a3bc9613257a0364005 | R | 6,871 | 156 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(SeuratWrappers)
library(DropletQC)
library(future)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, .... |
a1e384685102bb48a7f0276c0140e7de66d40a400573ff12dcd76e04dffb9b80 | R | 6,873 | 107 | ## Youtao Lu <luyoutao@sas.upenn.edu>
## Copyright (c) 2017-2022, Youtao Lu and Junhyong Kim, Department of Biology, University of Pennsylvania
## Copyright (c) 2017-2022, James Eberwine, Perelman School of Medicine, University of Pennsylvania
## All Rights Reserved.
## This Source Code Form is subject to the terms of... |
696f13353b967814ed62179245545a5c0ae867142646bdbb4e33f7aafb87c272 | R | 6,889 | 189 | ---
title: "Setting4 evalluation"
author: "Hao Huang"
date: "07/10/2022"
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)
... |
fe678575b9baa0fff093cb2f2726a0886d73834d7d1696e09a9657fd0cb5618e | R | 6,892 | 163 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
library(ggplot2)
library(gridExtra)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/projects/",
"mn-1318-maxine-nelson-yadong-huang-snrnaseq-mm10-aug-2022/",
"results/data")
indir <-... |
608152dd9c65b9aa774b132296f20eb3f465a2b820a5018ec855bd27508596d2 | R | 6,893 | 173 | library(tidyverse)
library(ggplot2)
library(ggsignif)
library(ggpubr)
library(factoextra)
library(Rtsne)
### Load data and controls-----
control_latent_1 <- data.table::fread('../results/trained_embs_all/ControlsEmbs_landmarks_CPA_a375.csv') %>% unique() %>%
column_to_rownames('V1') %>% mutate(label='A375') %>% mut... |
8f64bc83f1037e2da0f371fa4cc8bea3e13ffab9af05187dd4a13e7dcc9e6519 | R | 6,897 | 147 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(SingleCellExperiment)
library(ComplexHeatmap)
library(rcartocolor)
library(data.table)
library(tidyverse)
library(ggsci)
library... |
ff95206cf6e2904ff7084df94a8cf4e43cc6e7ff6c1116dcd5d9d29f2a0fd2b4 | R | 6,904 | 159 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
## for plot
library(RColorBrewer)
library(rcartocolor)
library(ggpubr)
## statistical analyses
library(tidymodels)
library(lme4)
library(broom.mixed)
library(lmerTest)
ss <- function(x, pattern, slot = 1, ...) {
sapply(st... |
45fde67b189a244557d4479d93d3e996c0aa9577e77a9bf2ff1483678b6c3346 | R | 6,909 | 188 | ---
title: "Setting4 evalluation"
author: "Hao Huang"
date: "07/10/2022"
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)
... |
958f468176c08679742922b30bbca5e8c43aa8a158f1355c78a3c9fd9ca8049c | R | 6,911 | 126 | library(data.table)
library(dplyr)
library(tidyr)
library(tibble)
library(stringr)
library(tidyfast)
library(doParallel)
library(fst)
intervals.centers <- function(inv){
inv[,2:3]<-floor((inv[,2]+inv[,3])/2)
inv[,3]<-inv[,3]+1
return(inv)
}
#returns the nearest occurence of x in vec credit(https://stackoverfl... |
0b2fd3238a5d157e235f9aba701e14b371482a9e42aef699ce4dfc24fd888d08 | R | 6,913 | 190 | ---
title: "Running time"
author: "Hao Huang"
date: '2022-07-03'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load packages
```{r}
library(glue)
library(ggplot2)
```
# Plot setting1
Deep learning methods
```{r}
nn_methods = c("DeepLift", "GradientShap", "LRP" , "Fea... |
df7500ad80fb74c37d7e9040c1d5d25e59397721c8c400011f13a82682f25163 | R | 6,917 | 273 | ###########################################################
# LC snRNA-seq analyses: DE testing (vs all other clusters)
# Lukas Weber, Jul 2023
###########################################################
library(here)
library(SingleCellExperiment)
library(scater)
library(scran)
library(dplyr)
library(tidyr)
library(f... |
10753e3c0d31279d3452aee3a75af5f11b71e2144c92c0b0141af463c74fdcf4 | R | 6,920 | 225 | library(tidyverse)
library(rlang)
library(R6)
Sys.setenv("_R_USE_PIPEBIND_" = TRUE)
projdir <- here::here()
rdir <- file.path(projdir, "package/R")
import::from(.from = "cembav2env.R", .directory = rdir,
cembav2env, cluSumBySa2)
import::from(.from = "peak.R", .directory = rdir,
mapL4pc2L4)
# load tf light summary... |
ff6309c3b2c77e51fca2bcdda6f1042a9b1899c4cdece1c8be52c9e78699e5d1 | R | 6,921 | 139 | library(tidyverse)
library(cmapR)
library(doFuture)
# parallel set number of workers
cores <- 15
registerDoFuture()
plan(multiprocess,workers = cores)
########## The whole pre-processing analysis is in the L1000 folder of the new data ###############
### Load data and keep only well-inferred and landmark genes-----... |
94e45bf7352f725a14fe621cafcc41ed05155b385e429e1de75552f5da41cd95 | R | 6,930 | 136 | ---
title: "SplitHalf_ICC"
output: html_document
date: '2023-01-25'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(psych)
library(reshape2)
library(gifti)
library(RNifti)
library(ciftiTools)
ciftiTools.setOption('wb_path', '/Users/askeller/Documents/workbench/')
library(ggplot2)
```
# Loa... |
ce1889ec51b380085015cf53b308ad3bf6cd68b820c640269750d03bde5ebf39 | R | 6,966 | 181 | library(stats)
library(dplyr)
library(tidyr)
load("cluster_1_2_3.RData")
load("Cel_dup_N4Cel.RData")
load("Single_copy_genes.RData")
load("bulk_dev_RNAseq.RData")
load("celltype.RData")
load("L4_exp.RData")
rec_z_cls2$WBGene = rownames(rec_z_cls2)
cls1 = filter(rec_z_cls2, cls == 1)
cls2 = filter(rec_z_cls... |
07cdff195c3049f5856c4d75be1786603575b419329ba3e06c7bd15f21651558 | R | 6,995 | 159 | #' Draw forest plot for differences betweeen cohorts.
#'
#' @details Plots results from \code{link{mafCompare}} as a forest plot with x-axis as log10 converted odds ratio and differentially mutated genes on y-axis.
#' @param mafCompareRes results from \code{\link{mafCompare}}
#' @param pVal p-value threshold. Default 0... |
d11c1762f845de608834d67ad2937e21edce45bad1581073e9bb99c962f7d1c4 | R | 6,999 | 149 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(SingleCellExperiment)
library(ComplexHeatmap)
library(rcartocolor)
library(data.table)
library(tidyverse)
library(ggsci)
library... |
544369dfcea14ba4455e0653d43715af484aa94625d9856ea34d11ced29ed6d6 | R | 7,042 | 271 | ---
title: "LC analyses: mouse marker genes"
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)
```
# Introduction
Analyses for LC proj... |
42540dbbc9a2aa1e900828f3042a88ea76723d79817ccd162c417a0d597d4386 | R | 7,053 | 163 | # Set working directory
setwd("/Users/alanx/OneDrive/Desktop/2019_killi_rna_data/2019_killi_rna_data_descriptor/count_table")
# Import library
library(clusterProfiler)
library(org.Hs.eg.db)
library(ggplot2)
library(scales)
library(ggthemes)
# Import DEG results
brain <- read.table('2023-06-01_brain_age.tx... |
0111b7535fc7d07669197a1a3d7c74dda52e86dba3a20e7b28c10fc1c0968438 | R | 7,057 | 142 | ## Dataset build for scRNA-seq analysis of organoid methanol fixation experiment
## Joe Raymond
#install.packages('Seurat')
library(Seurat)
## Data Loading
# Data is loaded from the CellRanger output into a Seurat object.
# This chunk of code will only function properly if data has been downloaded
# with its original... |
005c1a566fe8162d73786f4789bffe3790ffffeab003cf9de9d03de7db1be7e5 | R | 7,058 | 189 | #Quality control metrics per cluster
#supplementary figure
#run locally on Ayushi's laptop
#load required packages
library(Seurat)
library(dplyr)
library(ggplot2)
library(grid)
library(gridExtra)
library(cowplot)
#set all directory paths
basedir <- paste0("~/Dropbox (Gladstone)/YH_NK01-Results/",
"... |
3017b7cc3e6ebe7969c1ef1b073f83e5d3d697572eeceefc484d2eb35c79f78d | R | 7,059 | 329 | ```{r}
source("../../src/setup.R", echo = FALSE)
```
<!------------------------------------------------------------------------------>
<!------------------------------------------------------------------------------>
# I. Data:
***
```{r}
(Calb_P8_data <- load_calb_data() |> map(\(x) filter(x, Stage == "P8")))
Calb_... |
e3003209a760e027f9dec49c5bdd571c1ad3d8bb44b9354c3b0ae72accff3a25 | R | 7,071 | 219 | # Cross-temporal plot.
library(tidyverse)
library(viridis)
library(qvalue)
library(scales)
library(patchwork)
library(glue)
library(comprehenr)
path <- "bids/derivatives/meg-derivatives/grand_ave/brain-space/"
path_ext <- paste0(path,"visual_model/","temporal-cross/")
files <- list.files(path_ext,"*.csv")
main_data... |
c788c34097ec5613e7e65f81feddb1df91072ce9d60ff3134ee52aa1a28689f1 | R | 7,074 | 133 | ---
title: "Implementing mpralm"
author: "Stephen P Plassmeyer"
date: "4/8/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.R')
```
The provide vignette turned out to be useless because the allelic comparison data set isn't shipped... |
5182750c92deb43c253091e6873a3e54617728d7f31afb84e8269f4703e63e77 | R | 7,085 | 110 | ##This is the main script for running the simulations for training the neural network for the OnePulse model
##Software and packages needed:
## (i) Slim as a module of the cluster
## (ii) R and packages ggplot2, gridExtra and truncnorm
#### On HPC runs on anaconda3/personal. Need to run: module load anaconda3/personal... |
4b85c625a1337361faf9f03625b6b69d7d9f03ff692e646faee00f23069e1ccc | R | 7,095 | 143 | ## Dataset build for scRNA-seq analysis of organoid timecourse experiment
## Joe Raymond
#install.packages('Seurat')
library(Seurat)
## Data Loading
# Data is loaded from the CellRanger output into a Seurat object.
# This chunk of code will only function properly if data has been downloaded
# with its original filena... |
476e2fcf79c9ed61560c127ce5e1faae2eab0133118590e06e3226eb4699a25b | R | 7,101 | 104 |
# First load in the spatial extent of each PFN (they're in order, 1-17)
# Then merge with the same datasets as above (NIH toolbox, trauma, etc.)
pfn_sizes <- read.csv("/Users/askeller/Documents/Kellernet_PrelimAnalysis/All_PFN_sizes.csv")
# Change PFN column names so they're sensible
colnames(pfn_sizes)<-c("subjectkey... |
458ee0f4a23744c3920625cc04c8bfd479e72610cc8040d1d877a5f129508351 | R | 7,108 | 223 | ##############################################
# LC project
# Script to plot enrichment of LC marker genes
# Lukas Weber, Jun 2022
##############################################
# marker genes for NE neurons
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD00... |
baad087036d752267282b4e37f21b809808a11db18ce96af3c8d653bd739ff2e | R | 7,110 | 114 | ##This is the main script for running the simulations for training the neural network for the OnePulse model
##Software and packages needed:
## (i) Slim as a module of the cluster
## (ii) R and packages ggplot2, gridExtra and truncnorm
#### On HPC runs on anaconda3/personal. Need to run: module load anaconda3/personal... |
93641811391728b37b19a0f12890f0893b9824e48a93a8cfa476fc6c282b605d | R | 7,112 | 157 | ### Visualize expression of IHC-matched and neuronal genes via sparklines in MENs/NENs/glia
### Visualize expression of neuronal marker genes in MENs/NENs/glia
library(SingleCellExperiment)
library(monocle3)
library(here)
library(dplyr)
library(ggplot2)
library(stringr)
library(purrr)
source(here("scripts/accessory_fu... |
32c7d02dedb23638bb0223ea198c38f38e57777c2c27df7cba8e69be3179cddc | R | 7,115 | 223 | ##############################################
# LC project
# Script to plot enrichment of LC marker genes
# Lukas Weber, Jun 2022
##############################################
# marker genes for 5-HT neurons
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD... |
2f6eb7a42420a2364e27c015028e11964641ea98f2e1ed0b789852e8f6b9f369 | R | 7,125 | 220 | ---
title: "balloon plot combined datasets"
author: "Hao Huang"
date: "25/10/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
---
title: "Figure 2 barplot"
author: "Hao Huang"
date: '2022-09-08'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$... |
8f8a02687a59e5d363401a57e6bc53720e1e11b1f6c140acd6a4e08b18491624 | R | 7,126 | 149 | source("src/lib/CHEX.R")
source("src/lib/Repo.R")
source("src/lib/NGS.R")
SampleInfo <- read.csv("data/SampleInfo.csv", as.is = TRUE, check.names = FALSE)
sampleIDs <- SampleInfo$SampleID
cat(sampleIDs, file = "data/sampleIDs.txt", sep = "\n")
bioGroups <- c(
"K562", "K562TPAnone", "K562TPA15min", "K562TPA1hr", "... |
c2677ab25086457e47fd99b0d4056f7e134cdf8dfaabe777cc0467a466c2835b | R | 7,134 | 218 | ##--------------------------------------------------------------------------------------##
## This file contains methods definitions for rowttests, colttest, rowFtests, colFtests ##
##--------------------------------------------------------------------------------------##
# copyright, Bioconductor's genefilter
# chang... |
f8bef67a8c6ce0d4bc885f13faa1c5aa7f9df6fbd73ee40a5d11127911cc2e63 | R | 7,136 | 166 | ## 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)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, sp... |
a0fcc58f06bde62475fda258d52b5cdb861b464b41058c1b087b6c4ff715d796 | R | 7,137 | 166 | ## 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)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, sp... |
5c68bd0714ffe0593d21ab39dfe185f2f68a73124a811da30bec390ad26b16c1 | R | 7,146 | 177 | library(ggplot2)
library(tidyverse)
# Read the data
Data = read.csv('G:/Dropbox (Personal)/Brain/Project/AllDataOnset+5with200mSecBins.csv')
df <- Data
df$SessionType <- as.factor(df$SessionType)
df$Cell <- as.factor(df$Valid)
head(df)
df2 = filter(df,Valid == TRUE & (Animal=='bk35' |Animal=='bk41' | Anim... |
8e3c77a3dca95e9b86ad1f84adc9e2720f144f0bf30dff103f69babbeac1dce7 | R | 7,146 | 223 | #' Function to process GFF files
#'
#' @param gff sorted GFF file (e.g., output from MAKER), or CSV file
#' @param bamfile path to a BAM file (must be a bam BAI index file in same dir)
#' @param ref path to reference genome in fasta format
#'
#' @export
#'
#' Outputs: CDS from BAM files
#'
#' @examples \dontrun{
#'... |
e9ff1eb492deecdb868875bc87f4feab86319a1244ee6eb10a01ffa0cf903b28 | R | 7,163 | 175 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters = d... |
c11430962387e2229db7d354d1bd00ee9a256a55165097e72028043fd64b16f1 | R | 7,164 | 185 | #' Run the Shiny app to interactively explore cell-cell interactions.
#'
#' @param INX The list containing edgelist and node metadata as generated by
#' \code{\link{BuildCCInx}}.
#' @param includeHeadHTML Default=NA. If you'd like an HTML script to be included
#' the webpage <head> section (such as the Google Analy... |
6057ccd5ccbecb1b22c53ae432f2388dcb825883490031b3b01d8c1f01130426 | R | 7,167 | 194 | # BiRewire
library(BiRewire)
data1 <- as.matrix(read.table("tmp.inp1"))
data2 <- as.matrix(read.table("tmp.inp2"))
data3 <- as.matrix(read.table("tmp.inp3"))
diag(data1) <- 0
diag(data2) <- 0
diag(data3) <- 0
cons3 <- (data1 + data2 + data3) == 3
result.rand3 <- matrix(0, ncol=ncol(data1), nrow=nrow(data1))
idx... |
79f7067375c6d399797eca51b13775477baabf70c2c07caf5ae3b6055c84f75d | R | 7,171 | 175 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters = d... |
9c8a8e501f1d4614e3f8d324a3f08d7a5e9346454dec8fa4cdcd2badca0f3a73 | R | 7,173 | 175 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters = d... |
ebcbfb9f3eec090e625d13a1b097bb510e7e968d80e8398dd2d7a4d1e0fe7c2c | R | 7,197 | 165 | #' Transform 'QIIME' results to 'microtable' object.
#'
#' @description
#' Transform 'QIIME' results to microtable object.
#' The QIIME results refer in particular to the files of qiime1 software.
#'
#' @param feature_table the otu table generated from 'QIIME'. Taxonomic information should be in the end of the file.
... |
7c0af896783b27a995d92c4f7e884f6acc99805d75729c80b3fef4f45bb7a1c8 | R | 7,199 | 183 | rm(list = ls())
## Check which modules are loaded
.libPaths(c('/ncf/hcp/data/analyses/myelin/verse-cmdstan-container', .libPaths()))
.libPaths()
# R Setup ----
library(brms)
library(data.table)
library(ggplot2)
library(readr)
library(future)
## Set working directory to where model outputs are generated
setwd('/ncf/h... |
ed8db1cabf0fc6bdf11c0611461dbb26e9ee86917e7d7f50632dbcee14104a60 | R | 7,202 | 167 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(RColorBrewer)
library(rcartocolor)
library(ggpubr)
## statistical analyses
library(tidymodels)
library(lme4)
library(broom.mixed)
library(lmerTest)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x,... |
3c378fb620ccd91d6213760ddd443c6ec5f44e521493093f96d10d2e21b6f464 | R | 7,231 | 179 | #############################################################
# Test for single granlarity
# Note: BSP uses paired granularities
#############################################################
InputPath <- "../Data\\Single_Granular_Test\\P_value\\"
InputPath_Default <- "../Data\\Diff_Granular\\"
InputFiles <- lis... |
3de80df940bf90ee1a94a4be3f8e2482b6ffb7b594e2ddf2cd309cd47d7e6d85 | R | 7,244 | 229 | #########################################
# LC analyses: enrichment of marker genes
# Lukas Weber, Oct 2022
#########################################
# module load conda_R/4.2
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/
library(SpatialExperiment)
library(here)
library(... |
5242bc780f53e40fdc50e83858bd1064dc120de9b8ef98bc1c28b07100776847 | R | 7,245 | 175 | #' @title Differential Expression Analysis
#' @description Differential Expression Analysis. Compute gene-level fold changes and (adjusted) p-values between cell clusters of an expression matrix.
#' @param m numeric matrix. The matrix should not contain NA values.
#' @param group the group to be tested. It should be a ... |
1ce1307b08a5fd09a83f8087c0a160901324d4877df7b1725f3545d7ea1ca31d | R | 7,258 | 179 | ---
title: "Setting1_marker_reproducibility"
author: "Hao Huang"
date: "14/11/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(tidyverse)
library(dplyr)
... |
85ee6121b1ac014e8b8455f3e02fcacde3f9951b282a9ed11e507fcd13fa3b5e | R | 7,263 | 268 | ##################################################################
# 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 -... |
e839d52d0f0f30ae48a546d60efd462f8536f51c22d26fde656b736fc6886293 | R | 7,270 | 205 | # import libraries
library(Seurat)
library(dplyr)
library(tidyr)
library(ggplot2)
#library(tidyverse)
library(Matrix)
library(ggplot2)
#library(ggpubr)
#library(clustree)
#library(dendextend)
#library(randomForest)
library(biomaRt)
#library(circlize)
#library(rjson)
library(ComplexHeatmap)
library(readx... |
7973ecd96a657596051188a0ae372a1c0cb7813c8d047cd349de81d7bb366a7c | R | 7,274 | 178 | #library(formattable)
#update from 4.23.21 version: add:
#add covariates: severity_of_covid_19_v2, der_her2, der_cdk46i, der_txline,der_tr_intent
#add (table2): COVID19 therapy
#5.13.21: use updated dataset: Tab12_5.6.21.v2: collapse unknown/missing categories for der_tr_intent
#6.16.21: use June data
#6.23.21: input d... |
2c63f5e2f701a1aa2b7f12fdae11909fde513c4dce2c5a0d224893766167ce09 | R | 7,276 | 166 | # Gregory Way 2017
# PanCancer Classifier
# scripts/viz/braf_summary_figures.R
#
# Visualize summary for Ras Classifier Scores applied to BRAFV600E mutations
#
# Usage: Run by assigning where the within classifier summary is and where the
# Pan Cancer classifier summary is
#
# Rscript --vanilla scripts/viz/b... |
71721888263715059e069dcd5d21460995e3ee50aa8089208108bbf43e7b42ed | R | 7,283 | 146 | #' Set Operations for MAF objects
#' @param x the first `MAF` object.
#' @param y the second `MAF` object.
#' @param mafObj Return output as an `MAF` object. Default `TRUE`
#' @param refAltMatch Set operations are done by matching ref and alt alleles in addition to loci (Default). If FALSE only loci (chr, start, end po... |
1654ca237ef01a4455720ddbbc4494255a43d869a7f29abb747c0bef79359351 | R | 7,289 | 141 | .check_missing <- function(Group, ref) {
# all values in x should be in bins.
if (is.numeric(ref)) ref = names(ref)
are_missing = !Group %in% ref
err = 'Error: Returning missing name(s)...'
if (any(are_missing)) {
missing = Group[are_missing]
warning(cat(c(err, missing), sep = '\n'))
... |
74490f889ac90bb956be66e42e3472fc10a3ec5fa0c663c777d09a8b64e96fb8 | R | 7,290 | 221 | # * plot entropy vs sparseness
# will detect all the modules in the given directory.
library(ggplot2)
library(optparse)
packdir <- file.path(here::here(), "package/R")
import::from(.from = "utils.R", .directory = packdir,
checkArgsExistOrStop, prepareOutdir)
op <- list(
make_option(c("--nmfDir"), type = "characte... |
864618ee1ac8caf518a22f58e226163f309f94ceecf47ecd876be6bd49705c1b | R | 7,290 | 174 | ---
title: "R Notebook"
output: html_notebook
---
```{r}
library(ggplot2)
library(pheatmap)
library(RColorBrewer)
#display.brewer.all()
library(tidyverse)
library(ggpubr)
library(ggsignif)
library(openxlsx)
library(viridis)
library(data.table)
library(readxl)
library(janitor)
library(dplyr)
library(jcolors)
library(st... |
b1c80b133ec93658d1d72ed6132658dd5fc873943b2819d5b316934335ec5159 | R | 7,312 | 199 | ##' InteNet
##'
##' @title Integrate network data from single-cell RNA-seq and ATAC-seq
##'
##' @description
##' For the SNARE-seq dataset, a droplet-based method to simultaneously profile gene expression and chromatin accessibility in each of thousands of single nuclei,
##' the \code{InteNet} function can integr... |
ceb093e40f706441d9089d47e312f7919faa990916f4cd948b64dc8f1ba9831b | R | 7,312 | 188 | # Apply the bilateral model to each hemisphere and summarise the analysed sample.
args <- commandArgs(FALSE)
file_arg <- args[grepl("^--file=", args)]
this_file <- if (length(file_arg) > 0) sub("^--file=", "", file_arg[1]) else "scripts/05_unilateral_sensitivity_and_descriptives.R"
this_file <- gsub("~+~", " ", this_fi... |
704ee283e3c39c9205b3f339434adbd40a1320a559ece4c539aa52d9f4f68e5a | R | 7,316 | 200 | ## 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... |
087b6852d39796bc4ba59b67bc0ce0131194584b7d5e8d214f21b49e4d9c7c34 | R | 7,318 | 151 | #' Query DisGeNET for given disease(s) and generates an \code{molecularComorbidity}
#' object for comorbidity analysis
#'
#' Given a file with diseases, a comorbidity analysis is perform according to
#' the genes shared between the diseases. The comorbidity analysis can be performed
#' at cui level or in a higher categ... |
9602af61d21fdaf90f30b7beef40d45df24c801861ba70bbb1bba8a00deb31d5 | R | 7,336 | 178 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters = d... |
408a995021449670bb3b95197fc29bf942a5035b8fe51c669710eb79761c3854 | R | 7,341 | 221 | # * plot entropy vs sparseness
# will detect all the modules in the given directory.
library(ggplot2)
library(optparse)
packdir <- file.path(here::here(), "package/R")
import::from(.from = "utils.R", .directory = packdir,
checkArgsExistOrStop, prepareOutdir)
op <- list(
make_option(c("--nmfDir"), type = "characte... |
85d3dfdcf1ebf2867f78e30d40abf652c9e1af41b0808e483924994108ce0d77 | R | 7,363 | 179 | # Comparing NF1 classification performance using various feature encodings
# determined by different dimensionality reduction algorithms
# Gregory Way 2017
#
# Output:
# ROC curves for predicting NF1 inactivation status (mutation or deep copy
# number loss) using different features
library(dplyr)
library(ggplot2)
sou... |
407411d52e96963d87b0750e1f0bfc645086ee95119be301149196f92ac7a849 | R | 7,364 | 178 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters =... |
27ec5c1dbd7e654c6eccf2ad714650fae00e394ae6cc66f528b7d88972aaf358 | R | 7,365 | 168 | library(lavaan)
library(dplyr)
run.single.mediation = function(dataframe, independent, dependent, mediators, covariates) {
results.list = list()
effects =
"de := c
ie := a*b
te := c + a*b
pm := (a*b) / (c+a*b)"
covariates = paste(covariates,collapse=" + ")
for(mediator in mediators) {
med.model = ... |
1bbd52924878624d738299bc4bd6796d5aa120b86433a1c67dcf99e79aad083a | R | 7,376 | 184 |
##############CHECK##############
#Comparison:Control VS IL10 : Update your script name and comparison here + Double check the folder you are in to aviod mixing diff ex results!
rm(list = ls())
dev.off()
cat("\014")
##############CHECK##############
setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo... |
0060052ff612be9bc4f7305ba183291b28e37f21ba66f68294bf51cf9167d576 | R | 7,377 | 185 |
##############CHECK##############
#Comparison:Control VS TGFB : Update your script name and comparison here + Double check the folder you are in to aviod mixing diff ex results!
rm(list = ls())
dev.off()
cat("\014")
##############CHECK##############
setwd("/Users/adityanatu/Library/Mobile Documents/com~apple~CloudDo... |
ba6b9d6fc5b064ab0bbfd769f8a8dbebda08356aee6337f9c5017580b39a9c74 | R | 7,394 | 174 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(tidyverse)
library(broom)
library(rcartocolor)
library(ggsci)
## main Seurat package snRNA-seq pacakges
library(SingleCellExper... |
2fcb5b7454214313c4ffec42d0b0f95c6666de072c5df7828da6e84b94466d9d | R | 7,412 | 176 | # Load library
library(openxlsx)
library(svDialogs)
library(data.table)
library(caret)
library(dplyr)
library(purrr)
library(doMC)
library(ROCit)
#-------------------------------------------------------------------------------
# Read data excel file
DataFile <- dlg_open(title = "Select excel data file:", filters = d... |
26ab7beac28b1c402461866a92f1c107de9921a4dde6159b4908b1177d89e9c9 | R | 7,440 | 203 | #' Check Set Labels
#'
#' Argument checking to make sure there are labels for each data set.
#' @param set Set filename
#' @param setlabels Lables for items in set filename
#'
npointCheckSetLabels <- function(set, setlabels) {
if((!is.null(set) & is.null(setlabels)) ||
(is.null(set) & !is.null(setlabels))) ... |
36032b8baf5681d612b3764e09ca46578d74d2b7d7ed64505ccba7c73be85e24 | R | 7,447 | 218 |
.limit <- function(v) {
m = 10
Sign = sign(v)
v = abs(v)
v.lim = Sign * (floor(m * v) / m)
return(v.lim)
}
.limits <- function(v, symmetric = TRUE) {
stopifnot(length(v) == 2, all(sapply(v, class) == 'numeric'))
if (!symmetric) {
return(sapply(v, .limit))
}
limit... |
8bb7187360d05eb42a85a42c1fb6ed1871bdc06fd063fa3ad02e2189d1862e60 | R | 7,454 | 226 | ---
title: "6mo LMMP pattern identification"
author: "Jared Slosberg"
date: "9/9/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message = F, results="hide"}
library(monocle3)
library(ggplot2)
library(ggpubr)
library(dplyr)
library(ComplexHeatmap)
library(html... |
2781f13f1c53494f555adac403bd3e73ce5932808f85618a218a676ba3e2c4a4 | R | 7,455 | 183 | # Gregory Way 2017
# PanCancer Classifier
# pancancer_util.R
#
# Custom ggplot themes, function to extract info from a classifier summary
# file, and several helper functions for plotting.
#
# Usage: sourced by scripts using function
library(ggplot2)
# ggplot2 themes to be used in various contexts
base_theme <- ggplo... |
4b0386fe034e8610f6b1a1bcd6ec2a8bda553fb87b99a71040416de4538e0da2 | R | 7,480 | 231 | # This code is to plot the distribution of metabolites in Sub3
# WANG. 28-April-2023
# Set the working directory to the path where your files are located
setwd("/Users/wang/Desktop/Research_projects/BBSC/MRS/Output_v2_4/QuantifyResults")
# install and load the raincloudplots packages
# if (!require(remotes)) {
# ... |
ed8450ca564b6396bcdc354f5037f94509dca279ec8f85609db904528ba9387b | R | 7,493 | 230 | ---
title: "Setting2 balloonplot"
author: "Hao Huang"
date: "02/11/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## load packages
```{r}
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(caret)
library(kknn)
library... |
07e80fb94231ccca35f061465ba56c2f7c372bc1bb533e7a881dd763868115be | R | 7,519 | 172 | diagonal_contactMatrix <- function(track, shuffled_track, v_scoreTracks, filter_value, interval, expand, expand_res, min_dist, max_dist,regularization=30,interval_name=NULL,consider_strand=FALSE,track_db=trackdb,tss=tss_f){
expand1 <- expand
expand2 <- expand
o = matrix(0, nrow=length(expand1)-1, ncol=length(expand2... |
de4b73c51dbf4789843f36584af804e12de4cdc08078b18bb57d79a310538f0f | R | 7,524 | 172 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(tidyverse)
library(ComplexHeatmap)
library(rcartocolor)
library(ggsci)
## main Seurat package snRNA-seq pacakges
library(Seurat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.