sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
5bd725fa16e246271fda013cb2085e73f128d1f5bd6e1ca8d9cae431ffd6011a | R | 16,772 | 420 | # This function copy from https://github.com/satijalab/seurat/issues/2201.
suppressPackageStartupMessages({
library(rlang)
library(grid)
library(ComplexHeatmap)
library(circlize)
})
DoMultiBarHeatmap <- function(object,
features = NULL,
cells... |
7f353580943d3db31fb28adf53a9297812288ccd75ba9c891498d29979d4d1cf | R | 16,792 | 314 | #' Function to find heuristically maximum scoring subgraph
#'
#' \code{oNetFind} is supposed to find the maximum scoring subgraph from an input graph and scores imposed on its nodes. The input graph and the output subgraph are both of "igraph" or "graphNET" object. The input scores imposed on the nodes in the input gra... |
ffeaa13cea79e9ff6a588c94d7240645daad59682582f7b3403c335e60c3b9e1 | R | 16,798 | 428 | ## gNFI KO ##
library(Seurat)
library(ggplot2)
library(pals)
library(patchwork)
library(dplyr)
library(tidyr)
library(ggrepel)
library(pheatmap)
library(gridExtra)
library(RColorBrewer)
library(ggvenn)
library(ComplexHeatmap)
library(circlize)
library(stringr)
library(ggsignif)
library(ggpubr)
## load objects:
gNFI_s... |
e6a16fda8806e7dd500fc45b309668c0b165f4b03a15a7f3d1514c796b4ff1d4 | R | 16,816 | 414 | #packages, functions and CATMAID connectivity info used for the figures of the Platynereis 3d connectome paper
rm(list = ls(all.names = TRUE)) #will clear all objects includes hidden objects.
gc() #free up memory and report the memory usage.
#create directory for R-generated pictures for figure panels (ignored by git... |
c8a5f0d216d933c4b496a4581b7bb9b6d2914e143c1ccdf436ad82751a058819 | R | 16,866 | 419 | ## st_profiling.R
## Aunoy Poddar
## 06/08/2022
## Script adapted from st_profiling notebook to generate the plots of interest
## ------------------------------------------------------------------------------------------------------------------------------------------
library(Seurat)
library(tictoc)
library(ggplot2)
l... |
03f497a9497186c1507494462603f93bb75dec53ba1f9fe3e4d32021b1f4c07e | R | 16,978 | 287 | ###########################
#I/O
###########################
library(tidyverse)
library(ggplot2)
library(Seurat)
library(fgsea)
library(pheatmap)
library(cowplot)
library(patchwork)
library(scCustomize)
library(CellChat)
library(msigdbr)
library(org.Hs.eg.db)
library(readxl)
library(openxlsx)
library(ggrepel)
library(g... |
ca42b6c59ac1750de95ce0f7885f58bfdcf56d33156acce0ad11023f4dd43336 | R | 17,040 | 657 | ---
title: "Inspect profiles"
author: "Shantanu Singh"
date: "Nov 2020"
---
## Load libraries
```{r message=FALSE}
library(ggplot2)
library(glue)
library(magrittr)
library(tidyverse)
```
```{r}
simple_aggregate <- function(population, variables, strata, operation="mean") {
population %>%
dplyr::group_by_at(.v... |
8bb2fbf8e79dcbca4ef9a39dc6f4e28e27e50b37d45a1c7a96a06224b5f01e04 | R | 17,111 | 479 | #This code was used to generate the matrix sowing connectivity by segment and cell type
#Gaspar Jekely 2021 Jan
rm(list = ls(all.names = TRUE)) #will clear all objects includes hidden objects.
gc() #free up memrory and report the memory usage.
Sys.setenv('R_MAX_VSIZE'=8000000000)
options(timeout = 4000000)
# load na... |
a4bf4c32ca378bcb23c43be5776cfacd57b6e3d4eda027df7d26faaec7760520 | R | 17,236 | 453 | #' Propensity function for "S"tem cells and 2 different mature cells (Type 1 and Type 2)
#'
#' This function computes the propensities for a linear, hierarchical system of cell division, death and differentiation
#' @param cell.count a vector with cell numbers (S, T1, T2)
#' @param parms a named parameter vector conta... |
0c5e25eaf9026074e271533c51bdc84235a20a9be60f953f8c302b78988e5deb | R | 17,413 | 516 | ### Influences of diet quality, nursery-habitat complexity and sex on brain development and cognitive performance of brown trout (Salmo trutta, L.) ####
library(devtools)
library(ggplot2)
library(ggbiplot)
# load data
data <- read.csv("Trout_data.csv", header = T)
str(data)
summary(data)
############################... |
4f44640462918b2177f12f70761ce4cc27961dec4fc49424c0b663f08e639101 | R | 17,438 | 382 | #### load packages ####
targetPackages <- c('tidyverse','data.table','slider','gtools','sf','arrow')
newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])]
if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org")
for(package in targetPackages) library... |
8953edb3dfad09ad1910f1d9fc67c96604b50ee8ec25e7ed25045402734b2265 | R | 17,676 | 530 | # R/natverse code to generate Figure 15 for the Platynereis 3d connectome paper
# Gaspar Jekely Feb-Dec 2022
# load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
# read neurons from CATMAID --------------------------------------... |
520b61c6171dbc2bc88524c7cfc6175ab772d41bcc8db6a0344792ba425665f1 | R | 17,749 | 306 | library(tidyverse)
library(ggplot2)
library(Seurat)
options(Seurat.object.assay.version = "v3")
# library(msigdbr)
# library(clusterProfiler)
# library(org.Hs.eg.db)
# library(DOSE)
# library(enrichplot)
# library(limma)
# library(gplots)
# library(marray)
# library(RMySQL)
# library(stringr)
# library(reshape2)
# libr... |
6765275912c52e29bbab10acdedc5f520909fd64d3ab3169ddbb460f03656f49 | R | 17,811 | 368 | #### load packages ####
targetPackages <- c('tidyverse','arrow','car','lme4','lmerTest','ggpmisc','patchwork')
newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])]
if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org")
for(package in targetPackage... |
99c06f711e5f371a1104b4a0cf75b34ec88b6152f0410f6dd137c70e9bb02e97 | R | 18,019 | 413 | # load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
# load and plot neuron groups ---------------------------------------------
# load stomodeum and MB cells as reference
stomodeum <- nlapply(
read.neurons.catmaid("stomodeum",... |
2adc5a93eae3a847f9c50b73f0d3a84bd504933ff18e619a541bed8458bc98a4 | R | 18,801 | 277 | #' Function to identify a subnetwork from an input network and the signficance level imposed on its nodes
#'
#' \code{oSubneterGenes} is supposed to identify maximum-scoring subnetwork from an input graph with the node information on the significance (measured as p-values or fdr). It returns an object of class "igraph"... |
389e00f23daa5630665970c413f84238b1e4b76a310f078a7d52322506bfbda6 | R | 18,875 | 417 | # Supplemental table 1 of the Platynereis 3d connectome paper
# retrieve cell types connectivity matrix, list the number of cells per celltype, name, annotation
# and main pre and postsynaptic partners
# load packages, functions and catmaid connectivity
source("code/Natverse_functions_and_conn.R")
# retrieve skids
# ... |
bdea82d84815142703009f6f2ef0e29cfe013680ad2e0c77a9900c2943d6a39a | R | 18,901 | 539 | suppressMessages(library(reticulate))
suppressMessages(library(Seurat))
suppressMessages(library(SeuratDisk))
suppressMessages(library(SeuratData))
suppressMessages(library(Matrix))
suppressMessages(library(SeuratWrappers))
suppressMessages(library(monocle3))
suppressMessages(library(patchwork))
#---------------------... |
88e2029b235ff2469af1b4fbb4a0d3392cf06f65932027617a3a6c291b0f50b4 | R | 18,979 | 450 | #' Function to extract priority or evidence matrix from a list of pNode objects
#'
#' \code{oPierMatrix} is supposed to extract priority or evidence matrix from a list of pNode objects. Also supported is the aggregation of priority matrix (similar to the meta-analysis) generating the priority results; we view this func... |
59688e9982c3e1b12fe036c93665f5411cab79ad74cdb79557a2d74f3d0a0cb2 | R | 19,241 | 511 | #' Extracts information from a vcf file.
#'
#' @param vcf Mutation information in VCF format represented as a list (as returned by read.vcf from package bedR).
#' @param info Variant information to be retrieved. Possible values are
#' \describe{
#' \item{`readcounts`}{ returns the number of reference and variant reads... |
f138c634573cca7f9720cba4b229378b8163d0d713d93820d109198521b78e5d | R | 19,267 | 611 | ---
title: "STUtility analysis of melanoma metastases"
author: "Jana"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, quiet=TRUE)
knitr::opts_knit$set(root.dir = '/home/rstudio/')
source('/home/rstudio/mod/bin/utils.R',
local = TRUE
)
```
```{r, include=FALSE}
... |
fc0d46be13ec81ab648cfdfe2d392a7fc19051cff1ea1d1f8c18fbbb6ffc8e2b | R | 19,303 | 488 | #packages, functions and CATMAID connectivity info used for the figures of the Platynereis 3d connectome paper
rm(list = ls(all.names = TRUE)) #will clear all objects includes hidden objects.
gc() #free up memory and report the memory usage.
Sys.setenv('R_MAX_VSIZE'=8000000000)
#create directory for R-generated pictu... |
63507a22b2bb34878b0c4746463e681f88815562596ee6fb4179d6f5e496882c | R | 19,409 | 477 | #code to generate Figure14 figure supplement 1 of the Platynereis 3d connectome paper
#Gaspar Jekely Feb-Dec 2022
#load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
#read neuron groups
{
doCRunp = nlapply(read.neurons.catmaid... |
94bbd735d68e23586881042e483abdc79e7b367f26f8620c2ca35bdd31e95e0b | R | 19,435 | 411 | #### load packages ####
targetPackages <- c('tidyverse','gtools','ggpubr','arrow','patchwork')
newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])]
if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org")
for(package in targetPackages) library(packa... |
4ad4899d2cf9deed4a32627c0288c98d47b99866d1a9241946c373352b7dd9ed | R | 19,441 | 349 | ----------------------
Perform Analysis of Cell Phone DB Results of Astro_0 vs Astro_2 DE Genes
----------------------
```{r libraries and functions, message=FALSE}
library(Seurat)
library(tidyverse)
library(dplyr)
library(magrittr)
#library(liana)
library(circlize)
library(Matrix)
source("~/OHSU Dropbox/Saunders L... |
757a22f203f1664806bf4ef7e493fb7b93ebab030239a17585a8b1b8ed074418 | R | 19,477 | 347 | ----------------------
Setup / Generate Astro Subclusters
----------------------
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(Seurat)
library(Matrix)
library(qs)
library(data.table)
library(cowplot)
source("~/OHSU Dropbox/Saunders Lab's shared workspace/arpy/manuscripts/2023_Thai2P4M_Feig... |
164dfefa32968714fe8725f08f1b1208e8da05296cfd3f699cc688d74981c793 | R | 19,812 | 458 |
#### Analysis of neuronal activity patterns
# Use the "GSVA" package to investigate the pathways enriched by each cluster.
# This may help identify differential phenotypes associated with the neuronal activity patterns clusters,
# Aim : thereby determining which pathways each neuronal activity patterns enriches.
# ... |
eed67d49ce69cbf0be56f52e313ad7d47e867abce96176b9082e77c77120fd3b | R | 19,846 | 305 | ---
title: "DNA methylation over L1s"
output: html_notebook
---
# >6kbp L1HS-L1PA4 promoter methylation
## Read data
Format to have type (hiPS/organoid), cell line, coordinates from region in question, and chromosomes (1:22, X, Y)
```{r}
library(ggplot2)
library(stringr)
library(data.table)
library(tidyverse)
librar... |
8f4b20087df532dee78354dbabc24392c946b921b22dad2b50497beefc2daa66 | R | 20,119 | 355 | ---
title: "ClusterFoldSimilarity: comparing cell-groups from independent single-cell experiments"
author:
- name: Óscar González-Velasco
affiliation: Division of Applied Bioinformatics, German Cancer Research Center DKFZ
package: ClusterFoldSimilarity
output:
BiocStyle::html_document:
toc_float: true
vignett... |
02e412ff007b5cb1ba51904c12f614421ce3fa98f2bdee7fc51f2568a33a5a16 | R | 20,232 | 811 | ---
title: "stats"
author: "Jake Russin"
date: "2025-04-29"
output: html_document
---
Import required libraries
```{r}
library(readr)
library(dplyr)
library(car)
library(ggplot2)
library(stringr)
```
# Category-learning task
## Load data
Load csv
```{r}
# Define the path to the CSV file
file_path <- "category_icl_i... |
327f3b2bf26b478d7da8fabe19724165cbcaff99b5c94ae93ae99bcf71214e8d | R | 20,412 | 620 | ---
title: "Fig2_WGCNA"
output: html_notebook
---
# Details
Aunoy Poddar
July 16th, 2024
This notebook will generate the figures used for Kim et al 2024.
```{r setup}
require(knitr)
#opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
```
```{r eval=FALSE}
current_file <- rstudioapi::getActiveDocumentConte... |
7a55b3dff9087fb06ea3f2372c744f5e6360e0ba4038133ed838359fa994e03f | R | 20,414 | 410 | ---
title: "SC3 package manual"
author: "Vladimir Kiselev"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc: true
vignette: >
%\VignetteIndexEntry{SC3 package manual}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
```{r knitr-options, echo=FALSE, message=FALSE, warning... |
bad23f5f65555ef2d879cbb834fca95e8b37986c4fce5b09880ce4564792a3f7 | R | 20,513 | 472 | ################################################################################
# Written by Loïc Labache, Ph.D.
# Holmes Lab Department of Psychology - Yale University
# December 6, 2023
################################################################################
# open libraries
#..............#
packages <- c("... |
aec27a9ed9e993d0d91ec2d9ea1be45d5c01cd30bef2df4c5b7739d8533776c0 | R | 20,540 | 386 | ---
title: "Seurat Microglia Basics Plotting"
author: "Arpy"
date: '2024-11-12'
output: html_document
---
Neuron and Astrocyte Cytokine/Chemokine Production
Gregory C. 04/2025
```{r load libraries and source, echo = F}
library(tidyverse)
library(Seurat)
library(Libra)
library(patchwork)
source("/Users/chingr/OHSU Dr... |
4583fc4f24ef304fe57b5d7791305c508c7e7657a3b149fceec3e077a08c8a8a | R | 20,837 | 493 | rm(list = ls())
library("bayesplot")
library("rstanarm")
library("lme4")
library("dplyr")
library("ggplot2")
library("lmerTest")
library('gridExtra')
library('tidyr')
library('ggdist')
library('see')
library('bayesplot')
library('gridExtra')
library('grid')
library('gtable')
library('HDInterval')
librar... |
c65272f2acd03c5c08f57198ff1988b31eb01f0e84b4090326b8740d468bd0c7 | R | 20,851 | 663 | #*******************************************************************************
# Filename : discretizeMutual.R
#
# Description: Optimal discretization to compute (conditional) mutual
# information
#*******************************************************************************
#=======================... |
65364047aafa7476704494e6477f1d5ac65bb42e2aed86ec703f4f1ac00a9708 | R | 20,857 | 600 | library(tidyverse)
library(GenomicRanges)
library(ComplexUpset)
library(dplyr)
library(ggplot2)
file_paths <- list(
LANCEOTRON = Sys.glob("~/Downloads/Transfers/results_2/LANCEOTRON/*H3K*_R*.bed"),
MACS2 = c(
Sys.glob("~/Downloads/Transfers/results_2/MACS2/*H3K27me3*_R*.broadPeak"),
Sys.glob("~/Downloads/... |
ec4feaacdd398ea9916ef1807f05e59108ca9c40b1d93d8115ad889241fbb97e | R | 20,920 | 484 | # load packages
library(MEAanalysis)
library(psych)
####################################################################################################################
# Script to calculate well ICC for baseline time period
##############################################################################################... |
eabf5fda1d010451a96fb667aec2211cec6f400e65ef2d74850220768b0f58c7 | R | 20,989 | 585 | # Plotter for paired and jitter group plots
# Author: David Young, 2018, 2019
kSummaryStats <- c("mean.ci", "boxplot")
jitterPlot <- function(df.region, col, title, group.col=NULL,
split.by.subgroup=TRUE, split.col=NULL,
paired=FALSE, show.sample.legend=FALSE,
... |
aea990e5166d8c0c9c20a693ea5c33a631df038d074654c047e407e5bc12a5cd | R | 21,042 | 507 | ---
title: "Tutorial on sBLISS Downstream Analysis (mouse)"
# author: Federico Agostini
output:
github_document:
html_preview: false
fig_width: 6
fig_height: 6
dev: jpeg
pandoc_args: [
"--output=README_mouse.md"
]
---
```{r setupEnv, include=FALSE}
wo... |
6868102be851e13eeaf52119673c512e2099dd8011b405f2ae80cc01dc787364 | R | 21,104 | 486 | #*******************************************************************************
# Filename : parseResults.R
#
# Description: produce a summary by post-processing the miic C++ output
#*******************************************************************************
#----------------------------------------------------... |
9d34b6a01a9c1eb300e9d50dcf473181cc183c7b62b371307f4c4d83bf8cf66d | R | 21,134 | 497 |
##### Enrichment Analysis Approaches ######
# A. The Over Representation Analysis (ORA) is approach to determine weather
# biological functions or processes are over-represented ( i.e. enriched )
# given a list of differentially expressed genes (DEGs) [ not ordered list ].
#
# B. Gene Set Enrichment Analysis (GSEA) ... |
564502e18a52701fe5384066b6f3ef671f4b7c932334dba3744c6347254d55af | R | 21,137 | 476 | tcrSubgroupsTrend <- function(obj.merged.sc, permu = 100) {
obj <- subset(obj.merged.sc, (tcr == 1) & (Anno.Level.Fig.1 %in% ANNO_ENTIRE_IDNET_FIG1[17:33]))
obj.1 <- tcrSubgroup1(obj, trd.cut = 1) %>% subset(., trb != "")
tcr.subtypes <- c("TRA-TRB+TRD+", "TRA+TRB+TRD+", "TRA-TRB+TRD-", "TRA+TRB+TRD-")
... |
2d9e0be32abd3a283e316ef59ae842ad0de0d5d4f062ddb17dfd4e1ff1849328 | R | 21,141 | 683 | # R code to generate Figure 10 fig suppl of the 3d Platynereis connectome paper
# Gaspar Jekely 2023
# load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
#import data of radial density of input and iutput synapses --------------... |
931b7adcd1da99b122f879424d4bbe3c839e6635c68eca73e33a6c22863ac0c9 | R | 21,141 | 541 | #' Propensity function for 2 compartments ("S"tem cells and "P"rogenitors)
#'
#' This function computes the propensities for a linear, hierarchical system of cell division, death and differentiation
#' @param cell.count a vector with cell numbers (S, P)
#' @param parms a named parameter vector containing the rates of ... |
3616cc1a21e020db4e7e037b4bf7b647b0e484fa69c08a53cc00c7dd403680ad | R | 21,216 | 431 | suppressMessages(library(Seurat))
suppressMessages(library(dplyr))
suppressMessages(library(tidyr))
suppressMessages(library(caTools))
suppressMessages(library(ROGUE))
suppressMessages(library(colorRamps))
suppressMessages(library(tidyverse))
suppressMessages(library(ape))
suppressMessages(library(ggtree))
#----------... |
36fc49063d4948999a21abb40245473c2c447fd4c1aa47331d2e92a3e1e1b533 | R | 21,217 | 521 | ---
title: "st_164"
output: html_notebook
---
Written by Aunoy Poddar
July 21st, 2022
# Process the puncta quantified raw data
```{r eval=FALSE}
current_file <- rstudioapi::getActiveDocumentContext()$path
output_file <- stringr::str_replace(current_file, '.Rmd', '.R')
knitr::purl(current_file, output = output_file)
f... |
bcf765b95f481988e93effe7a5a043275ba2f9fccb2b08b78de5da4af6e77d92 | R | 21,218 | 542 | CheckBindName <- function(object,
bind.name,
assay = NULL)
{
old.assay <- DefaultAssay(object)
assay <- assay %||% old.assay
DefaultAssay(object) <- assay
meta <- object[[assay]][[]]
if (bind.name %ni% colnames(meta)) {
stop("No bind.name found at me... |
84e61940cecc26ca241e00d7fd8ac8766bce979e5a1c0325898ff5519794b60c | R | 21,365 | 424 | suppressMessages(library(Seurat))
suppressMessages(library(dplyr))
suppressMessages(library(tidyr))
suppressMessages(library(caTools))
suppressMessages(library(colorRamps))
suppressMessages(library(tidyverse))
suppressMessages(library(writexl))
suppressMessages(library(clusterProfiler))
suppressMessages(library(reshape... |
c2c22ebaf6e1ef690f8ff17e1f6ed88a6b88e2026599e1ef02ec98e9ca15a449 | R | 21,575 | 310 | ---
title: "CRISPR L1s differential expression analysis of TEs"
output: html_notebook
---
Here we perform differential expression analysis (DEA) of all TEs using a unique mapping approach for our CRISPR experiments targeting young L1 elements.
The experimental design is CRISPR inhibition on iPSC where L1s are usually... |
e075eea9df7afbff3cd85e57edae956107acdc4a0586fe20398196cd2812b3e6 | R | 21,629 | 442 | library(dplyr)
library(biomaRt)
library(magrittr)
library(SummarizedExperiment)
ensembl_dataset <- useEnsembl(biomart="ensembl",
dataset = "hsapiens_gene_ensembl",
mirror="uswest")
#ARCHS4_DATA_DIR <- "/home/users/burkhajo/WuLab/WuLabLustreDir/reticula/input... |
a6b5aca9c891a437fdf4465c0684c265fcb4c80ab489924f19e946a706c5cdb5 | R | 21,686 | 464 | set.seed(88888888) # maximum luck
library(magrittr)
library(ggplot2)
library(ggiraph)
start_time <- Sys.time()
#OUT_DIR <- "/Users/burkhajo/Software/reticula/data/aim1/output/"
OUT_DIR <- "/home/burkhart/Software/reticula/data/aim1/output/"
rxn2ensembls.nls <- readRDS(paste(OUT_DIR, "rxn2ensembls_nls.Rds", sep = ""... |
6bb5318ba17989a6d27fe4a2b20314c240ecf5a984301d8f54994086dd4755d4 | R | 21,697 | 502 |
#### Analysis of neuronal activity patterns (NAPs)
set.seed(123)
# setting working directory
setwd(paste0(local_dir, wd))
DEGs_dir = paste0(local_dir, wd, "/DEGs_lists")
degs = c("Option_A_mix_DEGs_stringent", "July_Option_A_DEGs_stringent",
"Option_A_mix_DEGs_total", "July_Option_A_DEGs_total")
# for de... |
c8c95996f1e4c7ecdce2c74b689d023620b103e5739cd1e8f9f41ccd029ce112 | R | 21,964 | 580 | #*******************************************************************************
# Filename : computeInformation.R
#
# Description: Compute 2 and 3 point (conditional) mutual information
#*******************************************************************************
#================================================... |
d0e03f2f3ae6112d3f8c8ba53d5b8880e52fc5a8daa0081a132fa7a184cd1f42 | R | 22,017 | 528 | #' integratedData
#' Integrated single cell RNA-seq data.
#'
#' @param merged.obj Seurat object containing sample identities for each cell in the metadata.
#' @return Integrated Seurat object
#' @export
integratedData <- function(merged.obj, split.by = "orig.ident", config.dir = "./configs", integed = T, regress = T,... |
19207e0508f660e55e95ceb25aa57cb7bf95489410faf959c7dd946b1e4e1726 | R | 22,088 | 534 | ## HELPER FUNCTIONS ##
## libraries ##
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(Seurat))
suppressPackageStartupMessages(library(patchwork))
#suppressPackageStartupMessages(library(harmony))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(libr... |
07c1442625b91994a1678b3bf88898ce683b65da09c81b152db884511e722795 | R | 22,182 | 775 | fromStringToNumberArrowType <- function(val) {
ret <- 0
if (val == "arrow") {
ret <- 6
} else if (val == "TRUE") {
ret <- 15
}
return(ret)
}
#' GraphML converting function for miic graph
#'
#' @description Convert miic graph to [GraphML format](http://graphml.graphdrawing.org/).
#' @param miic_obj A ... |
22ea00a237c812bf05dd23c1a5d082da5d224981444165e4c3122079c0dcc268 | R | 22,229 | 911 | ---
title: "DecoupleR"
output: html_document
date: "2023-08-07"
---
For this script is used the full transcriptome data, not the SCT normalized data
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, quiet=TRUE)
knitr::opts_knit$set(root.dir = '/home/rstudio/')
```
```{r, include=FALSE}
setwd('../rstudio... |
f76e8b193c2c0847a759cf2ea9d6a2d03b87ab5508a7a7526d45d5fa68bd28e3 | R | 22,453 | 493 | ---
title: "Descriptive analysis of scRNA-seq infection states and cell types"
author: "Arpy"
date: '2024-09-24'
output: html_document
---
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(Seurat)
source("~/OHSU Dropbox/Saunders Lab's shared workspace/arpy/manuscripts/2023_Thai2P4M_FeigeYoung/m... |
c248c3e65a2beeb7d704da2ea6564d4079a2c55aa8428676964b5619fb149591 | R | 22,500 | 414 | ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
###### libraries and functions
library(cdata)
library(scales)
library(openxlsx)
library(ggridges)
library(SCIFER)
source("./Settings.R")
## mutation data
patient.id <- 'KX004'
patient.n... |
20993d66cf5d57c3d0901d08fd41829644cdba542df6e8d85560f84954e1c16a | R | 22,510 | 492 | ###### This scripts plots the output from the population genetics model. It produces
###### - For each patient the model fit vs data and the posterior probabilities of the parameters
###### - A summary of the 80%HDI estimates across the population
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ##... |
6f8bfb722a9110e12ef2bad17c2fe7b67b4b568986380964d4004c6831ebaaf2 | R | 22,798 | 423 | ######analyzing Sierra's Proteomics data
library(tidyr)
library(ggplot2)
library(knitr)
#library(tabplot)
library(ggrepel)
library(dplyr)
library(tidyverse)
library(grid)
library(gridExtra)
library(ggplot2)
library(devtools)
library(dunn.test)
library(VennDiagram)
library(factoextra)
library(FactoMineR)
library(heatm... |
4baa62b28f828f5e2369c57493828d49151d589235e88df60272255adb7b1ebe | R | 22,975 | 537 | ## Package installation and library initializing ##
packages_req <- c("multitaper", "pracma", "fields", "doParallel", "parallel", "png")
not_installed <- packages_req[!(packages_req %in% installed.packages()[ , "Package"])] # Extract not installed packages
if(length(not_installed)) install.packages(not_installed) ... |
ecd8ae817d7027b1c800e89095a091a78104973144177ebf47d6c720f0056ec9 | R | 23,047 | 499 | # GSE142526
library(dplyr)
library(Seurat)
library(ggplot2)
whole <- readRDS("GSE142526_UMAP_QC_250714.rds")
# library(CSCORE)
# RPCs_joined <- JoinLayers(RPCs)
# stage = RPCs_joined
# mean_exp = rowMeans(stage@assays$RNA$counts/stage$nCount_RNA)
# genes_selected = names(sort.int(mean_exp, decreasing = T))[1:5000]
#... |
10f2800a382f5b4cb2e996dd42457d4d2d8068e47b8613fae448192ce88c0b66 | R | 23,242 | 527 | ---
title: "Pre-processing of Tha scRNA-seq data for Cellular Interaction Analysis using Liana or CellPhoneDB"
author: "Arpy"
date: '2024-09-24'
output: html_document
---
```{r libraries and functions, message=FALSE}
library(Seurat)
library(tidyverse)
library(dplyr)
library(magrittr)
library(liana)
library(circlize)
... |
70013add2daf394663d65157fab1f7244532162d1aaa01a0c0dddee20cb0141a | R | 23,244 | 803 | # Code to generate Figure7-figures supplement 3 of the Platynereis 3d connectome paper
# Gaspar Jekely 2023
# load packages and functions
source("code/libraries_functions_and_CATMAID_conn.R")
# load cell type connectivity ---------------
syn_tb <- readRDS("source_data/Figure4_source_data1.rds")
celltypes_table <- re... |
83541e77f248757434fa8bf9b6fcfca60e98eb1307a2558dc5b14e58c7b308f6 | R | 23,303 | 193 | #' Function to prepare genetic predictors given a list of seed SNPs together with the significance level (e.g. GWAS reported p-values)
#'
#' \code{oPierSNPsAdv} is supposed to prepare genetic predictors given a list of seed SNPs together with the significance level (e.g. GWAS reported p-values). Internally it calls \co... |
66a77681a347e7aac6fd0fa67f3f77dbcb9dd5edb913ee69a05204098eeb202b | R | 23,349 | 731 |
get_knn_graph <- function(rd.dat,cl, ref.cells=row.names(rd.dat), k=15, knn.outlier.th=2, outlier.frac.th=0.5,mc.cores=10,method="cosine")
{
# knn.result = RANN::nn2(rd.dat,k=k)
# knn = knn.result[[1]]
# knn.dist = knn.result[[2]]
#
ref.rd.dat = rd.dat[ref.cells,]
knn.result = get_knn_batch(rd.dat, ref.r... |
285355b436d5eb8fcb67272ac4bed2d113739c256e72b68c33581f737588aac8 | R | 23,393 | 422 | ---
title: "RF Regression Analysis"
author: "Arpy"
date: '2025-02-25'
output: html_document
---
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(dplyr)
library(Seurat)
library(Matrix)
library(viridis)
library(randomForest)
library(ranger)
source("~/OHSU Dropbox/Saunders Lab's shared workspace... |
485e72f83615e93c23eea1aaf38b14cadd3a542170499b1c53f9208eb0808abf | R | 23,429 | 401 | ---
title: "L1-CRISPRi organoids: Cell typing"
output: html_notebook
---
This markdown relates to the visualization of day 15 cerebral organoids.
Main questions:
1. Cell type composition
2. Nuclei composition between conditions
3. Do L1-CRISPRi and control organoids significantly differ in cell type composition?
4. W... |
e1c3a8b1458ed49b1c1bfe6735dde764d0a13e844e5627bcc2b6a2371ead559c | R | 23,551 | 562 | #R/natverse code to generate Figure 16 and Fig 16 suppl 1 for the Platynereis 3d connectome paper
#Gaspar Jekely March 2022
#load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
# load cell clusters ------------------------------... |
9fd096d3ff3f3daa28a1baab3a387397e6dc71a380b76e1e6cde071132678e59 | R | 23,612 | 502 | #' Opens \code{SC3} results in an interactive session in a web browser.
#'
#' Runs interactive \code{shiny} session of \code{SC3} based on precomputed clusterings.
#'
#' @param object an object of \code{SingleCellExperiment} class
#'
#' @return Opens a browser window with an interactive \code{shiny} app and visualize
#... |
7f0736afdd94cffc0efeff9c199108bf5aecd65314f7d520600b1bdb64b0cd94 | R | 23,670 | 776 | # Generate the figure of germ layers of the Platynereis 3d connectome paper
# Gaspar Jekely 2023
# load nat and all associated packages, incl catmaid
source("code/Natverse_functions_and_conn.R")
# read cells --------------
{
ectoderm <- nlapply(
read.neurons.catmaid("^ectoderm$", pid = 11),
function(x) smoo... |
e3f971be4a95f74f2270b295ae65d0ee0a3e3daf2b1e18a42e7b466fbda5921a | R | 23,840 | 445 |
#' Obtain allele counts for 1000 Genomes loci through external program alleleCount
#'
#' @param bam.file A BAM alignment file on which the counter should be run.
#' @param output.file The file where output should go.
#' @param g1000.loci A file with 1000 Genomes SNP loci.
#' @param min.base.qual The minimum base quali... |
277c70ccf0bb02ad8f2cd7f25d80740902234342ea0c60684be3608595272577 | R | 23,886 | 545 | ---
title: "Host astrocyte transcriptional comparisons"
author: "Arpy"
date: '2024-09-24'
output: html_document
---
#Libraries and Source Files
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(Seurat)
library(Libra)
library(clusterProfiler)
library(enrichplot)
library(smplot2)
library(ReactomeP... |
d17663c6c5e0b1b202f6d5694d8e0829e37a2374ce048c2425112023c544e648 | R | 23,997 | 718 | # code for Figure4 figure supplement 4 of the 3d Platynereis connectome paper
#Gaspar Jekely 2023
# load packages, functions and catmaid connection
source("code/libraries_functions_and_CATMAID_conn.R")
Okabe_Ito <- c(
"#E69F00", "#56B4E9", "#009E73", "#F0E442",
"#0072B2", "#D55E00", "#CC79A7", "#000000"
)
colo... |
b29dc8527109b6a43c66221700a1f8fd2e589a523e61f5ed92982d9c9d93dc72 | R | 24,113 | 473 | ###### This scripts plots the output from the population genetics model for a one-clone-model without size compensation. It produces
###### - For each patient the model fit vs data and the posterior probabilities of the parameters
###### - A summary of the 80%HDI estimates across the population
###### ###### ###### ###... |
2f45ec2cf6cacc21fcb18eb4653d8e50f070cfb35509d8e0324d82006f497db4 | R | 24,156 | 539 | #' Function to visualise an igraph object using ggnetwork
#'
#' \code{oGGnetwork} is supposed to visualise an igraph object using ggnetwork.
#'
#' @param g an object of class "igraph". For an advanced use, it can be a list of igraph objects; in this case, multiple panels will be shown (particularly useful when visualis... |
326c116d02c966e48ff537e3a0261f6f08964ac5be02743469abbb2beaf9635b | R | 24,197 | 399 |
#' Split a single vcf into separate vcfs for each chromosome
#' @param chrom_names Names of the chromosomes
#' @param externalHaplotypeFile Full path of the external vcf containing phased haplotypes (Default: NA)
#' @param outprefix Full path and prefix of the output files
#' @author jdemeul
#' @export
split_input_hap... |
e1e82e090008a7dd14c04a2189fd0b6bf6d876e0d5811075ab58d31a9e804242 | R | 24,252 | 394 | ---
title: "Seurat Microglia Basics Plotting"
author: "Arpy"
date: '2024-11-12'
output: html_document
---
# Adapted code from K. Young's 7_astrocytes.rmd for the 2P4M project
G.Chin 06/21/24
```{r load libraries and source, echo = F}
library(tidyverse)
library(Seurat)
library(Libra)
source("/Users/arpiarsaunders/OHS... |
eecc8620fba9e83f37202d9de608b6c2bd95666d78a0caa1e2a9e0771fb4181b | R | 24,350 | 456 | suppressMessages(library(Seurat))
suppressMessages(library(dplyr))
suppressMessages(library(tidyr))
suppressMessages(library(caTools))
suppressMessages(library(colorRamps))
suppressMessages(library(tidyverse))
suppressMessages(library(writexl))
suppressMessages(library(clusterProfiler))
suppressMessages(library(reshape... |
afb9f0d61bf18834e41968d29e77b2dd66f6e480ee0b278f3dfd115ce65131fc | R | 24,492 | 536 | set.seed(88888888)
library(VennDiagram)
library(magrittr)
library(ggplot2)
library(plotly)
library(dplyr)
library(stats)
start_time <- Sys.time()
OUT_DIR <- "/home/burkhart/Software/reticula/data/aim1/output/"
ALPHA <- 0.05
#phyper(q, m, n, k, lower.tail = FALSE)
# q = number of white balls drawn (number of transcr... |
e9f811df28739e1ed7b1fce5d686d4f23da51f262011eb45cbde640c9228b03b | R | 24,782 | 740 | #' @importFrom stats sd
DScore <- function(x = NULL, y = NULL, W = NULL, perm = 100, filter = 0, seed = 999, debug = FALSE)
{
set.seed(seed)
d <- .Call("D_distribution_test_v2", x, y, W, perm, filter, debug)
hist(d[2:(perm+1)])
abline(v=d[1], col="red")
tval <- (mean(d[2:(perm+1)]) - d[1]) / sd(d[2:(perm+1)]... |
37ee94c11484b6da0552de9a2720849aed91c0bbc2a5aa82326464f757451134 | R | 24,876 | 611 | ---
title: "st_408"
output: html_notebook
---
Written by Aunoy Poddar
July 21st, 2022
# Process the puncta quantified raw data
```{r eval=FALSE}
current_file <- rstudioapi::getActiveDocumentContext()$path
output_file <- stringr::str_replace(current_file, '.Rmd', '.R')
knitr::purl(current_file, output = output_file)
f... |
3b7a8c92ce637f49fc72a5031f46ffe58e6873363c795eb5d91559fc86c93533 | R | 24,944 | 358 | ---
title: "CRISPR L1s differential expression analysis of TEs"
output: html_notebook
---
Here we perform differential expression analysis (DEA) of all TEs using a unique mapping approach for our CRISPR experiments targeting young L1 elements.
The experimental design is CRISPR inhibition on iPSC where L1s are usually... |
c7239708bb840a5dc5b18adcf945d3834839550a2eba416fe3813fbe74d592b3 | R | 24,961 | 605 | # mouse_retina > GSE148063
library(dplyr)
library(Seurat)
library(ggrepel)
set.seed(0)
whole <- readRDS("GSE148063_UMAP_QC.rds")
markers <- c("Pax6", "Six3", "Rax", "Lhx2", "Mki67",
"Twist1", "Col3a1", "Alx3", "Prrx2", "Acta2",
"Krt18", "Krt8", "Dlx5",
"Hbb-bs", "Pecam1", "Cd34... |
28b50bdfb2a03c6a4a041788005fb7a597ef96809cffffa954c99457e5c5317f | R | 24,985 | 334 | ---
title: '`r paste0("Statistical report of project ", projectName, ": pairwise comparison(s) of conditions with DESeq2")`'
author: '`r author`'
date: '`r Sys.Date()`'
output:
html_document:
toc: TRUE
toc_float: TRUE
number_sections: TRUE
bibliography: bibliography.bib
csl: medecine-sciences.csl
# css: s... |
e90e7914e71f3a62f5175baca35aed6cd3d2c3ce56b1c05705d01576c5cc9cc0 | R | 25,136 | 775 | # R code to generate the head-trunk connectivity figure 10 and Fig 10 fig suppl 2of the Platynereis connectome paper
# Gaspar Jekely 2023
# load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
#color scheme for segments
segmental_c... |
52a8feeb36336bff3fff52963887d636362c521b760890a923e7caea8a75fbd8 | R | 25,334 | 471 | #' Adapted code from ASCAT to load in SNP6 data for plotting
#' noRD
# ascat.loadData = function(Tumor_LogR_file, Tumor_BAF_file, Germline_LogR_file = NULL, Germline_BAF_file = NULL, chrs = c(1:22,"X","Y"), gender = NULL, sexchromosomes = c("X","Y")) {
#
# # read in SNP array data files
# print.noquote("Reading ... |
078cba19a7094fa9ba1646ef01f7c2891b33756caf98ccc5bc8f211a046d650a | R | 25,569 | 567 | #### load packages ####
targetPackages <- c('tidyverse','patchwork')
newPackages <- targetPackages[!(targetPackages %in% installed.packages()[,"Package"])]
if(length(newPackages)) install.packages(newPackages, repos = "http://cran.us.r-project.org")
for(package in targetPackages) library(package, character.only = T)
# ... |
a3bf90e90c94307c5ea21356767222ca004450513b68a1181f29e67194edcee4 | R | 25,642 | 489 | ----------------------
Analyze Gene Scores related to Tha Astrocyte Cluster 0 and Cluster 2 in NPH and COVID snRNA-seq datasets
----------------------
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(Seurat)
library(Matrix)
library(qs)
library(data.table)
library(cowplot)
library(PupillometryR)... |
aa963cfcdea9abdf76c5426724b1f7bc2b76b16c16b11cfaa4a43c23a340f09e | R | 26,008 | 646 | ---
title: "Fold-Change Comparisons in Microglia across Experimental Conditions"
author: "Arpy"
date: '2024-11-12'
output: html_document
---
```{r load libraries}
library(tidyverse)
library(Seurat)
library(Libra)
library(clusterProfiler)
library(enrichplot)
library(smplot2)
library(ReactomePA)
# library(ggVennDiagram)... |
075b8e1896468734f185ff8a17b9a5607b472db18c61e4ac94da6f00e0f22df2 | R | 26,025 | 786 | #R/natverse code to generate Figure 5 of the Platynereis 3d connectome paper
#Gaspar Jekely 2023
#load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
load_neuron <- function(annotation){
nlapply(read.neurons.catmaid(
annotat... |
b6bbc6ec83e377bcbb9db0f5e7c12ccd63ef3a25d374d4579d6417ac35f5e630 | R | 26,180 | 647 | #R/natverse code to generate Figure mech girdle anatomy overview for the Platynereis 3d connectome paper
#Gaspar Jekely March-Dec 2022
#load natverse and other packages, some custom natverse functions and catmaid connectivity info
source("code/Natverse_functions_and_conn.R")
# functions -----------------------------... |
41be717eb99f61b70fbf896cff8568e11927aafd02965e284c7bdc72f12cbe88 | R | 26,265 | 434 | ---
title: "Random Forest Regression Analysis for Gene Expression Relationships related to Viral RNA Load"
author: "Arpy"
date: '2024-09-24'
output: html_document
---
```{r libraries and functions, message=FALSE}
library(tidyverse)
library(ggplot2)
library(dplyr)
library(Seurat)
library(Matrix)
library(viridis)
librar... |
52492adc726fa49453cd84d1c94398dde6e19e76836892fc0583e344f94de860 | R | 26,290 | 494 | library(dplyr)
library(biomaRt)
library(magrittr)
library(SummarizedExperiment)
ensembl_dataset <- useEnsembl(biomart="ensembl",
dataset = "hsapiens_gene_ensembl",
mirror="uswest")
# load gtex data and make individual tables
#GTEx_DATA_DIR <- "/home/users/bu... |
aa66949974544adc5a6c46a0207ef1ea11297775d0c427cc12e8e6c91215f8f8 | R | 26,774 | 633 | # human_retina_organoids > GSE220661
library(dplyr)
library(Seurat)
library(ggplot2)
whole <- readRDS("GSE220661_UMAP_QC_240919.rds")
integrated_markers <- c("LHX2", "PAX6", "RAX", "SIX3",
"ELAVL3", "RCVRN",
"VSX2", "MAP2", "SOX2", "NES", "MKI67",
... |
c5f80d3f2f8cf852ad6989263b066f79f46bd68408be431b8fa1153893ae0671 | R | 27,502 | 1,032 | library(survival)
library(data.table)
data("iris")
data("mtcars")
data("ToothGrowth")
test_that("Auto determine objective", {
y_num <- seq(1, 10)
res_num <- process.y.margin.and.objective(y_num, NULL, NULL, NULL)
expect_equal(res_num$params$objective, "reg:squarederror")
y_bin <- factor(c('a', 'b', 'a', 'b'),... |
58368ba9a25d34e51ac32acfc4ab8e4008bc7e481cb3a43307b51f9cb39ff6cf | R | 27,751 | 571 | # ==============================================================================
# SCRIPT 01: DATA PREPROCESSING AND OVERALL META-ANALYSIS
# (originally distributed as data_preprocessing.R)
# ==============================================================================
#
# PURPOSE:
# This is the primary entr... |
a1dbfc002cac7834d055564d0dae11a4a16acf3f42662b19e95288751dadcce4 | R | 28,013 | 668 | # Differential Expression Analysis
library(edgeR)
library(fgsea)
library(reactome.db)
library(metafor)
library(openxlsx)
library(viridis)
library(ggpubr)
library(dplyr)
library(plyr)
############################################################################################
#### Inputs
###############################... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.