sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
46b6edb9608d368a403b27b5a1d39edc62120529820863daaf3a3a56aa1d902f | R | 5,991 | 119 |
# This code is to plot Fig.8
# WANG. 26-Mar-2024
# Remove all objects created before to prevent clash
rm(list=ls())
library(dplyr)
library(ggseg)
library(ggplot2)
library(tidyr)
library(patchwork)
# Set the working directory to the path where your files are located
setwd("/Users/wang/Desktop/Research_projects/BB... |
3c1787f60bd0fe021ca41b85d05076d7f1b01d96694359169b35459b73be73f4 | R | 5,999 | 179 | ##' scPathway
##'
##' @title Infer pathway activation score matrix at single-cell resolution
##'
##' @description Calculate pathway activity score of single-cell by random walk with restart (RWR).
##'
##' @param network.data The input network data is the result from the \code{ConNetGNN} function.
##' @param gmt.... |
cc61337f35eb82d40c31bef58d54c5d63953df0085c620a8b0fb47564bad5022 | R | 5,999 | 141 | #############################################################
# Power analysis for different granularities
# Supplementary Figure 22
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <-... |
e9ead46adb408a5f6b01ad014817779f8a26e89484c6d950a078266c532c1f65 | R | 6,002 | 166 | ---
title: "Figure 2 barplot"
author: "Hao Huang"
date: '2022-09-08'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
## load packages
```{r}
suppressPackageStartupMessages({
library(ggplot2)
library(glue)
library(reshape2)
library(ggpubr)
library(scate... |
871ac084075a80e4cd922b4f63cd9d79a71b728006f9e67dde9b186481e8ce47 | R | 6,014 | 172 | # To conduct two-way ANOVA on the scale scores of affects after each session
# Clear environment
rm(list = ls())
# Set system language
Sys.setenv(LANG = "en")
# LOAD PACKAGES ############################################
# Installs pacman ("package manager") if needed
if (!require("pacman")) install.packages("pacman... |
d5b7a825ee13ebb558520ac8e7e2400903b063d505aa1947d468e7e94df467ff | R | 6,019 | 137 | #' Plots results from clinicalEnrichment analysis
#' @param enrich_res results from \code{\link{clinicalEnrichment}} or \code{\link{signatureEnrichment}}
#' @param pVal Default 0.05
#' @param ORthr Default 1. Odds ratio threshold. >1 indicates positive enrichment in the group of interest.
#' @param featureLvls Plot res... |
fc076d6179ea717409ef794be401c7c8e4be80c9f8ef2157f1f6b3305070757f | R | 6,022 | 142 | ## 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)
library(Rmagic)
library(phateR)
ss <- function(x, pattern, slot = 1, ...) {
sapply(s... |
60eed7e941f6e9994e45fdfb70be76b867e15bbd0f0632905b20c8890484bb65 | R | 6,037 | 115 | library(data.table)
library(kimisc)
library(GenomicRanges)
args <- commandArgs(TRUE)
filedir <- args[1]
curfile <- thisfile()
source(paste(dirname(curfile), '/ConfigParser.R', sep=""))
config <- ConfigParser(file=paste(dirname(curfile),'/app.config', sep=""))
params <- ConfigParser(file=paste0(filedir, "params.config"... |
644db815aec7eaf2467e7312c63e14bd356f6b71bdf12144fd3aa13732a4d195 | R | 6,038 | 133 | #' Class MAF
#' @description S4 class for storing summarized MAF.
#' @slot data data.table of MAF file containing all non-synonymous variants.
#' @slot variants.per.sample table containing variants per sample
#' @slot variant.type.summary table containing variant types per sample
#' @slot variant.classification.summary... |
3a8b66b170e0212474b17ae8fb39376e39b9173b69aafddc3133b464911b2b68 | R | 6,047 | 139 | #############################################################
# Generate Figure 2B
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- function(InputData){
SVG_index <- 1:1000
NUL... |
eeb5e26d7acdc1515d9d6711b39c3a7756680a66bab5c2de2b727588be88d0c0 | R | 6,049 | 158 | # this script will analyze ST libraries from Humphreys lab only
# 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/spaceranger_visium_counts:$HOME/spaceran... |
e80a0debf43fdd90653a7c2b826fb4e5aa6d8978921b17277abb87b27d6b84e0 | R | 6,053 | 157 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
library(ggplot2)
#set all directory paths
basedir <- paste0("/gladstone/bioinformatics/adnetworksppg/Project_1_Huang/NK01/",
"results/HMGB1_snRNA_mm10/")
indir <- paste0(basedir,"05_cellranger_count_batch1_batch2_merged/"... |
cd850c8d23979814c9459f39a95b0eea41da616823497460aec343b1c1ae7c35 | R | 6,062 | 139 | #'Plot results from mosdepth output for Tumor/Normal pair
#' @param t_bed mosdepth output from tumor
#' @param n_bed mosdepth output from matched normal
#' @param segment Performs CBS segmentation. Default TRUE
#' @param sample_name sample name. Default parses from `t_bed`
#' @param col Colors. Default c("#95a5a6", "#7... |
4d6ca1031680f472378b1a516eef35ce6b940c194352c87a5768fadc1e5e0960 | R | 6,063 | 196 | # This code is to plot the Fig.S1
# a. distribution of the IQM
# b. correlations between IQMs
# c. the percentage change of the mean value of the different pipelines
# WANG. 27-Mar-2024
# Remove all objects created before to prevent clash
rm(list = ls())
library(dplyr)
library(ggplot2)
library(patchwork)
library(t... |
a0006f989ce28f5efa3798a149704d287d94b03ba427436a2dbb354d01a2d2da | R | 6,064 | 172 | ## snagged from: http://stackoverflow.com/questions/9680783/how-can-i-change-the-axis-position-for-pairs
# modified to include function for modifying X/Y values.
pairs3 <-
function (x, labels, XY_convert_fun = NULL, CustomColorFun = NULL, panel = points, ..., lower.panel = panel,
upper.panel = panel,... |
232dcecf713d9740a19060402ba37a37b87ba0d34a91d79778a9ac329b342252 | R | 6,065 | 146 | ## Dataset build for scRNA-seq analysis of d90 organoids
## Joe Raymond
#install.packages('Seurat')
library(Seurat)
# Helper function to run scds on dataset
# mostly just splits the object by sample and runs the analysis on each
# individual sample before recombining metadata
JR.scds.helper <- function(dataset = data... |
ed98e2d3dc95fbbda6dbc6a0ac3fd8e96b7d9a554931998a94ac04a69a80d86a | R | 6,065 | 107 | ##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... |
9389e1e436604a7d93a7876ec0bf9890ed11abb57aa846e1912f0a46d50bb5e0 | R | 6,084 | 216 | .count_nucleotides_at_position <- function(bam_connection, chr_name, position, mapq, flag) {
# Initialize counts
counts <- list(A = 0L, T = 0L, G = 0L, C = 0L, INS = 0L, DEL = 0L, total_reads = 0L)
tryCatch({
# Create genomic range for the position
gr <- GenomicRanges::GRanges(
seqnames = chr_name... |
56247f687f0ce2f75ee9f54014fb0bfc645fa83f33f354ede6d2a84e057317d3 | R | 6,086 | 140 | # Merge individual level plots for figure
library(tidyverse)
library(lemon)
V1_plot <- readRDS("figures/V1_indiv_tr_cum.RDS") +
scale_x_continuous(breaks = c(0, 350, 650, 1000)) +
theme(text = element_text(size = 8, colour = "black"),
strip.text = element_text(size = 8, color = "black"),
legend.t... |
370fce7947aab556eb7e0a0691a1f62c4568372eacb3703c8a66bd0a9dc9b5f2 | R | 6,087 | 120 | ---
title: "Analysis of Sex Differential Effects in Vglut Cre MPRA, Updated BC Random Effect LMM"
author: "Stephen P Plassmeyer"
date: "9/01/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
source('../../../code/mpra_tools/mpra_tools.r')
library(patchwork)
```
Updated ... |
9f96719981168c80a41b2d4bd248cfe76d02c7d41d2e8e4f1553098b782f64f0 | R | 6,087 | 144 | #############################################################
# Power analysis for dropout issues
# Supplementary Figure 19
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- function... |
e33aba53f7d58ee656a34f5a19c6a8908d1c445882ef017fa27d16a018e06521 | R | 6,103 | 141 | 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... |
a6bb29e2d8ff282ecc82e3e0e3d30785b2bf1dd90a65a2e102a6d3eec24a1b4a | R | 6,108 | 146 | #############################################################
# Power analysis for discrete patterns
# Supplementary Figure 20
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- funct... |
15bb176c94858d9e4d48976364b6f024b21ed1719551a74ce876a7b956892008 | R | 6,109 | 162 | library(dplyr)
InputExp <- openxlsx::read.xlsx("../Data/mmc6.xlsx", colNames = FALSE)[,-1] %>% unlist() %>% as.numeric()
OutputDir <- "../Data/Simulation_3D_Test/"
sim_discrete <- function(InputExp, OutputDir,
NGenes = 1000,
NX = 30, NY = 30, numSlices = 10,
... |
8c731f114a058b56fa399effd5072de4b56b2b66e12a76d15aa14461cbd935c8 | R | 6,110 | 202 | ##' Preprocessing
##'
##' @title Data preprocessing
##'
##' @description This function is to prepare data for the \code{ConNetGNN} function.
##'
##' @param data The input data should be a data frame or a matrix where the rows are genes and the columns are cells. The \code{seurat} object are also accepted.
##' @p... |
36414e5839549784fb07224a6adb08134945a74ce2bb2530a80953b10cba60c3 | R | 6,119 | 146 | #############################################################
# Power analysis for discrete patterns
# Figure 4E, Supplementary Figure 20
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatr... |
b21bb9690abcd2c99ea7c8004b23ae90b9108887dfa8920bd7492e053d719803 | R | 6,125 | 166 | # 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', ... |
ee9488efcac6f00f11a781062b90271a5f2bfb1ba4a4ad75e1adc608a7642b21 | R | 6,141 | 137 | 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(tidymodels)
library(here)
library(ggh4x)
library(cowplot)
library(ggpubr)
DATADIR='/proj... |
26ae1119eadc9ad70cc8606de200024d98626ab5eee87a10ebb7017611d5851f | R | 6,145 | 146 | #############################################################
# Power analysis for inconsistent within-plane and inter-plane resolution
# Supplementary Figure 21
#############################################################
# function ----------------------------------------------------------------
# prepare... |
449067b70bedaaa68a48f568513622cf874b936a94dd9125db524e7e8bb5608f | R | 6,147 | 186 | library(ape)
library(geiger)
library(phytools)
library(evomap)
library(parallel)
library(caper)
library(ggplot2)
library(nlme)
library(ggridges)
library(fuzzySim)
library(smplot2)
setwd("your directory")
##Import tree and data
mammals<-read.table("final_compilation with percentage values.R1.csv",head... |
ae7be9580446a83291166d201dd45c2f6bb770354a9ce262ca4d18d91d59e545 | R | 6,147 | 142 | #############################################################
# Power analysis for 3D vs 2D meta-analysis comparision
# Figure 4C
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- fu... |
42e11a3e6d1a7462ea51f0fa42ad553e68be89bd99abcf3b779c55a79666fc67 | R | 6,148 | 188 | library(data.table)
library(Matrix)
library(ggplot2)
packdir <- file.path(here::here(), "package/R")
import::from(.from = "cembav2env.R", .directory = packdir, cembav2env)
import::from(.from = "peak.R", .directory = packdir,
getTopRankClusterForPeakModule,
rankModules)
import::from(.from = "utils.R", .directory =... |
b10990e61fa9466a190f2d922c5af57474d2ee60253994122da1746b92486dc4 | R | 6,148 | 142 | #############################################################
# Figure 4C
# Power analysis for 3D vs 2D meta-analysis comparision
#############################################################
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- f... |
b5b0dce89fb4daf282cd1ff4767d26823485c5941f6b316845222647b5e61f39 | R | 6,156 | 146 | #############################################################
# Power analysis for inconsistent within-plane and inter-plane resolution
# Figure 4F, Supplementary Figure 21
#############################################################
# function ----------------------------------------------------------------
... |
968c20d7dfe720dfb78eb3a3a2a489d5c9d3cf6c7ab7f60490e1c7f3b77196fe | R | 6,176 | 179 | # 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(ggplot2)
library(Nebulosa)
library(patchwork)
library(pbapply)
tenColors <- c('#a9d6e5', '#89c2d9', '#61a5c2', '#468faf', '#2c7da0', '#2a6f97', '#014f86'... |
d4f24722f108dd261b74af92b1b4de4cbd3867550debaa3f1b3eb986949d7447 | R | 6,177 | 234 | library(minfi)
# Read the sample sheet
targets <- read.table("sample_metadata_for_microarray_methylation.tsv",sep="\t",header=T)
head(targets)
# Read the Data
RGSet <- read.metharray.exp(targets = targets)
RGSet
detP <- detectionP(RGSet)
# Normalize the data
GRSet.norm <- preprocessQuantile(RGSet, removeBadSampl... |
8f9d3072d6989436bcd37b6950d3e3e5afb6797268d45e2992c3f3c5e14b9b51 | R | 6,180 | 61 | metabolites_to_go_inchikey <- function(iklist = "AADLTHQNYQJHQV-SVLGDMRNSA-N;ABVVZYXTZLEOHP-CMDGGOBGSA-O;AEUCYCQYAUFAKH-YEUCEMRASA-N;AFSHUZFNMVJNKX-CLFAGFIQSA-N;AFWBWPCXSWUCLB-WDSKDSINSA-N;AWUCVROLDVIAJX-VKHMYHEASA-N;AXKTVZFNYZPELI-GAXXYEEVSA-N;AYKZHWQCRQJYFJ-OWBHPGMISA-N;AYSIAIIEZAVRGL-NKHFZFFVSA-N;BDIIZHQNVIYLPJ-QOSD... |
4ca03f237a97f9335fd8a3ce790cda86715bb7836932860b1a4a771023202685 | R | 6,205 | 115 | #' Enrichment of known oncogenic or custom pathways
#' @description Checks for enrichment of known or custom 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. Cel... |
2a92c3ba058f78fdfbb0b95d4c39629f7af9aea4b0deb8b4375a9e7bcfcf72ab | R | 6,212 | 144 |
# function ----------------------------------------------------------------
# prepare power matrix
powermatrix <- function(InputData){
SVG_index <- 1:1000
NULL_index <- 1001:nrow(InputData)
Labels <- colnames(InputData)[-1]
Power_FDR <- lapply(Labels, function(Label){
LeastData <- c(InputDa... |
8d1e2d3907cab0d821c5c9a92a63d881a400dc63c2b9058b396576a536aa979c | R | 6,216 | 168 | setwd(file.path(path.expand(dirname("~")), "Downloads"))
library(tidyverse)
library(ggplot2)
library(qqplotr)
library(patchwork)
library(abind)
library(RColorBrewer)
WRITE.PLOTS = T
dataset <- read.delim("realtime-cPLV.csv", sep=",")
p.posthoc <- ggplot(data=dataset, aes(x=PLV, group=Condition, fill=Condition, c... |
56eefdcba669945fcd89eaf8b9efaf3efb8a8d3b4ea029525b35fad730b1cdcf | R | 6,228 | 206 | ################################
# LC project
# Script for downstream analyses
# Lukas Weber, Apr 2022
################################
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/
library(SpatialExperiment)
library(here)
library(scater)
libr... |
8e16aa2b9db2e841e8ca8829fe8bf42326565c420d60e6312ed14706899a26f1 | R | 6,235 | 155 | # Gregory Way 2017
# PanCancer Classifier
# scripts/snaptron/investigate_silent_junctions.R
#
# Analyzes and plots junctions observed in c.375G>T mutant TP53 mutations
#
# Usage: Run by scripts/snaptron/dna_damage_repair_tp53exon.sh
#
# Output:
# Plots of exon-exon junctions for c.375G>T mutated samples and a random se... |
83ab8cdbda980cbc958b0bce6bda706202e8b00c449eea8b96332cbbd6db947b | R | 6,244 | 236 | library(BPCells)
library(Seurat)
library(SeuratObject)
options(Seurat.object.assay.version = "v5")
# Reference:
# https://satijalab.org/seurat/articles/seurat5_bpcells_interaction_vignette
library(future)
plan(multicore, workers = 2)
options(future.globals.maxSize = 20000 * 1024^2)
options(future.rng.onMisuse="ignore"... |
6decf395b18c1f685618bb52e60ffef8935485f01f3c2771b3763a6d75d38512 | R | 6,258 | 135 | 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... |
e65c6195b9fcdc0bf72643d928c2f473ee0e02fdae68a1b5674c3cf2ec5f0b8a | R | 6,260 | 223 | #############################################
# LC project
# Downstream analyses using manual annotation
# Lukas Weber, Nov 2021
#############################################
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/pilotLC_LIBD001/locus-c/
library(SpatialExperim... |
8b077852208166fce4d9b7f5bb4536c353a237dc352714b5349f67b543eff63e | R | 6,262 | 156 | #setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(Seurat)
library(glue)
library(stringr)
source("../../Utils/utils.R")
source("../../Utils/Feature_selection_methods/Traditional/doDE.R")
source("../../Utils/Classification_me... |
9171c68c251bcd97ee544d8f4afaeacebbf1a9ae10c08a56d79efa9f7c327ab3 | R | 6,285 | 123 | #' Performs survival analysis for a geneset
#' @description Similar to \code{\link{mafSurvival}} but for a geneset
#' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}}
#' @param geneSet gene names for which survival analysis needs to be performed.
#' @param minMut minimum number of mutated gene... |
29712bfb00ed32ab6726948d3f74dedfea045c70bf74657625d45ea986e7512a | R | 6,293 | 167 | ---
title: "Plot evaluation"
author: "Hao Huang"
date: "07/07/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load
```{r}
suppressPackageStartupMessages({
library(ggplot2)
library(glue)
library(reshape2)
library(ggpubr)
})
```
```{r}
topN = 10
```
# Sett... |
e19f360673c976fc176443fcd64fb8b1e9b0b321c991e01c605bc69c19268985 | R | 6,301 | 185 | # library(tidyverse)
# library(DT)
# library(shiny)
# library(shinythemes)
#
# example_df <- data.frame(
# x = c("$1", "-2%", "$3"),
# y = c("$10", "10%", "$20"),
# z = c("$10", "-10%", "$20"),
# w = c("-$10", "-10%", "$20")
# )
#
# editTable <- function(DF, outdir=getwd(), outfilename="table"){
#
# # based o... |
6eb699e65c5642c7c547d21aab42642e31a427f97780ff47a215f32a05dca725 | R | 6,317 | 206 | ###########validate Hes1 targets
#netfile='../Communities/Networks02/W45infomap.txt'
#N=read.table(netfile,sep='\t',header=TRUE,quote="")
#pimW45=merge(A,N,by.x=1, by.y=1)
#######################
#This piece of code gives in output also which are the communities you want to look for the targets
############
target= 'H... |
03e169d5ea21633a9a73d1fbe0f7e93d3d32e99c79cabf7ab93b91718306a0ca | R | 6,323 | 223 | ##################################################################
# LC project
# Downstream analyses on TH+ spots: with Harmony batch integration
# Lukas Weber, Nov 2021
##################################################################
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/liebe... |
216973ada51f4042a736c469248efd0be3457415e7153bda5fec977e51ec454d | R | 6,336 | 194 | #################################################
##### Summary statistics and other analysis #####
#################################################
# Last edited: 17/07/23 by LVB
# Description: Summary statistics and other analysis which appears ad-hoc in the
# paper and SI.
#----- Packages
library("tidyverse")
#... |
9f45acf7c5d3b31e56056c30b16d3b1e392f7b0538a26940b0f421d78eeeb103 | R | 6,336 | 195 | library(dplyr)
library(stringr)
library(ape)
library(hash)
orthogroup <- read.csv("orthogroups.tsv",sep="\t",stringsAsFactors = F)
rapid <- readLines("Expanded_contracted_OGs.txt")
split<- c()
rapidlist <- list()
for(i in 1:length(rapid)){
ln <-str_match_all(rapid[i],"OG[0-9]+\\[[-~][0-9]+\\*\\]")[[1]]... |
eb1d862c2f563c83a6d19958212ddf40e43fc51e23093138fca491c00b80cd73 | R | 6,336 | 137 | #!/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(futu... |
c9bf3ef93b24dea274b091b54f0ce6a731c020f427f90c323a031de2b81e516a | R | 6,341 | 145 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(rlang)
library(writexl)
## main differential gene expression package
library(limma)
library(SingleCellExperiment)
library(edgeR)
library(swfdr)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, spl... |
dc4fc9ba1b144343ea13e9e3259c0305e74535744957859a8353e70737862740 | R | 6,341 | 145 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(rlang)
library(writexl)
## main differential gene expression package
library(limma)
library(SingleCellExperiment)
library(edgeR)
library(swfdr)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, spl... |
7972d9136e15dd9b4b2db81c3b6f553d9d6ac429c5ee50e641b4a782ba917bf3 | R | 6,353 | 122 | ---
title: "Analysis of Sex Differential Effects in Vglut Cre MPRA"
author: "Stephen P Plassmeyer"
date: "9/01/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
source('../../../code/mpra_tools/mpra_tools.r')
library(patchwork)
```
# Load and Format Data
```{r}
compiled... |
b63f5ec4f9661eac13dbbe3fd4b42df4e33cb3dae93bc6e16f04b09bf8fc5e4b | R | 6,361 | 145 | ### Visualize expression of IHC-matched and neuronal genes via quasiviolins and sparklines
library(SingleCellExperiment)
library(monocle3)
library(here)
library(dplyr)
library(ggplot2)
library(stringr)
library(purrr)
source(here("scripts/accessory_functions/prep_sparklines_data.R"))
cds <- readRDS(here("6month_LMMP... |
0da76c6a68ab977e8c7699acfa42ea2a51ec8d55ce9e91b8506203b7595a814e | R | 6,367 | 165 | # LOY analysis in leukocytes from RCC donors by snATAC
#########################
# figure snATAC umap
library(Seurat)
library(here)
library(ggplot2)
library(dplyr)
# create a plot dir
plots <- here("ckd","figures")
dir.create(here(plots))
srat <- readRDS(here("ckd","atac_aggr_prep_rccleuk","step4_anno.rds"))
plotA <... |
c7dd3d701eea3a2728e898dbe54177b96d2b29a51fed13b1ce8c4b296a71d2ba | R | 6,389 | 147 | library(Seurat)
library(matrixStats)
library(dplyr)
library(pheatmap)
library(ggplot2)
library(ggrepel)
# n.master.regulators.r <- 0.005
# n.tight.strong.targets.r <- 0.1
# n.tight.medium.targets.r <- 0.1
# n.tight.weak.targets.r <- 0.1
# n.multi.targets.r <- 0.3
# n.rest.r <- 0.395
#
# design <- "5000.gene.3ct"
# n.... |
9dcc82cae9c601355b2b053a0a1bcf213e5be7bae04cf6ab2dcf2e72669b6023 | R | 6,394 | 175 | # Load library
library(shiny)
library(shinythemes)
library(shinydashboard)
library(caret)
library(randomForest)
library(data.table)
library(xlsx)
library(readxl)
library(ggpubr)
library(grid)
library(ggplot2)
library(ggpmisc)
library(dplyr)
#Load data and trained model
load("www/RFmodel_220604_21.RData")
load("www/Ab... |
8d41179d04ddf74271f971a540e0d490c1f7a0c9731cceed64a9dfde35f9ba51 | R | 6,408 | 200 | ```{r}
source("../../src/setup.R", echo = FALSE)
```
<!---------------------------------------------------------->
<!---------------------------------------------------------->
# I. Data
***
```{r}
(supplementary_data <- load_supplementary_data())
```
```{r}
(OS_data <- load_pcr_data("OS", reprocess = TRUE, max_cq_c... |
5e627e2aa770ebb20431f0c21e263797ccba4011cabbe785c8d2ed591c7b8784 | R | 6,427 | 171 | options(scipen=20,stringsAsFactors = F)
RESOL=25e3;names(RESOL)='25K'
source('hic_helper.R')
library(foreach)
library(doParallel)
registerDoParallel(6)
outDir='/path/to/fetal_hic/hicpro/loop/DE/'
chrom_path='/path/to/chrom'
merged_info=data.frame(loop_path=file.path('/path/to/fetal_hic/hicpro/loop',
... |
366728c2388b2c53c62df643bf43d0369e2f293ec30b7faaeb63efcb95c62ed8 | R | 6,431 | 154 | library(Seurat)
library(copykat)
library(dplyr)
library(gsdensity)
library(ggplot2) # for plotting
library(reshape2)
library(msigdbr)
library(pheatmap)
library(ggrepel)
tnbc1 <- read.delim("GSM4476486_combined_UMIcount_CellTypes_TNBC1.txt")
meta <- as.data.frame(t(tnbc1[1:2, ]))
tnbc1.mat <- tnbc1[3:nrow(tnbc1), ]
tn... |
f9cc687ae82c00446ae9b3f052b7819e52940ab1d58bd54449982467ce65da89 | R | 6,434 | 130 | # Import necessary libraries
library(tidyverse)
library(readxl)
library(plotly)
library(ggbeeswarm)
library(cowplot)
library(rvg)
library(svglite)
library(openxlsx)
library(gridExtra)
library(extrafont)
# Function to finish calculation/formatted of imputed dynamic variable set
prep.imp.dynamic.set <- function(curr.dyn... |
f4008ebea3f524159213dbd3aff2d1e4c6724ac527fb65bd9f29c8a4387ea1bd | R | 6,444 | 223 | #########################################################################
# LC project
# Downstream analyses on TH+ spots (high): with Harmony batch integration
# Lukas Weber, Nov 2021
#########################################################################
# module load conda_R/4.1.x
# Rscript filename.R
# file loc... |
e05fd4902be3807caefbc33a5ac171127f4e249bbe96c399b21c1943c29f5a7d | R | 6,456 | 94 | initial <- list()
################################################################################
# Settings for Reduced dimension plot 1
################################################################################
initial[["ReducedDimensionPlot1"]] <- new("ReducedDimensionPlot", Type = "UMAP", XAxis = 1L, YAxis... |
f86b486896da9895dc525ebc176c5637b9f110dad913c8d4469cb67ccb6c1d55 | R | 6,459 | 113 | ##This is the main script for running the simulations for training the neural network for the Two Pulses 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/person... |
a0e50493831b3cb1ce7be219d924724388c2f4d8d4e54ae85e13905ffdf34f23 | R | 6,466 | 141 | #' Performs sample stratification based on signature contribution and enrichment analysis.
#'
#' @description Performs k-means clustering to assign signature to samples and performs enrichment analysis. Note - Do not use this function. This will be removed in future updates.
#'
#' @param maf an \code{\link{MAF}} object... |
6bf75d79a3b9fddf8328957df57d5a42ade7f16794063546a5399426e2e96f54 | R | 6,481 | 147 | #'Plot results from mosdepth output
#' @param bed mosdepth output
#' @param col Colors. Default c("#95a5a6", "#7f8c8d")
#' @param sample_name sample name. Default parses from `bed`
#' @param segment Performs CBS segmentation. Default FALSE
#' @references Pedersen BS, Quinlan AR. Mosdepth: quick coverage calculation for... |
8e4fecbb6cf8d6830142726f1871bb4e34ee77ce5cfa2aed0ebd77e6cf2e76c1 | R | 6,481 | 163 | ---
title: "MG A549 experiments - DEA and exploration"
author: "Pierre-Luc Germain"
date: "2023/07/17"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
```{r}
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(SEtools)
library(sechm)
library(edgeR)
lib... |
641e6f15c52771127fd263c6210478d215d8e875f2b057134e3cddf2c9b3a8d2 | R | 6,482 | 129 | 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("pheatmap") #used for heatmaps
library(ggrepel... |
aba5a5a646730b8305e2f3799ee3c90e5e32ee7caca0d3b7f0833e69da50f364 | R | 6,490 | 161 | # Gregory Way 2017
# PanCancer Classifier
# scripts/viz/ras_ccle_pharmacology.R
#
# Visualize correlations between Ras classifier score and two MEK inhibitor
# activity (AZD6244 (Selumetinib) and PD-0325901)
#
# Usage: Run in command line
#
# Rscript --vanilla scripts/viz/ras_ccle_pharmacology.R
#
# Output:
# Overa... |
f7a567c966a0252c3b1df2e0d2c88a267c2c81dda83564810d4661aad89315f4 | R | 6,491 | 142 | library(Seurat)
library(dplyr)
library(Matrix)
library(ggplot2)
library(ggpubr)
#library(limma)
library(dendextend)
library(ComplexHeatmap)
library(genefilter)
library(circlize)
col_fun = colorRamp2(c(-0.3, 0, 0.3), c("blue", "white", "red"))
col_fun <- colorRamp2(c(-0.3, 0, 0.3),c('#6E377D',"white",'#EBB4... |
efcdd7b0c1ec0c920da34e0301de72d37d044e9fb2ef9dd2648649cae32821e0 | R | 6,495 | 141 | #' Plots maf summary.
#'
#' @description Plots maf summary.
#'
#' @details
#' The SNV Class plot combines complementary substitutions from both DNA strands (e.g., A>G + T>C are shown as "T>C").
#' This means counts will differ from tools like bcftools that report each substitution separately.
#' See \code{\link{titv}} ... |
4ce73eb8a6de7c3a9ed2df0bdb1490e78e141cf7b9b0c6fee0a72383f50583ed | R | 6,500 | 164 | # This code is to evaluate the relation between cv and brain size
# WANG. 18-Sep.-2024
# Remove all objects created before to prevent clash
rm(list=ls())
library(dplyr)
library(ggseg)
library(ggplot2)
library(tidyr)
library(patchwork)
# Set the working directory to the path where your files are located
setwd("/Use... |
3c63e513e3a9bc23a9b7015b7ae25ee995a46494804b56f501e0609641b971bb | R | 6,510 | 203 | library(stringr)
library(ggplot2)
library(purrr)
library(dplyr)
packdir <- file.path(here::here(), "package/R")
import::from(.from = "sa2Leiden.R", .directory = packdir,
LeidenSum,
newLeidenSumFromPickleFile,
getCluster2Size,
getBarcode2ClusterName)
import::from(.from = "cembav2env.R", .directory = packdir,
... |
4ad18ced6b5b639a47b75b6fdfb859bf39c55a96b1d93ff476d56d95f4aca41c | R | 6,514 | 172 | # 20.1.2021, Matti Pirinen (matti.pirinen@helsinki.fi), Heidi Hautakangas
# Create FIGURE 3 in Hautakangas et al. 2021
# "Genome-wide analysis of 102,084 migraine cases identifies 123 risk loci and subtype-specific risk alleles"
#Includes:
#1. Bayesian model comparison between subtype-specific models and shared effec... |
5661948b611066fdf931d2968ec77967384acad423a540103f7349a1c66e7808 | R | 6,514 | 149 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
#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,
... |
829b4c7d0dbc35d52c1e9960c70cf01f21da601ca33984671d768d0a006fb7f8 | R | 6,535 | 152 | ---
title: "Implementing edgeR Count Normalization"
author: "Stephen P Plassmeyer"
date: "7/13/2020"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(edgeR)
source('../../mpra_tools/mpra_tools.R')
```
The verdict seems to be that for the worst case of library represent... |
452aa2a6f2fac21c491881e548900794ce9946e01fd81f14c29d9dafcc83dffb | R | 6,539 | 160 | # add overall column for Table 1 and 2
# 7.1.21: add supplemental o2
# 11.11.21: update Table2 based on DataMgt 11.11.21
library(plyr)
library(tidyr)
library(dplyr)
library(Hmisc)
library(writexl)
library(ggplot2)
load('~/Box/CCC19_TS/48 - Breast cancer/Data/Project48_Data_Tab12_8.29.21.RData')
input=input[which(inpu... |
472b44de0c4d1aadc69d39573c04af570d256af282cc1ef4464004115ea9a795 | R | 6,545 | 237 | #############################################################
# LC project
# Downstream analyses on spots from manually annotated region
# Lukas Weber, Jan 2022
#############################################################
# module load conda_R/4.1.x
# Rscript filename.R
# file location:
# /dcs04/lieber/lcolladotor/p... |
530476044b82255a7ace1d4fec95bf2006d4934c7dff43cae2625ccc5784f99b | R | 6,549 | 138 | library(Seurat)
library(ggplot2)
library(ggrepel)
library(UpSetR)
library(copykat)
library(gsdensity)
library(dior)
pc <- readRDS("visium_prostate_cancer.data.rds")
pacc <- readRDS("visium_prostate_acinar_cell_carcinoma.data.rds")
oc <- readRDS("visium_ovarian_cancer.data.rds")
ic <- readRDS("visium_intestinal_cancer.... |
858dc0ac3616bf221df3487b97662eba4789aad1cad1b57f4a26ff6f3c20e3fb | R | 6,555 | 147 | ### Visualize expression of IHC-matched and neuronal genes via quasiviolins and sparklines
library(SingleCellExperiment)
library(monocle3)
library(here)
library(dplyr)
library(ggplot2)
library(stringr)
library(purrr)
source(here("scripts/accessory_functions/prep_sparklines_data.R"))
cds <- readRDS(here("tc_lmmp_p20... |
444fe06c04130b4fe64ce25741e3d083acd063788dea8618c9e7f1ba9ba30f89 | R | 6,570 | 181 | #DE analysis with covariate selection
#packages
#source("/Users/xiangningxue/OneDrive - University of Pittsburgh/Research/Analysis/DE_Analysis/DE_CovSelect_LM.R")
source("/home/xix66/code/DE_CovSelect_LM.R")
hdir = "/home/xix66/Seney/Collaboration_HumanPyramidalNeuron"
setwd(hdir)
out.dir = paste0(hdir, "/DE_CovSelect... |
cbb7e64a8313e928a2a6954b9d5a68b5df2ca8a8f6acf8115115e3a5ba22d6a0 | R | 6,570 | 131 | library(phylostratr)
library(tidyverse)
setwd("/home/benjamin/Documents/LF_2020_repo/Genomic/Phylostratigraphy/Pdom")
weights=uniprot_weight_by_ref()
focal_taxid = '743375'
strata =
# Get stratified relatives represented in UniProt
uniprot_strata(focal_taxid, from=2) %>%
# Select a diverse subset of 5 or fewer ... |
5d9d6fb9ce95294c6b6d4ca862a55a7a7ba0671afb2f313e06ebb65aa22ce119 | R | 6,579 | 199 | ---
title: "R Notebook"
output: html_notebook
---
# Set Up
```{r setup}
knitr::opts_knit$set(root.dir = normalizePath("../.."))
```
# Imports
```{r}
library(candisc)
library(ggplot2)
library(dplyr)
library(RColorBrewer)
source('functions/explained_variance.R')
source('functions/heatmaps.custom.R')
```
# Load Data
``... |
5a87f1d6243eee2515cc249321a689e69112aac66c2d5773ccbb7e0ca883a743 | R | 6,580 | 287 | ## conda environment can be created from https://github.com/brianherb/HumanHypoDev2Adult/blob/main/Hypo_R_Env.yml
library(dplyr)
library(chooseR)
library(matrixStats)
library(tictoc)
library(boot)
library(ggplot2)
flexsplit <- function(dat,char){
test=strsplit(as.character(dat),char,fixed=TRUE)
n.obs <- sapply(test, ... |
5f880e983e2ff5e11769cf0ba01a0a518c6366cf992897fc78d0d2660b572179 | R | 6,596 | 159 | ---
output: github_document
---
# scPOP
`scPOP` is a lightweight, low dependency R package which brings together multiple metrics to evaluate batch correction for single cell RNA-seq.
The package includes the Local Simpson Index (LISI) and Average Silhouette Width (ASW) metrics from Harmony and kBET, respectively, a... |
81232c5407847f3527d178317a1614270b2a991e6d8e0fa673647fd1d164292d | R | 6,596 | 243 | ##################################################################
# 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 -... |
915ba9b61adf49863cd906c5a404acdd25cacfb01abfe1c631b6ca88b68fed19 | R | 6,611 | 135 | #' Plot the comorbidity analysis results in a heatmap.
#'
#' Given an object of class \code{cAnalysis} or \code{molecularcAnalysis} obtained from a comorbidity analysis,
#' a heatmap is obtained.
#'
#' @param input A \code{cAnalysis} or \code{molecularcAnalysis} object, obtained
#' by applying the \code{comorbidityA... |
b1ad9db0c1ff5d411bbfbf3ebbc24498d27730880edc5a51bd86b9f34ca50de9 | R | 6,616 | 147 | ## conda activate r4
## packages for data table processing
library(here)
library(tidyverse)
library(rlang)
library(writexl)
## main differential gene expression package
library(limma)
library(SingleCellExperiment)
library(edgeR)
library(swfdr)
ss <- function(x, pattern, slot = 1, ...) {
sapply(strsplit(x = x, spl... |
b5bb1c8f859f67924dba08b8e64397c5067de78ccf554b7d043a8a439ecbd9a3 | R | 6,631 | 183 | ## 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... |
43bb53afd148dd5febdcba82f11b46cc8cb3d5a846a4a446afcf7420c5cffbff | R | 6,640 | 178 | #-----------------------------------------------
# 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 ... |
a70678df4da73d9d8cf3a72772d379c635bfa5eecb6f38126cda3c33f2755606 | R | 6,645 | 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... |
783c469cdcdcb1ee5cf81ba461fb17690d65a576f2a007cdfb5c5bbf6667e083 | R | 6,653 | 155 | #' Query your data and generates a \code{datafame}
#'
#' Given an object of class \code{cAnalysis} obtained from a comorbidity analysis,
#' the comorbidity direction can be estimated. An object of class \code{dataframe}
#' is obtained.
#'
#' @param input A \code{cAnalysis} object, containing the comorbidity data for
#... |
bd1161ab182f5714c328d0c266fde9cfe113cda56eca29cd4448f5874cef5247 | R | 6,654 | 131 | #to identify clusters/cell-types whose membership changes with histopathological parameters
rm(list=ls())
library(lme4)
library(dplyr)
require(magrittr)
library(Seurat)
library(ggplot2)
#set all directory paths
sourcedir<-"~/Dropbox (Gladstone)/YH_MN02/seurat_analysis_no_S521G/03_log_odds_calculation/"
histodir <- "~... |
dfc8b6e4fdac556ae54c8ac69e747c207782c5fd72146bb1ca1de843d08eee60 | R | 6,655 | 237 | library(GenomicRanges)
library(data.table)
library(ggplot2)
library(ggsci)
library(scales)
library(future)
library(Seurat)
library(Signac)
library(BSgenome.Hsapiens.UCSC.hg38)
library(EnsDb.Hsapiens.v86)
options(future.globals.maxSize = 50 * 1024^3)
plan()
## Enable parallelization
plan('multicore', workers = 12)
pl... |
95c78e786968a2ecdb057a67bc5779c8d6f65c6fd6f07728f0d476cb0be1f097 | R | 6,660 | 278 | ---
title: "DEXSeq"
author: "Marika Oksanen"
date: "2022-09-15"
output: html_document
---
This markdown includes DEXSeq analysis between HNRNPU deficiency models and their respective neurotypical controls at D0, D5 and D28.
Please note that HNRNPUdel is occasionally referred as ASD12BII
```{r}
library(DEXSeq)
libra... |
6839d51295466b6bf9deec5e1cbe1b19109febcd9040162616737a3f93cbed10 | R | 6,666 | 157 | #!/usr/bin/env Rscript
#load required packages
library(Seurat)
library(dplyr)
#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,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.