sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
04877489804e8657572d88d92619b1006a9f793f0900e496b2d520ed070608ba | R | 11,400 | 200 | ---
title: "Vignette_4: Pathway categorization and Similarity Measures"
output:
html_document:
theme: united
toc: yes
vignette: "%\\VignetteIndexEntry{Vignette} \n%\\VignetteEngine{knitr::rmarkdown} \n%\\VignetteEncoding{UTF-8}\n"
editor_options:
markdown:
wrap: 72
---
```{=html}
<style ... |
341fbbbaf1ed147e95705452f957c6cc719b257f6765b36af773b6a3092ca5db | R | 11,418 | 249 | #' Creates a manhattan plot
#'
#' Creates a manhattan plot from PLINK assoc output (or any data frame with
#' chromosome, position, and p-value).
#'
#' @param x A data.frame with columns "BP," "CHR," "P," and optionally, "SNP."
#' @param chr A string denoting the column name for the chromosome. Defaults to
#' PLI... |
9989c97f57acea7c6ab0f3ceca23fe59e92f683b2abe1724bbfb78050e077114 | R | 11,424 | 353 | ####install libraries####
# {
# install.packages("nlme")
# install.packages("data.table")
# install.packages("emmeans")
# install.packages("lmerTest")
# install.packages("lattice")
# install.packages("plyr")
# install.packages("ggplot2")
# install.packages("Renext")
# install.packages("ggsn")
# ins... |
48776075ed9be9c2409ed03d37b1f8d32260ce7f01b1521dca71ee8905346c27 | R | 11,464 | 256 | source('code/misc/miscfxns.R')
##################################
### Atlas conversion functions ###
##################################
map.ABA.to.CNDR <- function(X.ABA,CNDR.names,ABA.to.CNDR.key){
#### NEED TO ENSURE ALL REGION NAMES ARE CORRECT ####
# Input:
# X.ABA: named matrix of values associated with AB... |
ecbda26709f51ae499ab2c51bae78280ce8994384be120714ea4d0710c7e069d | R | 11,477 | 226 | ---
title: "Some important parameters for UCell"
author:
- name: Massimo Andreatta
affiliation: Department of Pathology and Immunology, Faculty of Medicine, University of Geneva, 1206, Geneva, Switzerland; Swiss Institute of Bioinformatics, 1015, Lausanne, Switzerland
- name: Santiago J. Carmona
affiliation: Depart... |
62e1cd65e3f42ab8394e34b5ba97ea6e3829b28f5fa75edfe7dad5c7406757cf | R | 11,484 | 259 | #' Normalization and Standardization of RNAseq data
#'
#' Library normalization of count values and standardization with rank and ratio
#'
#' @param counts Numeric matrix of raw count values from RNA sequencing (e.g. genes x samples)
#' @param groups Character vector, each element indicates the group of the sample in t... |
cc79ceb6d392a7e61045412fb947bdfaf02e047657e4bc1e234f890b46478097 | R | 11,496 | 299 | ---
title: "Genetic demultiplexing vs. cellhash"
author: "Josh Shapiro for CCDL"
output:
html_notebook:
toc: true
toc_float: true
params:
lib_id: "SCPCL000535"
---
# Set Up
Libraries:
```{r setup}
suppressPackageStartupMessages({
library(ggplot2)
library(SingleCellExperiment)
})
set.seed(2021)
```... |
cb81fbac55113ce0a823bc04cd5c0e1a73086b86d0954cc2ab4ce00e7a0e2dd5 | R | 11,559 | 465 | ---
title: "MCI Park Analysis - Permutation ANOVA"
date: "2023-07-15"
output: html_document
author: Xuanyi Lin
---
Permutation ANOVA of the median bout duration are run for wake, REM, NREM, and sleep, respectively.
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(readxl)
library(dplyr)
library(... |
5a9bcb13f86399e9dcba885bc0d160041e659d9f50474502c44e42a722e4b7f1 | R | 11,566 | 288 | #############################################################################################
# These codes have been costumly designed for brain network analysis of 1-2 time point data,
# in our case, acquired by immunolabelling of activity-dependent proteins (i.e. c-fos, Arc)
#
# Many functions here have been largely... |
16c60bc6d2ed1fcdeb80cd9039dedf02f568a4b03c55b3f45a280bc132413210 | R | 11,576 | 341 | setwd('/work/AnneSophiaHartebrodt#6698/ms-project/')
require(rhdf5filters)
require(rhdf5)
require(Rhdf5lib)
renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell')
renv::repair()
set.seed(11)
library(harmony)
require(data.table)
require(SingleCellExperiment)
#BiocManager::install("plger/scDblFinder... |
1845ef5f36e21a092ee0adb016c239df3ef018fbaa77240db24a451527ee2ab5 | R | 11,678 | 244 | library(dplyr)
library(gratia)
library(magrittr)
library(mgcv)
library(rjson)
library(stringr)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly=TRUE)
config_file <- args[1]
##################
# Set Directories
##################
config <- fromJSON(file = config_file)
data... |
a001e0ef290c3b1cbd2290cd7bf95e4f6a1045eec6e3d8952fc306ec6dc09f7f | R | 11,713 | 348 | #
# Making a seurat object of Tau THY-21 cortex samples - scRNA-seq
#
library(Seurat) # Seurat_4.3.0
library(ggplot2) # ggplot2_3.4.2
library(cluster) # cluster_2.1.4
set.seed(1)
files = dir()[grep("DGE",dir())]
rmsum = grep("Summary",files)
files = files[-rmsum]
files
#01WTM_scRNA_MM48_NPG_S1_DGE... |
6c9be3e37275162f61834953d5ff7d0c36654efba8901fc4c98ee3edbf27c11c | R | 11,841 | 336 | #' Initialize StellarPath required python packages
#'
#' Initialize StellarPath required python packages to call from R.
#' Credits for this function go to spacyr R package: https://github.com/quanteda/spacyr/tree/master/R
#' Respect for these fellow R developers who developed a way to automatically create and detect a... |
6341afbd5d6bf47f7f1ce6d455535f88cc048fc7759820d230c86b6d8bd5a78f | R | 11,852 | 309 | library(lubridate)
RV1=read.csv("revisits_12min_threshold with vedba2023_2_hour.csv")
RV1=RV1[,-1]
studaydays2=unique(RV1$day)
IDs=unique(RV1$ID)
RV2=read.csv("FFT Daily Path Length 2023.csv")
RV2=RV2[,-1]
RV2$date=as_date(RV2$date)
RV2=RV2[
with(RV2, order(ID, Study_day)),
]
tmpiddat=unique(data.f... |
6f611a3258c7c42184a9c34be109cd1e34b37e3c5112177379dc1c702b2418c3 | R | 12,009 | 257 | ---
title: "MiQC Exploration for ScPCA"
author: "Ally Hawkins for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
In this notebook, we are interested in exploring the use of [miQC](https://github.com/greenelab/miQC) as an additional approach to filtering cells to remove any remaining cells that m... |
a04ddc34c6ec96ac3e83e73f4837685e0b31a34ee9e23ec3ff766d3fe09c8210 | R | 12,079 | 296 | # 1) regional differences between hemispheres
# 2) features' age sensitivity
# 30.10.2023 Max Korbmacher (max.korbmacher@gmail.com)
## PREP ####
# packages
library(tidyquant)
library(afex)
library(effects)
library(dplyr)
library(reshape)
library(ggplot2)
library(tidyr)
library(viridis)
library(lme4)
library(MuMIn)
li... |
10dbfb3dc95c8616bcfd4e163ddc5057d21da100a5bd62e19b49b1c910609aa0 | R | 12,186 | 480 | ---
title: "Whole Eye and Retina samples"
output:
html_document:
df_print: paged
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r, libraries}
library(Seurat)
library(cowplot)
library(SCFunctionsV3)
library(dplyr)
library(tidyr)
library(stringr)
library(t... |
5f481b24c48403ec25b650dc06bb9e2eb99b06e05422ba37e8ca232999d951dc | R | 12,200 | 338 | ---
title: "220920_disease_genes_plots"
author: "Jennifer Fisher"
date: "9/20/2022"
output:
html_document:
toc: true
theme: united
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# START
Goal/Purpose of operations:
The DepMap/PRISM’s primary and secondary pooled drug screen... |
c417307b0850506604b993137620e7a2c9099ad24e56b7bd10b60cde7e66254a | R | 12,292 | 215 | source('code/misc/miscfxns.R')
lm.mask.ant.ret <- function(y,Xt.retro,Xt.antero){
# fit linear model: y = b0 + b.r*Xt.retro + b.a*Xt.antero + error
# given Xt.antero and Xt.retro for a given set of time constants
# return pearson r between y and y-hat (predicted vs actual path)
#
# INPUTS:
# y: observed l... |
e2f7a0de5409786d85cb6e91ef3634786b1d088b0c94ef88eb4516d22b8ebfba | R | 12,297 | 324 | getFP <- function(ReadsTableName, CFUtable, WhereAreReferences, minweight, outputfilename) {
library(EnvStats)
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
if(!is.null(CFUtable)) {
CFUtable <- read.csv(CFUtable)
}
ReferenceVector <- rowSums(cbind(ReadsTable[,WhereAreReferences]))
... |
e6a1e7253d4548fe26203f2881992c989ce8791bde082c6539d97266cef9e9f1 | R | 12,315 | 304 | ---
title: "figure s2-revision"
author: "Pavitra Roychoudhury"
date: "2024-02-13"
output: html_document
---
Cluster annotation
on dataset after integration and doublet identification
```{r}
rm(list=ls())
library(Seurat)
library(SingleR)
library(SingleCellExperiment)
library(celldex)
library(tidyverse)
library(Polych... |
04a8cd5f065899f91d670d31b33e9905c66aa4c8a482a820b34182aca4923390 | R | 12,471 | 336 | .libPaths("/home/u23/haozhang1/miniconda2/envs/seurat/lib/R/library")
# from https://github.com/satijalab/seurat/issues/5257
# the error in MapQuery() is caused by an update in uwot
# need to install the previous version of uwot and restart the RStudio session to solve this error.
# devtools::install_version("uwot", v... |
e62745716dee094673dc938d7d00d61f8ab7e544225e7758bd347cd628bfdd59 | R | 12,477 | 405 | ---
title: "Exploring cellhash data"
author: "Josh Shapiro for CCDL"
output:
html_notebook:
toc: true
toc_float: true
params:
lib_id: "SCPCL000533"
---
This notebook explores processing cellhash data, separating samples by hashed barcodes.
# Set Up
Libraries:
```{r setup}
suppressPackageStartupMessag... |
9930278ba5e08992003e653b7febff9596d842e068b98c2a7638b642ded4627f | R | 12,488 | 294 |
# mf.indices
#
# Marco Del Giudice (2024). Version 1.0. Contact: marco.delgiudice@units.it
#
# An R function that calculates four alternative masculinity-femininity (M-F) indices from a set of variables, and draws summary plots if desired. The four indices are: sex-directionality (mf.D), sex-typicality (mf.T), sex-p... |
df5902b2303832d354f1aea4c2b1b31f43c863c91869a8abebe8ed4294b0c946 | R | 12,507 | 276 | #Load interpolated data (data run in parallel in chunks)
load("~/workspaces/onetofour.RData")
load("~/workspaces/fivetoeight.RData")
load("~/workspaces/ninetotwelve.RData")
load("~/workspaces/thirteentosexteen.RData")
load("~/workspaces/seventeentoeighteen.RData")
load("~/workspaces/nonteentotwentytwo.RData")
lo... |
99054ad65a80cf5753afbed31e86938ecfd03c72a4f169ff4d38200206c3e457 | R | 12,601 | 219 | ---
title: "Parcellate Sensorimotor-Association Axis for Glasser, Schaefer200 and 400 (7 and 17 Network), and Gordon"
author: "Audrey Luo (adapted from Valerie Sydnor)"
output: html_document
---
```{r setup}
library(ciftiTools)
ciftiTools.setOption('wb_path', '/Applications/workbench/')
library(cifti)
library(plyr)
`... |
fea8df4bc5833f95834560eb60e55ed92b22e36e418357fa324f59ecc57d7980 | R | 12,674 | 267 | #############################################################################################
# This is an implementation of the anogva procedure described by
# Fujita et al, 2017 DOI: 10.3389/fnins.2017.00066
#
# Important noteÇ In Fujita 2017, this procedure is applied on a population of graphs representing
# subje... |
15e24c07caf5f17ca045a5c46418289b2055352532bff5ee75cacbd67838adcf | R | 12,767 | 398 | if (!('Matrix' %in% installed.packages()[,'Package'])){install.packages("Matrix")}; require(Matrix)
source('/home/cesar/Dropbox/R/Network sufficiency/Modular_codes/signed_louvain.R')
agreement <- function(comms){
#
# This function was adapted from the function agreeement in the Brain connectivity toolbox
# (htt... |
166987b177b42e8acd1340ed01b869e205ea0af2907ac570ab3d75122fad53f2 | R | 12,792 | 210 | ---
title: "Tutorial for network spreading models in neurodegeneration"
author: "Eli Cornblath"
date: "1/15/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Getting Started
You will need to visit [my github repository](https://www.github.com/ejcorn/tau-spread) for... |
f8883d310392919785be4cbde8ef4f397df2dfa65d303af004756bda7480fb4d | R | 12,860 | 516 | setwd('/work/AnneSophiaHartebrodt#6698/ms-project/')
require(rhdf5filters)
require(rhdf5)
require(Rhdf5lib)
renv::activate('/work/AnneSophiaHartebrodt#6698/ms-project/r-single-cell-new')
renv::repair()
set.seed(11)
require(Seurat)
require(data.table)
require(SingleCellExperiment)
require(scds)
require(ggplot2)
require... |
84eae253cd9c929a032f5a6da1a1ef9449be5a7cf44446fa5fd8528bc5049de0 | R | 12,881 | 193 | library(introdataviz)
library(ggplot2)
source("00-utils.R")
devtools::load_all("breaktools/")
replication_fork_length = function() {
dir.create("reports/09-replication_fork")
#
# Load Repliseq
#
repliseq_df = readr::read_tsv("data/repliseq_zhao_bmc2020/repliseq_ESC.tsv") %>% dplyr::mutate(Run="Zhao_mESC")
... |
f19da42b6c78210037d6e86c4ea753c12a3737205d185ebfac8c5fc341492904 | R | 12,894 | 386 | ---
title: "Alevin-Fry Five Prime"
author: "Ally Hawkins for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
This notebook compares using Alevin-fry to pre process samples captured using the 5' kit from 10X rather than the usual 3' approach.
I am comparing Alevin-fry, using the decided upon para... |
1c5104b15910e812b947ff8a439136ac8f340c8bc9bc759e1be0748adf0db250 | R | 12,898 | 366 | ## REQUIRED PACKAGES
if (!('igraph' %in% installed.packages()[,'Package'])){install.packages("igraph")}; require(igraph) #package for network generation and measures
####################################################################################################
participation_coefficient <- function(g, Ci, sym = F... |
f9f265675ed842d732eb61f9b591165f2c0ccbd2f14bc62290afaf77bef62189 | R | 12,915 | 381 | ## import package
.libPaths("~/R/x86_64-pc-linux-gnu-library/4.2")
library(Seurat)
library(ggplot2)
library(ggpubr)
library(sctransform)
library(harmony)
library(dplyr)
library(plyr)
library(viridis)
library(EnhancedVolcano)
library(scales)
library(monocle3)
library(tidyverse)
library(ComplexHeatmap)
library(circlize)
... |
721cd1be98af82445652c1fdbb8ad10b39becbb112f66168953083ab507a1019 | R | 13,037 | 413 |
suppressPackageStartupMessages({
library(Seurat)
library(sctransform)
library(stringr)
library(ggplot2)
library(ggpubr)
library(future)
require(scales)
library(RColorBrewer)
library("readxl")
library(dplyr)
library(dendextend)
library('conover.test')
library("devtools")
library(ggpmisc)
l... |
4d73adab0b017ae9bddcbaa0e28a22291a520cd9e16a5e4595af675b3a6bc90d | R | 13,040 | 225 | library(dplyr)
library(gratia)
library(mgcv)
library(nlme)
library(tidyverse)
#FIT GAM FUNCTION
##Function to fit a GAM (measure ~ s(smooth_var) + covariates)) per each region in atlas and save out statistics and fitted values-based characteristics
gam.fit <- function(measure, atlas, dataset, region, smooth_var, cova... |
68a7c8bfb72f8a41c044ad73e399a8daa4baee4a4485325d9fb1964cb8f09a35 | R | 13,047 | 309 | ---
title: "211213_recount3_download"
author: "Jennifer Fisher"
date: "12/13/2021"
output:
html_document:
toc: true
theme: united
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# START
Goal/Purpose of operations:
Donwloading Recount 3 RNA-seq Counts and normalizing counts ... |
efac649801760b55a1842ca7d4fa2ebedeb1d36c23f5bfa653c04a01ef70e9f3 | R | 13,081 | 190 | #################
### Load data ###
#################
rm(list=setdiff(ls(),c('params','injection.site','group1','group2','group3')))
basedir <- params$basedir
setwd(basedir)
savedir <- paste(params$opdir,'modelcomparison/bootstrap/',paste0(injection.site,collapse='-'),'/',sep='')
dir.create(savedir,recursive=T)
sourc... |
df080a3c71bdb7ca2b3e9bfbdca1316804d4e4d74616110d5610aa1004909601 | R | 13,095 | 297 | #' Identifies MRs for given data using stouffer integration.
#'
#' @param dat.mat Matrix of protein activity (proteins X samples).
#' @param weights If included, will compute MRs using a weighted stouffer integration.
#' @return Returns the stouffer integrated scores for each protien.
StoufferMRs <- function(dat.... |
911e6b6835904aef86c17dd91b54f38bfd67a82d8736bdc4e105cfc22a710bdc | R | 13,120 | 322 | # This script estimates AGE SENSITIVITY of ABSOLUTE brain asymmetries BY SEX
# It also compares linear and non-linear models using AIC and BIC
# Date: 02.11.2023
# Author: Max Korbmacher (max.korbmacher@gmail.com)
#
print("This script estimates AGE SENSITIVITY of ABSOLUTE regional brain asymmetries BY SEX.")
print("I... |
0ed069f2ec511d4224152eef4ba3db9168b761b1de4a9894f42cb28f5077e9d8 | R | 13,122 | 358 | #!/usr/bin/env Rscript
################################################
################################################
## Functions ##
################################################
################################################
# Helper function for NULL condition
string_to_nul... |
aa9ca57f09e904c94994fe9dab275c7701d602e232b63015a8f9f640597815c7 | R | 13,220 | 342 | getFP <- function(ReadsTableName, CFUtable, WhereAreReferences, minweight, outputfilename) {
library(EnvStats)
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
if(!is.null(CFUtable)) {
CFUtable <- read.csv(CFUtable)
}
ReferenceVector <- rowSums(cbind(ReadsTable[,WhereAreReferences]))
... |
3c3d02cae5402d302d01969980c3957fa4fed6edd979d785d1e323e1051438cc | R | 13,221 | 342 | getFP <- function(ReadsTableName, CFUtable, WhereAreReferences, minweight, outputfilename) {
library(EnvStats)
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
if(!is.null(CFUtable)) {
CFUtable <- read.csv(CFUtable)
}
ReferenceVector <- rowSums(cbind(ReadsTable[,WhereAreReferences]))
... |
56df48f7d58a6872e1007c5c3f3dca46c97b9c740a21b5494525af69a6f009a7 | R | 13,252 | 307 | # test laterality index of brain age
# Max Korbmacher, 14.08.2023
#
## PREP ####
# packages
#install.packages("afex")
#install.packages("tidyquant")
library(tidyquant)
library(afex)
library(effects)
library(dplyr)
library(reshape)
library(ggplot2)
library(tidyr)
library(viridis)
library(lme4)
library(MuMIn)
library(... |
21cf20bfd2b2262ca4535fab648d64109c5ab19a54c666ecad5026c5c59934d2 | R | 13,397 | 347 | ---
title: "Discriminant analysis on different epilepsy and healthy cohorts"
author: "Liesbeth François"
date: "`r format(Sys.time(), '%B %d %Y')`"
output:
html_document:
self_contained: yes
fig_height: 6
fig_width: 8
keep_md: yes
number_sections: yes
theme: cerulean
toc: yes
... |
80ccde621bbe642bf4908b2dedb34bb297a31add5df9b81dd7fe1a02d559e65b | R | 13,403 | 351 | ##minweight of 0.03 works well
getFP <- function(ReadsTableName, CFUtable, WhereAreReferences, minweight, outputfilename) {
library(EnvStats)
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
if(!is.null(CFUtable)) {
CFUtable <- read.csv(CFUtable)
}
ReferenceVector <- rowSums(cbind(ReadsTable[,W... |
fd8202ded44dcf62dc5a7f364ca6b0b5e101c13b099fac8fc1a94d4f086a2d58 | R | 13,415 | 258 | library(readr)
library(dplyr)
library(ggplot2)
library(cowplot)
library(stringr)
devtools::load_all('breaktools/')
source("00-utils.R")
rdc_pileup = function()
{
dir.create("reports/08-rdc_pileup", recursive=T, showWarnings=F)
#
# Load offtargets
#
offtargets_df = readr::read_tsv("data/offtargets_dkfz.tsv")... |
a728e95baeaaaa3662e522aecd5ec303ec3f5e0e3fea76a861e20e1910c9eb49 | R | 13,508 | 358 | .libPaths("/home/u23/haozhang1/miniconda2/envs/seurat/lib/R/library")
# from https://github.com/satijalab/seurat/issues/5257
# the error in MapQuery() is caused by an update in uwot
# need to install the previous version of uwot and restart the RStudio session to solve this error.
# devtools::install_version("uwot", v... |
cfa2b65ed51c6c64493f2c35bf791a0df75fc1ef342f75ff11f5de2559b6c0c8 | R | 13,523 | 282 | # data download -----------------------------------------------------------
# https://www.brainimmuneatlas.org/download.php for GSE128855
# https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE118948 for GSE118948
version
# load packages -----------------------------------------------------------
library(tidyverse)
... |
5c5237ed4c6438eff87ee2f145eac828a7e554b191bf458ff21a562f1124e58a | R | 13,563 | 342 | getFP <- function(ReadsTableName, CFUtable, WhereAreReferences, minweight, outputfilename) {
library(EnvStats)
ReadsTable <- read.csv(ReadsTableName, row.names = 1)
if(!is.null(CFUtable)) {
CFUtable <- read.csv(CFUtable)
}
ReferenceVector <- rowSums(cbind(ReadsTable[,WhereAreReferences... |
39936689b2b0de82c883a0b7c363030dfd2bffabc16bec0f000b8a13cd128bd6 | R | 13,664 | 320 | ---
title: "Vignette_3: Data Inference with CLL human study: UM vs M subtypes"
output:
html_document:
theme: united
toc: yes
vignette: "%\\VignetteIndexEntry{Vignette} \n%\\VignetteEngine{knitr::rmarkdown} \n%\\VignetteEncoding{UTF-8}\n"
editor_options:
markdown:
wrap: 72
---
```{=html}
... |
1c9ee5e9b4e83f5dbf071d21515344c2b4f933c9b830f2e535a7a4dc11034580 | R | 13,753 | 454 | #!/usr/bin/env Rscript
################################################
################################################
## Functions for the script ##
################################################
################################################
convert2binary <- function(result_csv, method_name... |
726f24bb93a57f8d434079f2d6e69f488c40571d806c5aeb5c0907180191c94f | R | 13,835 | 415 | # Author: Andrew J. Graves
# Date: 3/24/24
# Load packages
library(tidyverse)
library(lubridate)
library(EGAnet)
library(brms)
library(tidybayes)
library(parallel)
library(wesanderson)
library(patchwork)
library(kableExtra)
# Set plot themes
theme_set(theme_classic())
theme_update(plot.title = element... |
ea25f90af99ed34bdaf95e7276a221845d881b4ae88082f19a42d645f1b77c76 | R | 13,836 | 311 | ################################################################################
# analysisCounting.R 1.1.1 #
# Authors: A. Sta, P. Poullet (Institut Curie) #
# Contact: myproms@curie.fr ... |
392f6e261b0b1fa53327dd316185812a66e3c9acc25a90f4e4dfbda62e2cec16 | R | 13,867 | 361 | library(lubridate)
final_data2b=read.csv("revisits_12min_threshold with vedba2023.csv")
final_data2b=final_data2b[,-1]
RV1=read.csv("revisits_12min_threshold with vedba2023.csv")
RV1=RV1[,-1]
studaydays2=unique(final_data2b$day)
IDs=unique(final_data2b$ID)
RV2=read.csv("FFT Daily Path Length.csv")
RV2=RV2[,... |
aeb5e963704bf620940062e0fbf294bd53e121404af20d2e2960d9d2e8a3d5af | R | 14,098 | 285 | # functions for computing global brain connectivity (GBC), between-network coupling (BNC), and within-network coupling (WNC)
# use computeGBC.R, computeBNC.R, computeWNC.R, and computeEdge.R to run jobs.
library(cifti)
library(dplyr)
library(magrittr)
library(rjson)
library(stringr)
# Function for Computing Global... |
b8ef7268fe17cddc672cc26196d30c28b4b6b012e688ad46da9248c21cbda458 | R | 14,123 | 246 | library(readr)
library(dplyr)
library(ggplot2)
library(randomcoloR)
library(ComplexHeatmap)
library(igraph)
devtools::load_all("breaktools/")
source("00-utils.R")
detect_offtargets = function()
{
debug=F
dir.create("reports/02-detect_offtargets", recursive=T, showWarnings=F)
#
# Load baits
#
baits_df = r... |
c501f2aeae4dd071cc63a008da9cdec3c742f511c2c77621f6a3b8dde7e0fc52 | R | 14,227 | 535 |
# Well BD -----------------------------------------------------------------
#Burst Duration
#ec
ec<-read.csv("D:\\Brewer lab data\\HFS\\well_5SD_500maxSD_BD_moment_tbl_EC.csv")
Mean <- c(ec$mean)
SD <- c(ec$sd)
SampleSize <- c(ec$n)
gen_data <- function(means, sds, samplesizes){
n.grp <- length(... |
8614a01eab28ffacb48bf55eb5897fe97344a515c0e652cdb1cb46f60369ba07 | R | 14,256 | 254 | CompareTA_NewSim<- function(TAtally_in, TAtally_out, filename, graphs) {
#Imports files
TAtally_in <- read.csv(TAtally_in)
TAtally_out <- read.csv(TAtally_out)
#Read normalization. Script is run twice to work on both inputs and outputs
print("normalizing input")
library(evobiR)
#This script only normalizes u... |
fee1982dae27704aaa3794932f248197fadcab23264d3d255fd6a21497f72c08 | R | 14,322 | 480 | #!/usr/bin/env Rscript
#' Comprehensive Machine Learning Pipeline for Platelet Classification
#' Description: Compare multiple classifiers with cross-validation and feature importance
#'
#' Models included:
#' - XGBoost
#' - Random Forest
#' - Support Vector Machine (SVM)
#' - Logistic Regression
#' - Gradient Boostin... |
ac720f6da3cc4ea0acee908e830a52d8c8a596f636685c1a37a3db8dc819daac | R | 14,359 | 314 | ---
title: "Vignette_2: Data Visualization with TCGA KIRP human study: LATE vs EARLY stage"
output:
html_document:
theme: united
toc: yes
vignette: "%\\VignetteIndexEntry{Vignette} \n%\\VignetteEngine{knitr::rmarkdown} \n%\\VignetteEncoding{UTF-8}\n"
editor_options:
markdown:
wrap: 72
---
... |
22b31dce5b2a2f98710b29ed1b3d5cf212e80d0fe441bfdfc0a91c8d0d47b7cf | R | 14,393 | 238 | source('code/misc/fitfxns.R')
source('code/misc/optimfxns.R')
source('code/misc/miscfxns.R')
train.test.logmeanpath <- function(Mice,nreps=500,tf=0.5){
# INPUTS:
# Mice: list of dataframes (one for each time point) that is mice x regions whose values contain pathology measured at a specific time point
# nreps: n... |
3e912551483d09a313b60fc9a1c76d4b5ffe456226467353c8b3eceea8770b3d | R | 14,396 | 312 | ---
title: "SCRIPT Cytokines Treatment effects"
output: html_notebook
---
# Setup
# Load packages
```{r setup}
library(tidyverse)
library(ggplot2)
library(ggsci)
library(ggsignif)
library(ggExtra)
library(ComplexHeatmap)
library(viridis)
library(broom)
library(Cairo)
library(rstatix)
library(ggrepel)
#for LMM a... |
2aeade1f00624116fddf9901ad184d013d068e257142d2982783612cc463121e | R | 14,437 | 291 | library(openxlsx)
library(ggplot2)
## 2,5-DMP
File = "ca imaging_isoamyl acetate/20190403.xlsx"
raw1 = read.xlsx(File, sheet = "20190403-CD20-2,5-DMP-1")
raw1 = raw1[,grep("cell",colnames(raw1)), drop = F]
raw1 = raw1[-(1:329),]
F0=apply(raw1[1:30,],2,mean) # generate F0
delF=sweep(raw1,2,F0,"-") #generate de... |
79acc9532536e65c9ff53620e44d22c01a6635da7233e79de367c157b4462ca0 | R | 14,572 | 566 | ---
title: "Fig.2D. Ventrobasal thalamus"
author: "Evgenii O. Tretiakov"
date: "`r Sys.Date()`"
output:
workflowr::wflow_html:
toc: true
---
```{r setup, echo=FALSE, include=FALSE}
knitr::opts_chunk$set(
autodep = TRUE,
cache = FALSE,
cache.lazy = FALSE,
dev = c("png", "pdf... |
96dddc9978a643644a4187b45f3b12d2221378aedf3913257059b9f79c9d5839 | R | 14,582 | 339 | #!/usr/bin/env Rscript
#===============
# author:
# Li Tang
# Central South University
# tangli_csu@csu.edu.cn
#===============
# function description
# Simulation of HiChIP contacts
#===============
library(optparse)
library(tools)
library(data.table)
options(scipen=999)
options(datatable.fread.datatable=FALSE)
#... |
8def91b750429384fd1197177fafb111761b1a965b6eac569d399df5d3f7dd28 | R | 14,607 | 357 | #!/usr/bin/env Rscript
#===============
# author:
# Li Tang
# Central South University
# tangli_csu@csu.edu.cn
#===============
# function description
# Simulation of ChIA-PET contacts
#===============
library(optparse)
library(tools)
library(data.table)
options(scipen=999)
options(datatable.fread.datatable=FALSE)
... |
6a69cfef995979a6d9fcc505834c250e45954fe107a5eb7d5cf142b4a6a944ad | R | 14,609 | 325 | library(Seurat)
library(tidyverse)
library(patchwork)
library(UpSetR)
library(dplyr)
## read ferret seurat with label transfer:
ferret_seurat <- readRDS("/data/mayerlab/neuhaus/ferret_proj/final_results/02/ferret_seurat_clean_wLabel.rds")
#ferret_seurat <- readRDS("/datastore_share/Users/neuhaus/ferret_proj/results/03... |
958ef3076467bdfe4d856f9816daa44532aab383b4bd4744465c1f4fd622ff49 | R | 14,684 | 340 | ---
title: "NKI Sample Selection"
author: "Audrey Luo"
output: html_document
---
# Sample Selection process
1) original sample: N=1288, ages 6-85, 6346 scans total
2) include ages 6-22: N=426, 2584 scans
3) include passing T1 QC: N=421, 2474 scans.
- delete all scans from a given session if fail T1
4) include mean... |
a8b80c39f0d18e296e620fb2002b8e3d6a04aea84f35a2ae2f9caf7901024d01 | R | 14,716 | 260 | #' Gene analysis of passed VCF file
#'
#' This function takes in the loaded VCF (read_vcf()) and operates calculations for the gene analysis
#'
#' @param VCF_DATA loaded VCF file (read_vcf() output)
#' @param CENTILE (optional) percentile of genes to use in the plot (default is 0.9: only genes with a number of variants... |
050e4c041a4b6d2f0b0bd029e6d31642931fc0d22485287c72dcd363123a5675 | R | 14,817 | 384 | #' Determines Separability Power of Patient Similarity Network
#'
#' Determines if the two groups of nodes in the network separate and how much.
#'
#' More a group has the intragroup similarities greater than the opposite intragroup similarities and
#' intergroup similarities and more the power is close to 10.
#'
#' In... |
547b811e3589f9cd8730a9b8951a2fdd73b090739eed34dc5031e6f9850b4edb | R | 14,828 | 566 |
library(Seurat)
library(ggplot2)
library(MEGENA)
library(DGCA)
library(effsize)
library(bc3net)
library(viridis)
library(RColorBrewer)
library(pheatmap)
library(AUCell)
library(dplyr)
library(muscat)
setwd("~/VASC/GerritsSmith/MEGENA_fibroblast_ALL")
vasc_ALL<-qs::qread('../GerritsSmith_vascALL_ensg_sce.qs')
sce.... |
81942d64eadcdc713a42acece125faf4f629d13e2f4dfeab0ee0cedda9144f07 | R | 14,843 | 322 | server <- shiny::shinyServer(function(input, output, session) {
count.not.null <- 0
if (!is.null(stress.ident1)) count.not.null <- count.not.null + 1
if (!is.null(stress.ident2)) count.not.null <- count.not.null + 1
if (!is.null(notstress.ident3)) count.not.null <- count.not.null + 1
if (!is.null(notstress.id... |
e1b61266ece1afa97187f1c00f097aaa85fc7418955e9415b3d5ec3cfa80078a | R | 14,885 | 396 | ################################################################################
# analysisModifQuantif.R 1.1.0 #
# Authors: Patrick Poullet, Stephane Liva, Pierre Gestraud (Institut Curie) #
# Contact: myproms@curie.fr ... |
fb923b22f1fb44c1d2c9152991aefca066fec6f3592133ee3111996b7848ab00 | R | 15,079 | 333 | ##### 01Start: Plot repeats and sequence classes #####
l=ls()
l=ls()
l=l[which(!ls() %in% c("",""))]
rm(list=l)
library(ggplot2)
library(ggsignif)
library(scales)
files=dir("Data/PlotData",full.names=T)
files=files[grep("csv$",files)]
files
### Plot repeats ###
repeatfiles=files[grepl("repeats_plotdat... |
aeeff8106ed2f9bcf4b02f5c650bb75ee993b3375e3aff217b9833c2946eea7f | R | 15,257 | 240 | # This file is for the analysis of the combined dataset which has already been
# run through monocle.
library(Seurat)
library(plotly)
library(dplyr)
reticulate::py_run_string("import sys")
# Load "with pseudotime.rds" if necessary
data.combined <- readRDS("with pseudotime updated.rds")
UMAP3D(data.combine... |
d5e3902845af04e344f885c77655e1d2c3fea457b44ba363797f982e9a71513c | R | 15,268 | 383 | library(tidyr)
library(dqshiny)
library(plotly)
library(DT)
library(dplyr)
library(ggplot2)
library(shiny)
# Load data
res <- readRDS("data/002_res.rds") |>
select(symbol, ensembl_id, log2FC, padj) |>
relocate(symbol)
msdb <- readRDS("data/msigdbr_reduced_db.rds") |>
group_by(gs_name) |>
muta... |
3bd1a1e5b7760123b471b5411583b37a1fc66e1c4de3f75d1589ffb421d0f62f | R | 15,472 | 557 | ---
title: "220112_gbm_deseq2_transfer_learning"
author: "Jennifer Fisher"
date: "1/12/2022"
output:
html_document:
toc: true
theme: united
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# START
Goal/Purpose of operations:
I am taking the latent variables from PLIER for GB... |
1fa29decd8f55616c606483d3936fd9e4d307d089f65d2a3ba5387c40f3dc53d | R | 15,568 | 363 | ################################################################
###################### plotting DREADD data ####################
################################################################
#Important: This script should be run with the working directory
#set to the folder "1.5IQR_Outlier_Removed_Files" that... |
ab98a2999ff1e1d91e3b03e8b0b3f462d580eda975bd1ece7b0080b75757f5c2 | R | 15,569 | 385 | #' @importFrom magrittr "%>%"
isOnlyMainFiber <- function(block, fiberId) {
regulatorIds <- block[block$FiberId != fiberId, "FiberId"]
return(anyDuplicated(regulatorIds) == 0)
}
isFiberSendingToRegulators <- function(edges) {
feedback <- edges %>%
dplyr::filter(SourceType == "Fiber") %>%
dplyr::filter(T... |
5b2086163503f3222a36b760d0b785a30ea313c2d76c07ec8044c1ab810a62cc | R | 15,769 | 404 | ---
title: "Vignette_6: Data Inference with human study: AD vs Control classes"
output:
html_document:
theme: united
toc: yes
vignette: "%\\VignetteIndexEntry{Vignette} \n%\\VignetteEngine{knitr::rmarkdown} \n%\\VignetteEncoding{UTF-8}\n"
editor_options:
markdown:
wrap: 72
---
```{=html}
... |
e92bc285518af0da60d7fce40a7e3ccc519ed04fd78e65c03af35cca9983b410 | R | 15,973 | 333 |
##### 01Start: Obtain 18k points methylation profiles of CATannot genes #####
l=ls()
l=ls()
l=l[which(!ls() %in% c("",""))]
rm(list=l)
# load filepath of methylation and annotation files
methfiletab<-read.table("Data/Methylation/methylation_filestab.txt",header=T,sep="\t",stringsAsFactors=F,check.names=F)
m... |
b49fa9808356224f393f95a54899d69e485c7e3e28d698876163d8f4a46c5947 | R | 16,017 | 293 | getNrNb <- function(ReadsTable, CFUtable, InocCFU, WhereAreReferences, minweight, CorrectForNoise, outputfilename, CalibrationFile = NULL) {
##Ensure that plots is set to false - this toggle then lets you run the resiliency script alone to look at things in more fine resolution
#These four lines set up the neces... |
462154ae0ec8840ad4a98e5ca6853ad070eb4d3e3e6fb57d2bce67d549769d45 | R | 16,055 | 466 | library(ggsci)
library(tidyverse)
library(magrittr)
library(egg)
#plotting the results from onek1k demultiplexing
setwd("~/Downloads/genotype_free/")
#freemuxlet
ll <- system("ls pool*/genetic/gene_demulti/freemuxlet/freemuxlet_*/freemuxlet_out.clust1.samples.gz", intern = T)
p1 <- list()
for (fl in ll){
pool<-sappl... |
c056ceea499442ebb04ddc93861e618a60affd87638f2589440e876ed80c979f | R | 16,079 | 303 | #' Create the plot based on modeled VCF
#'
#' This function defines the Y axis coordinate to plot each variant, based on the total variants in the VCF file
#'
#' @param MODELED_VCF the database from the VCF file (load_vcf() and model_vcf())
#' @param SEQINFO the object with chromosome characteristics: load_chr()
#' @pa... |
63d2c7abacbdbf00fd43bba0cd97b0392f233f37a1e29ad45f76cfcd35591996 | R | 16,165 | 375 | ---
title: "HCP-D Sample Selection"
author: "Audrey Luo"
output: html_document
---
# Sample Selection process
1) original sample: N=652, ages 5-22, 5716 scans total
2) exclude participants with medical conditions affecting brain function, gross neurological abnormalities: N=631, 5527 scans
3) include passing T1 QC: all... |
e409babd2ceb5987415399851c8a9222e94daa1b0b029669295f7fbcbabad78a | R | 16,208 | 398 | ---
title: "Pre Processing Per Gene Metrics Benchmarking"
author: "Ally Hawkins for CCDL"
output:
html_notebook:
toc: true
toc_float: true
---
This notebook is a follow up to analysis done in `04-cell-level-benchmarking-metrics.Rmd` to look at benchmarking metrics at a per gene level.
There are 4 single ce... |
d61a9dd75c72f384d3f59b0eadd942125fd9030f6d7caf7baea67cbb31917060 | R | 16,249 | 341 | ---
title: "230628_upset_plots"
author: "Jennifer Fisher"
date: '2023-06-29'
output:
html_document: default
---
Goal/Purpose of operations:
Convert all the venn diagrams into upset plots
Finished psedocode on:
230628
System which operations were done on:
my laptop
Git... |
9a2839b382541ed1502e79a5e1e1a513b26f7c53ee472307f1a5da6d61e09689 | R | 16,392 | 603 | #' Compute a correlation matrix an return a summary value of the values
#'
#' @param x the dataset on which the correlation should be computed
#' @param method the correlation method to apply (default: "spearman")
#' @param sf the summary function (default: median)
#' @param square TRUE if the correlation values should... |
b8ef54fd5974e465ec07fa20f88f97c50f804d64947945cdf0b58f9f79bc3ea0 | R | 16,449 | 596 | ---
title: "RPC_T1_T2_T2_ccRegression"
output:
html_document:
df_print: paged
---
```{r}
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
```
```{r libaries}
library(dplyr)
library(Seurat)
library("ggplot2")
library(monocle3)
library(patchwork)
library(SeuratWrappers)
library(harmony)
library(ggp... |
b4a515ad656634b6390bb53f527d454d3a92e62d55d9d14d598a5e3bbe31f9c4 | R | 16,861 | 402 |
##############################################
#### In situ sequencing analysis pipeline ####
##############################################
### Prep R
library(readxl)
library(dplyr)
library(tidyr)
library(gdata)
library(rearrr)
library(ggplot2)
library(ggthemes)
#######################
#### P... |
1717c38b10d28f7222e426ab0639986c391022e711356055fd23a370526234a1 | R | 16,897 | 396 | ##########################################################################################
# Gruffi - extended functionality for stress removal
##########################################################################################
# _______________________________________________________________________________... |
64464344f230252b76623f543819e6d291b354e32412bf0aeea03cb38bf0e611 | R | 16,956 | 245 | dev.off()
rm(list=ls())
library(DESeq2)
library("vsn")
library("pheatmap")
library(ggplot2)
library(tidyr)
library(qqman)
library(gridExtra)
library(EnhancedVolcano)
#Read in sample sheet (metadata) and counttable
sampletable <- read.csv2("colData_all_RepCollapsed.csv", header=T, sep="," )
rownames(sampletable) <- sa... |
29f67e1f6894ab7ebf0c23a9f437e25042c4bc2631d2feba14d1bc25201feb83 | R | 16,979 | 504 | #!/usr/bin/env Rscript
#' Machine Learning Visualization Functions
#' Description: Generate publication-quality figures for ML model evaluation
#'
#' Includes:
#' - ROC curves (single and comparison)
#' - Confusion matrices
#' - Feature importance plots
#' - Model performance comparison
#' - Cross-validation results
... |
f862e9163cb48e47aab8f09ab4e58a36d7987ed3ae234efb47ca6a432e4c86b5 | R | 16,983 | 312 | getNrNb <- function(ReadsTable, CFUtable, InocCFU, WhereAreReferences, minweight, CorrectForNoise, outputfilename, CalibrationFile = NULL) {
##Ensure that plots is set to false - this toggle then lets you run the resiliency script alone to look at things in more fine resolution
#These four lines set up the neces... |
6d1443f9fb70dc0c8710c5f0202484034509f282c45400dbd7832ccdf8546a07 | R | 17,007 | 436 | ## import package
.libPaths("~/R/x86_64-pc-linux-gnu-library/4.2")
library(Seurat)
library(ggplot2)
library(ggpubr)
library(sctransform)
library(harmony)
library(dplyr)
library(plyr)
library(DAseq)
## load all the objects
Hypo_integrated <- readRDS("~/Yi_Huang/objects/Hypo_integrated.rds")
AgRP_subclusters <- readRDS(... |
29c6478d3af8ad31f5517a18c5f8345729f3fe9bed86acf6ca1f142f22418c5e | R | 17,033 | 244 | dev.off()
rm(list=ls())
library(DESeq2)
library("vsn")
library("pheatmap")
library(ggplot2)
library(tidyr)
library(qqman)
library(gridExtra)
library(EnhancedVolcano)
#Read in sample sheet (metadata) and counttable
sampletable <- read.csv2("colData_all_RepCollapsed.csv", header=T, sep="," )
rownames(sampletable) <- sa... |
076913c62abaa5a633f15874bab43117a0ebb7d56e8b8ff342cb88c527ec3490 | R | 17,043 | 405 | ---
title: "PNC Sample Selection"
author: "Audrey Luo"
output: html_document
---
# Sample Selection for main analyses
1) original sample: N=1559, 4546 scans total, ages 8-23
2) exclude participants with medical conditions affecting brain function and gross neurological abnormalities: N=1413, 4136 scans
3) include pas... |
4182146cba1e6663278b40511ab458da83251bb7c39cd7aca30898c9e8d86a77 | R | 17,065 | 396 | ---
title: "230207_drug_target_pathway_exploration"
author: "Jennifer Fisher"
date: '2023-02-07'
output:
html_document:
toc: true
theme: united
---
# START
Goal/Purpose of operations:
We are conducting pathway analysis on the drug targets of the FDA approved drugs for the different disease-associate... |
87e98a0b23fa1e324d1c1b3c9e5d57eda303e59db4cc39bbd40c064ab1cb1f84 | R | 17,135 | 442 | # Construct experiment which counts edge over a bunch of samples
# Given that you have the following:
# 1. A bunch of BAM files in which you want to count edges of the reads
# 2. A GRanges or GRangesList object with the ranges that you want to count
# How to get an object of edge-counting results?
#' Extract edg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.