sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
7fc1cfb26dbfcd4df0fe5276a6ad71b01f2f51a97f6e34680115b6b65c09a5e7 | R | 4,674 | 94 | main_f<- '/home/hpc/bonev/projects/ram/results/mm10/hic/'
genome <- 'mm10'
chrom_sizes_f <- '/home/hpc/bonev/annotations/mm10/encode/mm10.chrom.sizes'
map3c_f <- "/home/hpc/bonev/software/hicpipe/"
cells <- c('ES_3DRAM_250k','ES_Methylhic_Ecker' ,'ES_Methylhic_Ren','ES_Bonev2017')
#cells <- c('E14_NSC','E14_IPC','E14... |
ea918ced286ba73c8d1c9091d6755f4975fdb63f867994b89419e63dad9de2b2 | R | 4,676 | 119 | ---
title: "Comparing Statistical Inference Models"
author: "Stephen P Plassmeyer"
date: "4/6/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.R')
library(VennDiagram)
```
### Load Data
```{r}
compiled_counts <- fread('../../data/c... |
90727588f3084471fe8a8e2cbc0ebe68229bd5e4173eb123a858c01f4f0ea084 | R | 4,681 | 112 | #!/usr/bin/env Rscript
# to run locally:
# SCRATCH1=/mnt/g/scratch
# docker run -it --rm \
# --workdir $HOME \
# -v /mnt/g/ckd:$HOME/ckd \
# -v $HOME:$HOME \
# -v $SCRATCH1:$SCRATCH1 \
# -e SCRATCH1="/mnt/g/scratch" \
# p4rkerw/sctools:R4.1.3 R
library(Seurat)
library(dplyr)
library(openxlsx)
library(here)
library(fut... |
77f7aa03a250feb788cf50e5a30f73eb1cb14af4f829cc4493f0ae10136f8632 | R | 4,682 | 73 | #' @title Identify potential doublet cells
#' @description Identify potential doublet cells using cluster assignments. Imagine the following scenario: we have a macrophage-endothelial doublet cell; an endothelial cell cluster, and a macrophage cluster in which the doublet cell is currently 'hidden'. We take the residu... |
0a72b559701c1786400a194b32ee72bcfc6331264ecd6c84b49409098820037a | R | 4,689 | 110 | library(tidyverse)
library(data.table)
library(ggpubr)
library(metafor)
library(tidymeta)
library(broom)
library(qvalue)
library(here)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
options(repr.plot.width=11, repr.plot.height=8.5... |
658360a43c81970b8f41d3792e105bc031e33e9b4b8bb3f7caf2dacddd061b92 | R | 4,689 | 124 | #' Sex Ratio Analysis.
#'
#' Given two objects of class \code{comoRbidity}, one for each sex, the sex
#' ratio estimation is performed.
#'
#' @param female A \code{comoRbidity} object, containing the comorbidity data for
#' female patients.
#' @param male A \code{comoRbidity} object, containing the comorbidity d... |
61c3d03f74841734f823b0110e6fdc1715e0d35ea2e817e63f404cded7e36e31 | R | 4,694 | 98 | # Merge grand average plots for figure
library(patchwork)
library(ggplot2)
library(glue)
library(tidyverse)
path <- "figures/grand_average/"
options(bitmapType="cairo")
all_figs <- list.files(path)
tc_o <- c()
tc_p <- c()
cum_vs_tr <- c()
count <- 0
for (l in c("V1","V2","V4","IT","word2vec")){
count <- count+1
... |
7274c9cf11fc7ab39b7d0930628ecd989c2380467d2cc57310c8c2100b82a5e0 | R | 4,694 | 114 | library(monocle3)
library(SingleCellExperiment)
library(purrr)
library(dplyr)
library(here)
library(ggplot2)
library(projectR)
library(stringr)
library(ggpubr)
#These have pattern plotting on umap with clipped colors, correlation with features and pattern usage
source(here("scripts/accessory_functions/pattern_plotting... |
e4ad22407ec8f7b5b13ed44b6b7a3d18e4624df32f41641669a78ff74b308f6e | R | 4,697 | 186 | ###################################################
# LC project
# Script for spatial registration of snRNA-seq data
# Lukas Weber, Apr 2022
###################################################
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/
libr... |
83971899a6be7b9761f3dec63f2972b3248b1f12c59243c26c3f8991057545cc | R | 4,712 | 174 | ######################################################
# LC analyses: BayesSpace evaluation metrics and plots
# Lukas Weber, Oct 2022
######################################################
# module load conda_R/4.2
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/
library(Sp... |
35e9437f307c32a1c74783c798f88d1ce149f7e6cbb4fd48955684d44f741156 | R | 4,718 | 124 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(data.table)
library(RColorBrewer)
library(data.table)
library(rcartocolor)
library(ComplexUpset) # devtools::install_github("krassowski/complex-upset")
library(cowplot)
library(ggsci)
ss <- function(x, pattern, slot = ... |
8972d38aa304a8b385040e8d7e7f72c118a4addee452b7affa87becec6b22326 | R | 4,736 | 95 | library(tidyverse)
library(gg3D)
library(ggpubr)
library(patchwork)
library(ggplot2)
library(colorblindr)
library(viridis)
library(RColorBrewer)
library(lsa)
library(Rtsne)
### Load data---------------------------------------------------
sigInfo <- read.delim('../../../L1000_2021_11_23/siginfo_beta.txt')
sigInfo <- sig... |
3a4f522dc38151a18e71b63f352f75c036ff62f6528f399fa709efcc2e715b9d | R | 4,737 | 124 | # load the zonal annotation from Tan 2018 "A Near-Complete Spatial Map of Olfactory Receptors in the Mouse Main Olfactory Epithelium"
# convert continuous zonal annotation into integers
Tan2018_tb<-read_tsv("/Users/elizaveta/Desktop/Zonal_anno/Tan_2018_zonal_anno.txt") %>% rename("name"= 'gene name', "strand" = 'gene ... |
b6c17280444427da9982faa109e854c183899f863c14befee990891776768d0b | R | 4,737 | 150 | # annotate the aggregated atac obj using bridge integration
# counts=/mnt/g/cellranger_atac_counts
# project=/mnt/g/ckd
# SCRATCH1=/mnt/g/scratch
# docker run -it \
# --memory 100g \
# --cpus 4 \
# --workdir $HOME \
# -v $project:$HOME/ckd \
# -v $counts:$HOME/cellranger_atac_counts \
# -v $HOME:$HOME \
# -v /mnt/c/re... |
f78cafc3d43d195bc032ed897e790c9a83063aabdc8ef9e0c29f30a3bb1e15d3 | R | 4,762 | 84 | library(dplyr)
library(optimx)
library(performance)
setwd('/share/inspurStorage/home1/zixing/ABCDR/Project_1')
project1_dataset_baseline_rmNA_win<-readRDS("dataset_baseline_rmNA_smriqc.RDS")
########### add PCs ##################
setwd('/share/inspurStorage/home1/zixing/ABCDR/Project_1/gwas/scz2022')
pcs <- read.ta... |
ff0b63214e2e1fa08f04e2a144442e2617c37f1c1a3ecef7a914ff83392009ff | R | 4,762 | 100 | library(Seurat)
library(ggplot2)
library(dplyr)
require(emmeans)
sc_dat <- readRDS(paste0("~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/",
"02_clustering_no_S521G/sct_data_no_S521G_post_cluster_pcadims_15_res_0.7.rds"))
outdir <- paste0("~/Dropbox (Gladstone)/YH_MN02/seurat_analysis... |
103e24a1d437b4dda3af6e16a8d81c9315311ad641614230a56f8e5480f41300 | R | 4,763 | 120 | #' Plot oncogenic pathways
#' @references Sanchez-Vega F, Mina M, Armenia J, Chatila WK, Luna A, La KC, Dimitriadoy S, Liu DL, Kantheti HS, Saghafinia S et al. 2018. Oncogenic Signaling Pathways in The Cancer Genome Atlas. Cell 173: 321-337 e310
#'
#' @details
#' Draws pathway burden123
#' @param maf an \code{\link{MAF... |
031ce3bc25bd07a397f1b726bf6bf1ab648b784d414593032b9710dce74a7db9 | R | 4,767 | 100 | ---
title: "Additional simulations of timecourse analysis"
author: "Daniel Baker"
date: "2023-07-31"
output: pdf_document
---
```{r setup}
knitr::opts_chunk$set(echo = TRUE)
# set the initial parameters for the simulations
samplerate <- 1000
targetF <- 5
duration <- 6
binwidth <- 1000
tindex <- 1 + targetF*(binwidth/... |
a94338f9c63f129c2ae084329731ea7b148c0af790edc66ec43d1149b55ffbb5 | R | 4,775 | 96 | #' Transform 'NCycDB' or 'PCycDB' metagenomic abundance to 'microtable' object.
#'
#' @description
#' Transform 'NCycDB' or 'PCycDB' metagenomic abundance to microtable object.
#' The function can identify the mapping database according to the gene names of input feature abundance table.
#' Reference: Qichao et al... |
a1e2497a56b76e951c129a980643ce373484add19962b99325013d78a96c2939 | R | 4,776 | 92 | \#!/usr/bin/R
suppressPackageStartupMessages(library("stringr"))
suppressPackageStartupMessages(library("dplyr"))
suppressPackageStartupMessages(library("tidyverse"))
suppressPackageStartupMessages(library("ggplot2"))
suppressPackageStartupMessages(library("RColorBrewer"))
suppressPackageStartupMessages(library("ggpub... |
577836d75500c4b84961e8da52fbf485bf1df7b024e9180f5c801ac7f602c83f | R | 4,782 | 135 | ##' cpGModule
##'
##' @title Identify cell phenotype activated gene module
##'
##' @description Mining activated gene modules in specific cell phenotype.
##'
##' @param network.data Network data constructed by the \code{ConNetGNN} function.
##' @param cellset A vector of cell id. The specified cell set, which wi... |
a87161a8d54b2b6a9aa5a30e4232b3f5898d09531feaf7b344516ea6dbf1e9c2 | R | 4,784 | 133 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(broom.mixed)
library(RColorBrewer)
library(rcartocolor)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
## gene expression heatmap plots
library(AUCell)
## stats
library(... |
639754c18c06f8ed81cf91d6188bf552c5dd0c6aaf0c297b9811d16917a01573 | R | 4,797 | 119 | # Gregory Way 2017
# PanCancer Classifier
# scripts/viz/ras_differential_expression_figure.R
#
# Visualize differences between differential expression analysis of Ras
# wild-type to Ras mutant tumors and the machine learning derived gene
# importance scores
#
# Usage: Run in command line
#
# Rscript --vanilla scrip... |
31e8bfc61062534d3885b0a23b179fb1244f5b1ddeef9478c1d049137d3562de | R | 4,799 | 97 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/adnetworksppg/Project_1_Huang/NK01/",
"results/HMGB1_snRNA_mm10/06_seurat_analysis_batch1_batch2_merged/data")
indir <- paste0(basedir, "/03_clustering/")
outdir <- pa... |
5ebb358eed3bdc05b208c0a79814f72457b2d1f8e4937ece40a813bccc531ebb | R | 4,799 | 139 | ---
title: "R Notebook"
output: html_notebook
---
# Set Up
```{r setup}
knitr::opts_knit$set(root.dir = normalizePath("../.."))
```
# Imports
```{r}
library(finalfit)
library(mice)
library(purrr)
library(dplyr)
library(lavaan)
library(ggplot2)
library(gplots)
source('functions/mediation.R')
source('functions/med.plot... |
da614c8f587223e6aa07d99692c498032cf0d3678a441ffbc0ec5d6185d58765 | R | 4,807 | 118 | library(edgeR)
###### part1: read the Reference genome-based RNA-Seq expression matrix (readcount!!!)
data<-read.table("readcount_Ptep.txt",head=T,sep="\t",row.names=1)
dim(data)
# set the group of samples. VG: venom gland; SG: silk gland
group<-c(rep("brain",6),rep("ovary",7),rep("SG",6),rep("VG",6))
degs ... |
e55b72bae966eb368e5b2767b743da08b9f9138555c9b8570e4c1ecd5f204415 | R | 4,810 | 132 | #-----------------------------------------------
# LICENSE
#-----------------------------------------------
# Copyright 2018 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 ... |
8aaa395736ffbba575912836bfabb6fd62dc323208aaba280801e0370dddde4f | R | 4,817 | 182 | library(Seurat)
options(Seurat.object.assay.version = "v5")
library(SeuratObject)
options(future.globals.maxSize = 5e9)
library(stringr)
library(purrr)
# support R new feature in 4.2
Sys.setenv("_R_USE_PIPEBIND_" = TRUE)
# load my scripts
projdir <- here::here()
rdir <- file.path(projdir, "package/R")
import::from(.fro... |
15986271b21b0f27b60383471f66e3654dee6b3f62eaa365260b5bbaf6da7eec | R | 4,819 | 115 | ---
title: "PFN_Size_By_PredAcc"
output: html_document
date: '2023-01-31'
---
```{r}
library(gifti)
library(R.matlab)
library(RNifti)
library(ciftiTools)
ciftiTools.setOption('wb_path', '/Users/askeller/Documents/workbench/')
library(ggplot2)
```
# Load in the data
```{r}
PFNs_hardparcel<-read_cifti('/Users/askeller... |
6f8f2bd1a7b0e3a6b24de3fafd47293352522f34342352c25c9eb51786ab5b68 | R | 4,819 | 147 |
#This script computes gene modules using antler clustering software.
# We identify module characteristics by functional enrichment with gprofiler2
# and isolate modules with terms relating to cell deveopment and maturation
## ----receive input from nextflow----------------------------------------------
#Get paramet... |
e27a8c9d4bb1bcd7bd53498cbd4618ac4c617486b255cd0b7c6a0f8357458275 | R | 4,824 | 220 | ---
title: "LC analyses: subclustering"
author: "Lukas Weber"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
number_sections: true
toc_depth: 2
toc_float:
collapsed: false
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
```
# Introduction
Computation... |
189d258c829667dcfedf6c63afcc66388bd229fef914eabd80c14d0c9a5c8030 | R | 4,843 | 145 | library(Seurat)
library(Signac)
options(future.globals.maxSize = 5000 * 1024^2)
load('../data_processed/obj_all_processed_v3.rda')
pbmc <- obj_all_processed
rm(obj_all_processed); gc()
######## Creating aggregated pseudobulk samples ########
## Find the nearest neighbors for each cell based on WNN graph
pbmc <- Fi... |
54add5e876f60ece219dca9351125a47e9b61e8c65b58d25a90671f26ad459a0 | R | 4,854 | 64 |
invnorm <- function (x) {
y = (rank(x,na.last="keep")-0.5)/sum(!is.na(x))
return (qnorm(y))
}
# read in the combined modalities file
# /Users/jf/Documents/MouseAndRatWork/HiCAndMethylomes/data/COMBINED.MODALITIES.Hippocampus.L2
dg = read.delim ("Exc-DG.combined.modalities.230623.txt")
#take out the reads th... |
88af86f37371faa3f1de005c87802e4bf3ed0bf9f38071f5145529cd40af7815 | R | 4,865 | 133 | #KEGG Enrichment Analysis of the enriched genes
#this script uses clusterProfiler::enrichKEGG() function
#run locally on Ayushi's laptop
#load the required packages
library(org.Mm.eg.db)
library(clusterProfiler)
library(tidyr)
#set the working directories
indir <- paste0("~/Dropbox (Gladstone)/YH_MN02/",
... |
02b212f8a1ab32342a1d31c4748fe13d5879a3a5a9104c99f9acc4a6f73720cd | R | 4,869 | 106 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
library(ggplot2)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/projects/",
"mn-1318-maxine-nelson-yadong-huang-snrnaseq-mm10-aug-2022/",
"results/data/")
outdir <- paste0("/gladsto... |
e0a4a8b8995ebdee77686ec59c54899e5a613844d4b4a62a2279b35e86b5b811 | R | 4,875 | 128 | #' ---
#' title: "6mo LMMP pattern identification"
#' author: "Jared Slosberg"
#' date: "Nov 1, 2020"
#' ---
#'
#Generate heatmap for cell pattern weights, annotated by cell type
library(here)
library(monocle3)
library(ggplot2)
library(ggpubr)
library(dplyr)
library(ComplexHeatmap)
library(circlize)
library(viridis)... |
f7780a6ed56080201486870af446a0addd2a5c9abd369082284721f5649ad295 | R | 4,877 | 112 | ---
title: "Cross Experiment Correlation by Effect Sizes"
author: "Stephen P Plassmeyer"
date: "4/3/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.r')
```
# How well do effect sizes correlate across experients/libraries
## Compa... |
09bbb1a5214b7d50995e556944cfa8ea4bbf233a84d40538acc3c0bbecd18417 | R | 4,883 | 151 | library(Seurat)
library(Signac)
library(gaston)
library(ggplot2)
library(reshape2)
library(data.table)
library(Matrix)
library(GenomicRanges)
######## Function for variance component model ########
varcomp <- function(object, shuffle = FALSE, seed = 2021, ncores = 10){
## CollapseToLongestTranscript(), DistanceT... |
53f91e419c38b18ce5e043c8a65a594c5803d6a08c85d8ceb47902beb6bc9d88 | R | 4,885 | 104 | #' Plot density plots from clutering results.
#' @description Plots results from inferHeterogeneity.
#' @param clusters clustering results from \code{\link{inferHeterogeneity}}
#' @param tsb sample to plot from clustering results. Default plots all samples from results.
#' @param genes genes to highlight on the plot. C... |
ace33a9dd1fde6e699927d50c57ba6ab29da7f49c98df10b86a209ded9df02b4 | R | 4,888 | 111 | fig.size <- function (height, width) {
options(repr.plot.height = height, repr.plot.width = width)
}
# Colors for PBMCs
pbmc_colors = c("B" = "#66C2A5",
"DC" = "#FC8D62",
"HSC" = "#8DA0CB",
"MK" = "#E78AC3",
"Mono_CD14" = "#A6D854",
"Mono_CD16... |
9a5a8565446c677ee1991bc38cf97c55e4b60b11aca6d3aa28e2a52f4aab5da9 | R | 4,899 | 156 | ```{r}
source("../../src/setup.R", echo = FALSE)
```
<!---------------------------------------------------------->
<!---------------------------------------------------------->
# I. Data
***
```{r}
(supplementary_data <- load_supplementary_data())
```
```{r}
(ND_data <- load_pcr_data("ND", reprocess = TRUE, max_cq_c... |
6209ba3a513e44ed1c78018aa71a4fb92c2620d38e3759d475f4ccb167abee4d | R | 4,904 | 129 |
## Load relevant packages
################################################################
library(rstan)
library(R.matlab)
library(loo)
library(hBayesDM)
#library(bayesplot)
#library(bayestestR)
#library(see)
library(bridgesampling)
#####
## Set number of cores to run Stan models on and other default options
######... |
7172463db2e9f0d63b91fe812e5f07422e3bac8da1c7bbb2be880219d117e627 | R | 4,914 | 107 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(rlang)
library(writexl)
## main differential gene expression package
library(SingleCellExperiment)
library(limma)
library(edgeR)
library(swfdr)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, spl... |
587a8e67bc8ffc6130da1071e08c115b0b01f8a58997f2483cc26364899579ee | R | 4,917 | 127 | library(Seurat)
library(SeuratDisk)
library(tidyverse)
library(RColorBrewer)
library(data.table)
library(here)
FIGDIR='figures/exploratory/preprocess_snRNA-seq'
sapply(file.path(FIGDIR, c('plots', 'tables', 'rdas')), dir.create, showWarnings =F)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, sp... |
e70a8898bab5b52d33631fb61f262b161e535a41aa5fbeb8d0f5cc0382b78854 | R | 4,926 | 207 |
---
title: "Extract TCRs based on cancer reactive gene signature information for CD4+ T cells, keep v gene part"
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
... |
f3d10848dfb93a3114eac58bc8af54999520649a37be344fc3c71d15c3844daf | R | 4,937 | 123 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
## tree specific functions
library(ggtree)
library(treeio)
library(ggtreeExtra)
library(tidytree)
ss <- function(x, pattern, slot ... |
f66579bef1e4492067f1022f9a44eaa065d9456f10d346650b40b8f45c653cf9 | R | 4,955 | 169 | ########################################
# LC snRNA-seq analyses: quality control
# Lukas Weber, Oct 2022
########################################
library(here)
library(SingleCellExperiment)
library(scater)
library(scran)
library(ggplot2)
library(dplyr)
library(tidyr)
dir_plots <- here("plots", "singleNucleus", "03... |
a972890319c5cb70dafc9a7adcef813279fa7a0caf4e850950ea64f83750b989 | R | 4,965 | 166 | ---
title: "PCA_NucleusJ_analysis"
author: "F Mastropasqua"
date: "04/10/2022"
output:
pdf_document: default
html_document: default
---
```{r}
library(ggplot2)
library(tidyverse)
#install.packages("factoextra")
library(factoextra)
#clean environment
rm(list=ls())
#Data frames
df <- read.csv("./NucleusJ_df_D0_D28... |
0e161b529284f9b44060bbf8a0e9963969fce2c2384774b03e26750d7fbdb560 | R | 4,970 | 100 | setClass( "comorbidity",
representation =
representation( search = "character", # single or list
intraCode = "logical",
aggregated = "logical",
tDiseases = "numeric",
... |
4b0d57551962005fa7fabd164268aff8de21a98b14a40959283c28a05be582a7 | R | 4,985 | 111 | #############################################################
# Generate Figure 4B
#############################################################
setwd("D:\\PhD\\Lab\\Project_3_SVG\\Figures\\")
library(ggplot2)
library(gridExtra)
library(ggpubr)
InputDataPath <- ".\\Data\\Manuscript_3D_Simulation_Power\\Out_1.0... |
6aadfec875ba1adc1edf9726be2a1af529116f09ebe89eea529c114465071910 | R | 4,987 | 123 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(rcartocolor)
library(data.table)
library(tidyverse)
library(here)
library(readxl)
library(wesanderson)
library(cividis) # devto... |
cb1073ee3f21900d9d3fd556a43150f00139e447eb95a6296bc0dbbae9f2584e | R | 4,988 | 208 |
---
title: "Extract TCRs based on cancer reactive gene signature information for CD8+ T cells, keep v gene part"
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
... |
6f134bdcc91b8c4fe21ef0a52db7419682708acde00d035c3a8f149d6aa24e62 | R | 4,995 | 112 | #This model uses a previously written permutation matrix and the permutation
#functionality of Neuropointillist to generate a large number of volumes
#containing statistics of interested estimated on data that has been constructed
#such that the null hypothesis is true.
#
#Crucially, certain aspects of correction for c... |
5a1885983b95cf2485c62d47e80b0ff55f04f238cdc71864330bf7c7921aecce | R | 5,020 | 124 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(rcartocolor)
library(data.table)
library(tidyverse)
library(here)
library(readxl)
library(wesanderson)
library(cividis) # devto... |
0cc723c422cf6bc125e9334efce5865ddf0fae2deb7b3941e244e06a4c464aa1 | R | 5,061 | 156 | library(Matrix)
library(data.table)
library(R6)
library(purrr)
library(ggplot2)
proj_dir <- here::here()
import::from(
.from = "rknn.R",
.directory = file.path(here::here(), "package/R"),
SingleCellGroup,
GroupAnchor,
initSingleCellGroup,
getNeighborMat,
getReciprocalPairs,
initGroupAnchor
)
setMajo... |
d24890d8d4de6027d98d0e69d639e95397d93ccda8e8e6df46120edb3232c4be | R | 5,062 | 111 | #' Transform viromescan results to 'microtable' object.
#'
#' @description
#' Transform the results of viromescan software to microtable object.
#' The output of viromescan is single file for each sample.
#' All the results are needed to be merged and adjusted (for several chaotic taxonomy).
#' The input should be the ... |
12020decfffb468d197051facc1a52dd544ac3f5dfa8c49f960916741c50f1b6 | R | 5,064 | 128 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/projects/",
"mn-1318-maxine-nelson-yadong-huang-snrnaseq-mm10-aug-2022/",
"results/data")
indir <- paste0(basedir,
"/0... |
cd28fac159ff03101c1f65c298d4cfbd3f1c1460741d53dd4a107d866489fd0e | R | 5,067 | 128 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/projects/",
"mn-1318-maxine-nelson-yadong-huang-snrnaseq-mm10-aug-2022/",
"results/data")
indir <- paste0(basedir,
"/0... |
db132d6bf51ea5f21002943a8ee440ef4df4ae782a236f58ae622a32d64603a4 | R | 5,074 | 120 | # Collection of functions for plotting figures
library(readr)
library(ggplot2)
library(cowplot)
library(ggsci)
library(plyr)
library(dplyr)
library(reshape2)
library(stringr)
library(ggrepel)
library(factoextra)
library(wesanderson)
library(scales)
library(corrplot)
# # Default colour palette I use for most plots
# c... |
0512d37170b07cdd3f85b3fde3ad13583a99fd0771d027b20ad77aaf9fc3cdb0 | R | 5,076 | 117 | ---
title: "Compiling Expression for SVM"
author: "Stephen P Plassmeyer"
date: "8/6/2020"
output: html_document
---
Update 10-26-2020
* Compiled expression by AS2, aggregated plasmid count, normalization.
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
source('../../../code/mpra_tools/mpra_tools.r')
... |
68bd069cab4607d377d462620633a7bccb8beee9b6164af517329ef820e2e628 | R | 5,083 | 103 | #---Load Libraries------------------------------------------------------------------------------------------------------------------------####
library(tidyverse)
library(EWCE)
library(limma)
library(data.table)
# 2019/01/07 - Files used in this script can be downloaded from https://portal.brain-map.org/atlases-and-dat... |
6654a40597dbaaa6ab20e69bb3a1d3db82f4feea61bf6f59aa06fd49af15830a | R | 5,089 | 113 |
#' @title One-bar annotation ggplot
#' @description one-bar annotation ggplot
#' @param X named character vector of observations and groups (names); or a dataframe with first two columns as observations and groups.
#' @param title vannomap title. Default: NULL
#' @param x.title x axis (observations) title (e.g. 'cells... |
cb7934a409660b48b7dcd58a9d36e2c37d64ea78e8e690d1242d98252f671e02 | R | 5,094 | 106 | ################################################################
# Function for Power analysis in 3D simulations
################################################################
powermatrix <- function(InputData){
SVG_index <- 1:1000
NULL_index <- 1001:nrow(InputData)
Labels <- colnames(InputData)[-1]
... |
f8cb45aaa7dd470d8fa26f6252ee02eb1245306a4c4f24a46e88bd40faf38d2a | R | 5,099 | 162 | #' @rdname plotInteractions
#' @title Plot group interactions
#'
#' @aliases plotHeatmap plotNetwork
#'
#' @description This function takes in a matrix with the predicted proportions
#' for each spot and returns a heatmap \code{which = plotHeatmap} or a network
#' graph \code{which = plotNetwork} to show which cel... |
c037e3e67840799478b9267dfa108d5a95438813e7182305e8e293eb284b3bea | R | 5,106 | 93 | ---
title: "Barcode SVM Correction and Comparison"
author: "Anthony Fischer"
date: "1/24/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,fig.width = 5,fig.height = 5)
```
```{r Libraries and MPRA Tools, include=FALSE}
source("../../code/mpra_tools/mpra_tools.R... |
e1da8b2bfb6983372852b390a686f91f109f323392bb0278f814dcbc03f94acb | R | 5,108 | 153 | ##
suppressWarnings(suppressPackageStartupMessages(library(xbioc)))
suppressWarnings(suppressPackageStartupMessages(library(MuSiC)))
suppressWarnings(suppressPackageStartupMessages(library(reshape2)))
suppressWarnings(suppressPackageStartupMessages(library(cowplot)))
## We use this script to generate a clustering dendr... |
61f5bdec94ec8fbeb8d25cde50c2c63a8314243214b51d78d1b7bf95e5d5bef1 | R | 5,112 | 118 | #############################################################
# Generate Figure 5C,5D,5E and Supplementary Figure 25
# Plot 3D plots of genes in RA
#############################################################
library(plot3D)
library(plotly)
InputFile <- ".\\..\\..\\Data\\Manuscript_3D_RealData_Pattern\\"
... |
c87f9ac6509d25bebbcdca225e8bc9c6981327cf0904b62998372d16eb635735 | R | 5,120 | 170 | ---
title: "p20_analysis"
author: "Jared Slosberg"
date: "5/20/2022"
output:
html_document:
code_folding: hide
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(here)
library(monocle3)
library(tidyverse)
source(here("scripts/accessory_functions/monocle_mods.R"))
source(her... |
b3d2d64ef603945ebae1a0f508360c162d6bf10c26f0e0bc5f39fcb2e6edd4a0 | R | 5,127 | 124 | # Libraries
snapshot <- "/lab-share/RC-Data-Science-e2/Public/DST_software/pipeline_R_snapshot/r4.1-20220803-bch-dst-v1/"
.libPaths(snapshot)
library(Seurat)
library(SeuratDisk)
library(ggplot2)
library(Nebulosa)
library(patchwork)
library(pbapply)
tenColors <- c('#a9d6e5', '#89c2d9', '#61a5c2', '#468faf', '#2c7da0', ... |
1902bfc051799bcefd3f8b554e93656213acff9828829d627a6f6fb0da11a004 | R | 5,129 | 117 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(data.table)
## stats
library(fgsea)
library(swfdr)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
DATADIR= 'data/tidy_data/AUCell_gene_set_activities'
PLOTDI... |
06ec7a521b44b6602bc069b858fd8504c141315b2d82861ddbdcc4e2fde9c3bc | R | 5,156 | 139 | #-----------------------------------------------
# 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 ... |
903929db5b1f1ba30798aa43109cf79b4d6cbe4e063b9fc46546e14b1f39b807 | R | 5,183 | 155 | library(tidyverse)
library(ggplot2)
library(ggpubr)
library(fitdistrplus)
packdir <- file.path(here::here(), "package/R")
# * config
projdir <- here::here()
workdir <- file.path(projdir, "04.cCREgene/sa2.cicero")
ciceroDir <- file.path(workdir, "out/sa2pdcsum")
density.theme <- theme_bw() +
theme(axis.text.x=elem... |
9696f6e8aee1df85d2270f2475acdba157ea121fee09913731c7860edf068189 | R | 5,202 | 158 | library(stringr)
## need to load cembav2env from cembav2env.R
source(file.path(here::here(), "package", "R", "cembav2env.R"))
#' @export
loadL2Snap <- function(cembav2env, class = "NonN") {
snapL2Dir <- cembav2env$snapL2Dir
r <- cembav2env$L1CMeta$L1Reso[
cembav2env$L1CMeta$L1Label == class]
snap <- readRDS(... |
3da3137e14be72f0898e809c3739c6f17f5a5cfde76afa489855395adc20d709 | R | 5,203 | 114 | 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(rcartocolor)
library(data.table)
library(ggsci)
library(here)
library(readxl)
library(SingleCellExperiment)
l... |
38f166365150e508dade5ae6fd8d3f070cb0c1c613e91347448a495facb76665 | R | 5,206 | 188 | rm(list=setdiff(ls(), c("newSleepDataEtho")))
# LD analysis pooled from all runs
run1 <- readRDS("~/Desktop/Yoked_sortedMaxVelocity_10sec.rds")
run2 <- readRDS("~/Desktop/Yoked_sortedMaxVelocity_10sec.rds")
run3 <- readRDS("~/Desktop/Yoked_sortedMaxVelocity_10sec.rds")
run4 <- readRDS("~/Desktop/Yoked_sortedMaxVeloci... |
78fc1206429f869ccf85213de4227bdfa98712b3ef14ecf863e4a19ec036cf1c | R | 5,210 | 115 | 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(rcartocolor)
library(data.table)
library(ggsci)
library(here)
library(readxl)
library(SingleCellExperiment)
l... |
dee60fc30ddb30b2efd1fd50801f98d473a129b0f19e3f40af6adef48ab17b53 | R | 5,213 | 169 | # This code is to plot the time change of subcortex Fig.S10
# WANG. 04-April-2024
# Remove all objects created before to prevent clash
rm(list = ls())
library(dplyr)
library(ggseg)
library(ggplot2)
library(tidyr)
library(patchwork)
library(readr)
library(reshape2)
library(stringr)
# Set the working directory to the... |
450deaa2740bc3ee7c0c9a53efb2f02a5ef9fe31742bd5c5cd025085ccb5ca42 | R | 5,222 | 125 | # generate two files for SERGIO: one for master regulator expression for n.cell types;
# one for regulator relationships
library(qpcR)
library(formattable)
library(pheatmap)
# set parameters
n.celltypes <- 4
n.cells.per.type <- 1000
n.genes <- 5000
n.master.regulators <- n.genes * 0.01
n.tight.strong.targets <- n.gene... |
8d62054b2d26d1c8622eb668c87586442cf853219080a70167348d01a040e822 | R | 5,233 | 160 | # harmonize kpmp by projecting onto multiome atlas and doing joint deg analysis
# to run locally:
# SCRATCH1=/mnt/g/scratch
# docker run -it --rm \
# --workdir $HOME \
# -v /mnt/g/cellranger_atac_counts:$HOME/cellranger_atac_counts \
# -v /mnt/g/cellranger_multi_counts:$HOME/cellranger_multi_counts \
# -v /mnt/g/kpmp:... |
f233f41a0841c90485a9ec65f6aab2acec9bfd803ee79302ce8fda271770435f | R | 5,233 | 167 | library(dplyr)
library(monocle3)
library(tidyverse)
library(Seurat)
library(SeuratWrappers)
library(ggplot2)
library(msigdbr)
library(gsdensity)
library(TSrepr)
library(data.table)
library(cluster)
library(clusterCrit)
library(ape)
data <- Read10X_h5(filename = "./GSM5277844_E17_5_filtered_feature_bc_matrix.h5")
data ... |
4d4a9501e012e96f04708a83b01b40e2c5e4a41f41caa49c831d8568594c3f3d | R | 5,251 | 87 | #' Classifies SNPs into transitions and transversions
#' @description takes output generated by read.maf and classifies Single Nucleotide Variants into Transitions and Transversions.
#'
#' @details
#' This function combines complementary substitutions from both DNA strands into canonical forms:
#' \itemize{
#' \item ... |
dac7bdb8fa19b3401d778d9b38e6de4f1534f79a020b2dd17efb3614a4d13ed2 | R | 5,252 | 124 | ---
title: "Analysis of Fluorescence Validation"
author: "Stephen P Plassmeyer"
date: "4/23/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.R')
```
```{r}
fluorescence <- fread('../../data/validation/fluorescence_data_01172020/flu... |
090b3840e4195735585b67e0b951e736c500cf6a2675fa09c342b201d8cbc16e | R | 5,275 | 136 | ---
title: "NESC_nonPolar_mets_analysis_Final"
author: "Alise"
date: "2020 M03 14"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(tidyverse)
library(pheatmap)
library(RColorBrewer)
```
#All reactions
```{r}
#setwd("Z:/16-Our Papers/In Preparation/IPD_meta... |
99e0f350d3cf9c36cd27ebf015016053fedb54b919815571cab0de367d39c069 | R | 5,276 | 107 | ################################################################
# Function for Power analysis in 2D simulations
################################################################
powermatrix <- function(InputData){
SVG_index <- 1:1000
NULL_index <- 1001:nrow(InputData)
Labels <- colnames(InputData)[-1]
... |
d8b63e6567974b44993179d2273cc67893ce6d257b8040c223a55b2c52e62ddf | R | 5,276 | 121 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(data.table)
library(tidyverse)
library(RRHO2)
library(here)
DATADIR='data/tidy_data/compare_to_Alzheimers_studies'
## make for... |
61a749ee37888b3337e79f89e9f8d988eb1ece72e024ec388e2677169fec2557 | R | 5,285 | 142 | # Refit the bilateral model over 25 sex-effect prior widths and plot BF01.
args <- commandArgs(FALSE)
file_arg <- args[grepl("^--file=", args)]
this_file <- if (length(file_arg) > 0) sub("^--file=", "", file_arg[1]) else "scripts/04_prior_width_sensitivity.R"
this_file <- gsub("~+~", " ", this_file, fixed = TRUE)
sourc... |
78dfe9c02a73ef6a28206de56948f34a3f7aae05f3d7bc1c0270c4f623864c2a | R | 5,285 | 113 | #=========================================================================
#
# Copyright NumFOCUS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/license... |
e7e0a86c107347098130fb3bb5811a920aedff20949be53d34a01c6a8474186c | R | 5,289 | 113 | library(PatientLevelPrediction)
source('utils/utils.R')
library(config)
#' Extract features from cohorts and save for modelling in pytorch
#'
#' @param cohortSchema The schema where the cohort table is
#' @param cohortTable Table with Cohorts
#' @param cohortId The cohort_definition_id of target cohort
... |
d5b8bc01229ed32ca19ce4a1103b0df9228a08835eb09027cbc376ddfdb7cae8 | R | 5,292 | 113 | ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
## packages for data table processing/plotting
library(data.table)
library(tidyverse)
library(RRHO2)
library(here)
DATADIR='/projects/pfenninggroup/singleCell/McLean_chronic_opioid_m... |
2e64542edfed9a5b42669a4dcec0ff694234b30696ba149d200d84f50bfa83f3 | R | 5,296 | 104 | ---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# MarkerGenes
<!-- badges: start -->
[![Lifecycle: dormant... |
492f3c921404365ca7e724d34ac8d22c779c08804c5edc45aca5f753646bf670 | R | 5,304 | 108 | ################################################################
# Function for Power analysis in 2D simulations
# Supplementary Figure 1,2
################################################################
powermatrix <- function(InputData){
SVG_index <- 1:1000
NULL_index <- 1001:nrow(InputData)
Labels <-... |
0d04095ac3abb5eab9322ab22f060c155eae56a85fb66f70b8827eedb2703288 | R | 5,310 | 127 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
## main Seurat package snRNA-seq pacakges
library(Seurat)
library(SeuratDisk)
library(future)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors ... |
d6ee69f3bab1dfd1c3510ad686eac318896e1e0a5d6a34a0f9fdb44482e44c1a | R | 5,311 | 128 | #' compare VAF across two cohorts
#' @description Draw boxplot distibution of VAFs across two cohorts
#'
#' @param m1 first \code{\link{MAF}} object. Required.
#' @param m2 second \code{\link{MAF}} object. Required.
#' @param genes specify genes for which plot has to be generated. Default NULL.
#' @param top if \code{g... |
9720affdd86ec85fd00294b8cb5cb4e610cc2e9d7b28abc61216b3ef73bdd90f | R | 5,313 | 124 | ---
title: "Testing Updates to Statistical Inference Modules"
author: "Stephen P Plassmeyer"
date: "4/5/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
source('../../code/mpra_tools/mpra_tools.r')
```
```{r}
compiled_counts <- fread('../../data/compiled_counts/asd3utr_co... |
df9218e63e38466d5e967aec1c98e381e75fcf6f71e6442662eef5cba3a26ee1 | R | 5,319 | 152 | # -----------------------------------------------------
#
# Generates PNG images for micapipe Quality Check
# Derived from a NIFTI
# mipapipe v0.0.1
# Extra functions
#
# Created by RRC on Feb 2021 (the second year of the pademic)
#
# -----------------------------------------------------
## Collect arguments
args <- co... |
3729c331a00f3cc7dff3234e6cabbf5ccf81caf105107ece1344d6401f5da56f | R | 5,332 | 131 | library(gsdensity)
library(ggplot2) # for plotting
library(ggrepel)
library(reshape2)
library(msigdbr) # for gathering gene sets
library(Seurat)
library(SeuratData)
library(future) # for parallel computing
library(future.apply) # for parallel computing
library(matrixStats)
mdb_c5 <- msigdbr(species = "Mus musculus", c... |
33e631452218b5a2d4bb94fda12b7c0c6e77a843b8d1588a228815f8f16a57af | R | 5,334 | 105 |
#' @title Binomial test on matrix
#' @description Performs binomial test on each row (or column) of a logical/binary matrix to test if there are more TRUE values than expected by chance. Tests the alternative hypothesis that the proportion of successes is greater than expected.
#' @param m matrix (logical or binary)
#... |
66bd8cdee4824d554f3c3dd29aa9cf15e229d76a100662fcd67d4cf84f83fc38 | R | 5,340 | 174 | library(tidyverse)
library(fs)
library(ComplexHeatmap)
# Common definitions ------------------------------------------------------
EXPERIMENT_NAMES <- c(
"pnet_original" = "original setup",
"pnet_deterministic" = "deterministic inputs",
"pnet_shuffled" = "shuffled labels",
"mskimpact_nsclc_original_biased" ... |
7863d50b4616eb465521a7adaf821cd45236dacd6f4ae39d94195f7ceec4a955 | R | 5,340 | 116 | 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(rcartocolor)
library(data.table)
library(ggsci)
library(here)
library(readxl)
library(SingleCellExperiment)
l... |
9d311d3cf5515564489f0753e1cc1494830debcd19e8de43ec380bba3b115376 | R | 5,342 | 166 | ---
title: "MG A549 experiments - MA plots"
author: "Pierre-Luc Germain"
date: "2023/07/17"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
```{r}
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(sechm)
library(ggplot2)
library(ggrastr)
library(cowp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.