sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0eae42fcfbe33a5cee2d0dcad8099d057e33900d7b0c2eb20bf10fe5083b9e4a | R | 17,715 | 411 | knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(dplyr)
library(tidyr)
library(janitor)
library(ggplot2)
library(lsr)
library(knitr)
library(kableExtra)
library(stringr)
library(neuroCombat)
library(lme4)
library(lmerTest)
library(ggpubr)
library(rstatix)
library(flextable)
... |
acbb6a8dd83d3a717ec055fd9b43094b55d4d38d55c5a5b741b620e3def750a2 | R | 18,008 | 451 | # Functions to select scans for volumetric analysis
##########################################
# #
# Collapse ROI volumes #
# #
##########################################
collapse_vol <- function(vol, mymalp){
... |
24f834cf1bdb3630ea09cc58be6c5507db2293f26dad153ffecb02d4deb7937d | R | 18,085 | 410 | library(limma)
library(edgeR)
library(RColorBrewer)
library(dplyr)
library(ggplot2)
library(VennDiagram)
library(mixOmics)
library(devtools)
library(dplyr)
library(RSkittleBrewer)
library(genefilter)
library(ballgown)
#--------------
# set working directory
#--------------
setwd("~/Dropbox (ASU)/Placenta/BATCH2_PLACEN... |
26299f4bcba43758aa87e20d5f80061d7de5a2f54cc345b3cacfdc7399f8c301 | R | 18,158 | 474 | ---
title: "CompareCombats"
author: "Sophie"
date: "27/10/2021"
output:
word_document: default
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
```
```{r}
library(dplyr)
library(tidyr)
library(jani... |
c8988bbe22dffe9f148d2153a2d6d38de46791e3592ca766fc35a82520ea909a | R | 18,268 | 497 | # Build a UCSC cell browser website from a \code{Seurat} object
#
NULL
#require(reticulate)
#require(Matrix)
#require(R.utils)
#' Used by \code{ExportToCellbrowser}:
#' Write a big sparse matrix to a .tsv.gz file by writing chunks, concating them with the Unix cat command,
#' then gziping the result. This does not wor... |
28e0caf3d2375fb4b0c1e57bade3e180b5cbee5b66208e1aa5b74776349c7693 | R | 18,291 | 334 | #------------------------------------------------------------------------------------
# Single factor DE analysis using limma/voom
#
# created by Kimberly Olney, July 19th 2019
#
#------------------------------------------------------------------------------------
#
# To install packages use biocLite from bioco... |
efac2e1566e35b9f51f303b7b1a072dc6121e357e5554c31c9a3f349f320d75f | R | 18,371 | 510 | ## ----------------------------------------------------------------
## show methods
## ----------------------------------------------------------------
#' Stored cutoffs as printed by show(): the inclusive significance rule
#' @param pvalue,padj the pvalueCutoff and padjCutoff slots
#' @return " (pvalue <= x, padj <=... |
f6ecee477a66d038a11c8d0f433f3fa16f2c685aa635b1c91baeedd4b0534923 | R | 18,789 | 417 | # Reporting-cutoff policy (SPEC-RICHR-002 D1, REQ-015 ... REQ-022).
#
# One significance predicate decides every reported row: a row is kept when
# its raw p-value is non-NA and <= pvalue and, when padj is non-NULL, its
# adjusted p-value is non-NA and <= padj. Expected selections are written out
# by hand here, never ... |
731f208f11af64d1aef29ed3babf93d2188652aa7ee29d78778823f5f9509281 | R | 18,944 | 356 | setwd(
"~/Dropbox (ASU)/Placenta/BATCH2_PLACENTA_DECIDUA_ANALYSIS/HISAT_FeatureCounts/batch1_and_batch2/"
)
library(reshape)
library(ggpubr)
library(ggpubr)
library(dplyr)
library(lattice)
library(car)
library(splitstackshape)
df_merged_pisarska <-
read.delim ("genelists/pisarska/cpm_placenta_df_genes.txt")
df_mer... |
5329fc67acb7f4af4ab0b9a01fa077eed66c73e3171318f64d58814b9728443c | R | 19,027 | 390 | # richThemes(): theme grouping of reported terms (SPEC-RICHR-007 M6.2a).
# Fixtures and their role checks live in helper-themes.R.
# ---- AC-001: grouping set, kappa similarity, average linkage ----------------
test_that("every reported F-TH term lands in exactly one kappa theme (catches terms dropped or themes filte... |
9ab5edd019410fd10809ad6706c08daeed0ee2712338a96449ea49fa1abd94cb | R | 19,193 | 484 | library(Seurat)
library(patchwork)
library(ggplot2)
library(cowplot)
library(BiocParallel)
library(dplyr)
library(stringr)
library(Matrix)
library(scales)
library(RCurl)
c1.data <- Read10X(data.dir = "D:/personal_user/Shyr Shyang/04 TT 10X sequence/cellranger_result/C1/filtered_feature_bc_matrix")
c1 <- Cr... |
92edaaba818efa2bbd1b1be705c9e467434c862ea02bcbdf52b20bf84ab3a073 | R | 19,286 | 576 | ---
title: "Manuscript figures"
author:
- name: "Regina H. Reynolds"
affiliation: UCL
output:
html_document:
code_folding: show
theme: paper
highlight: kate
df_print: paged
toc: true
toc_float: true
number_sections: true
---
```{r setup, echo = T, result = F, message = F}
library(co... |
7076e808f4fd908d429079a6047c09610b16f99a0dd9b12df95c49f7bddcffda | R | 19,616 | 492 | # GSEA gene-set identity (SPEC-RICHR-002 D3; REQ-003 .. REQ-006).
#
# Gene sets are keyed by identifier and labelled afterwards: `@result$pathway`
# holds the identifier and `@result$Term` the label. Distinct identifiers that
# share a label stay distinct gene sets.
identity_scores <- function() {
genes <- sprintf("... |
854d5ddaf94f2c7b42e8a848536d6bd74d55ccf9f82384095c910b0c65aac655 | R | 19,640 | 656 | ---
title: "Iscience-PLSC-Ap-GM-Rscript"
author: "Kirthana"
date: "2023-01-17"
output:
html_document:
fontsize : 9 pt
theme: united
code_folding: hide
toc: true
toc_float: true
toc_depth: 6
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Import L... |
e43610ec6c45a0d322725e804a2888853c38389af97458fe0e0ca6c9c3f283d5 | R | 19,843 | 860 |
# getSymbols() -----------------------------------------------------------
test_that("getSymbols()", {
expect_equal(
getSymbols("left1 ~ right11 + right12"),
c("left1", "right11", "right12")
)
expect_equal(
getSymbols(
"left2 ~ (right21 * right22 / (right23 * right24)) ... |
06cb57a5fb18cd57b1afc7630d33282f544b5f635c44ecde43defe25fc2ece99 | R | 20,035 | 486 | library(R.matlab)
library(tidyverse)
library(ggplot2)
library(ggpubr)
library(Seurat)
library(Matrix)
library(DSAVE)
fig____path = "Z:/projects/Single-cell modeling/figures/"
fig____path_loc = "D:/SingleCellModeling/figures/"
gg_color_hue <- function(n) {
hues = seq(15, 375, length = n + 1)
hcl(h = hues, l = 65, ... |
2f8a4b127357c349bde60c661195ad6f1f6faff0c7484200b44e5f6d8341dbb1 | R | 20,159 | 461 | #R code to generate figure panels for Figure 1 figure supplement 3 in Jasek et al. Platynereis desmosomal connectome paper
#Uses Natverse and accesses the data on catmaid
#Gaspar Jekely
source("code/Packages_and_Connection.R")
# retrieve cells and smooth them with sigma 6000 --------------------------
{
chaeta = nla... |
a6361ffc24873e079aed04ecb5b43314405a8ae51e5e900bbb3e8edc61b0a346 | R | 20,298 | 445 | #R code to generate Figure5 of the Jasek et al. Platynereis desmosomal connectome paper
#Uses Natverse and accesses the data on catmaid
#Gaspar Jekely
source("code/Packages_and_Connection.R")
# generate graph plots and anatomical pictures -----------------------------------------------------
{
#read the saved visNe... |
bf4948ff699471af67fedbc4ec7f834d304f2b8a62a730aa9815041f6acf6e39 | R | 20,430 | 638 | #library('pcaPP')
########################################
#Author: Feng Zhang
#Email: 15110700005@fudan.edu.cn
#######################################
.get_log_p_sc_given_ref <- function(exp_sc_mat, exp_ref_mat, CPU=4, print_step=10){
delta = 0.5;
#exp_sc_mat: single-cell gene expression matrix; row is gene;... |
a413801731393bc843829758631c8ee7ccba97228c5115a16ca95e2786f037f0 | R | 20,470 | 520 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 3, Figure 5, Supplement 1"
author: "Antoine Beauchamp"
date: 'October 25th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
... |
c1f950db874cba63ef5492aad7a1ae2a833a06cfe88e0bbd047a6dd8011f40a0 | R | 20,541 | 355 | #' Enrichment analysis for any type of annotation data
#' @param x vector contains gene names or dataframe with DEGs information
#' @param object annotation data
#' @param ontology ontology type
#' @param pvalue cutoff pvalue
#' @param padj cutoff p adjust value
#' @param organism organism
#' @param keytype keytype for... |
96a02dd1681fde324fb48b0e8d9cfa174f2c386c726044f8d0813fd4024b5b02 | R | 20,568 | 510 | calculate_delta <- function(longdata){
tlong <- longdata
tlong <- tlong %>%
mutate(across(c("Ventricles",
"SupraCortex",
"SupraWM",
"SupraDGM",
"CerebellumGM",
"CerebellumWM",
"... |
c3ca558d3ce6363fbeaf8e55e5c3d95089acb66fa0efb5261b8c6e10b57bccbb | R | 20,627 | 248 | # Load data
source(here::here("code", "01_load_data.R"))
load(here::here("data", "imputed_data.RData"))
# Language recovery over time
recov <- joint_tests(with(data=behav_long, exp = lmer(score ~ Time*Component + (1|patient))))
time <- as.data.frame(emmeans(with(data=behav_long, exp = lmer(score ~ Time*Com... |
629d30a52aabd121e7471bb2441e1ecde964cf0a4f809fcafd31623c16464471 | R | 20,838 | 446 | legacy_rich_result <- function() {
new("richResult", result = data.frame(), detail = data.frame(),
pvalueCutoff = 0.05, pAdjustMethod = "BH", padjCutoff = numeric(),
genenumber = 1, organism = character(), ontology = character(),
gene = "A", keytype = "SYMBOL", sep = ",")
}
legacy_gsea_result <- fu... |
c1e8debc7bb2dda430b25d9a70379ff4a5b85b036266281271e593e889879886 | R | 20,875 | 651 | #' Generates a ggplot object containing plot components for the rawplot component
#' of an estimation plot.
#'
#' This function takes in a dabest_effectsize_obj object and applies the [create_rawplot_components()]
#' function on the object. Plot components for the rawplot are then produced and returned in the
#' form o... |
70a76f39d306b9a8ec4b1e13419e424419a196f77e7065ac835c013e90eb8707 | R | 21,232 | 360 | ##############################################################################
# Script:CellEnginePopulationImport.R
# Project: HiRes AD Scanned Data
# Author: Dmitry Tebaykin
# Date : 19th August 2020
# This program reads in a folder of tsv files, adds a filename column, merges the files, writes out a csv & makes heat... |
b5377c06deef5111e0796017c6adb91f2f353cea4c719fb2f85526f8a75e433a | R | 21,384 | 427 | library(Seurat)
library(dplyr)
library(future)
plan("multisession", workers = 8)
### This file will load the GEO seurat objects,
## shrink them to make the shiny reasonable,
## calculate cluster markers,
## run cell chat
## output files needed for the shiny
## Load the full PBMC Seurat Dataset. Available for download... |
905322b90fce004ba0439fb6e7a8c1dcd376f96d2407b567140e678cf9475abe | R | 21,784 | 695 | # @DESCRIPTION: immune new
# Library -----------------------------------------------------------------
library(magrittr)
library(ggplot2)
library(patchwork)
library(rlang)
library(DESeq2)
library(ComplexHeatmap)
library(ggupset)
library(fgsea)
# Load data ------------------------------------------------------------... |
a811af6d2b187bcd464ece00a9f23aed583de5084bf9a0967a314d7b20e66319 | R | 22,104 | 646 | #Functions to simulate comparisons between group A and B
##################################################
# #
# Get p-value for Group from mixed model summary #
# #
##################################################
... |
8c573e695bbc3ff02bffac06e9e44988ca0bf8585c6e30eb72a9d64f533d097e | R | 22,271 | 592 | # ----------------------------------------------------------------------------
# create_tree_labels.R
# Author: Antoine Beauchamp
# Created: February 16th, 2021
#
# Description
# -----------
# This script defines a set of mouse and human atlas labels that can be
# used to prune the neuroanatomical trees to the desired... |
633c89ff2d7bf1d1a46187e347213ddfc4333ac1aa8adeea7a7b73f3ef162807 | R | 22,308 | 541 | ---
title: Microarray analysis of white and grey matter tissue and GPCs from adult human
brain
author: "John Mariani"
date: "2/4/2020"
output:
github_document:
toc: TRUE
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Load libraries for analysis
```{R, echo = TRUE, message = FALSE, w... |
e615e8f177fbf2884cfae84706e773133f2d1477a834db567725b61ad1d33461 | R | 23,000 | 723 | #library('pcaPP')
########################################
#Author: Feng Zhang
#Email: 15110700005@fudan.edu.cn
#######################################
.get_log_p_sc_given_ref <- function(exp_sc_mat, exp_ref_mat, CPU=4, print_step=10){
delta = 0.5;
#exp_sc_mat: single-cell gene expression matrix; row is gene; ... |
7fd7baf6e14120b51f6f5f15287becab06aca88095fb495915b5b77923550c7a | R | 23,157 | 263 | library(tidyverse)
library(lme4)
#read in participant's ratings
data_path <- "data/mturk/"
files <- dir(data_path, pattern = "*.csv")
for (i in 1:length(files)){
print(i)
subject = read.csv(paste(data_path,files[i],sep=""),fill=TRUE,stringsAsFactors=FALSE)[ ,c('WorkerId', 'WorkTimeInSeconds', 'LifetimeApproval... |
7f16b7be05def01d0a17ac514414c363ea8100ff5c0a5d1a6c5466dc88b3b985 | R | 23,562 | 560 | #
#' Align time-course data based on an Mixed-Effects alignment model
#'
#' The function deals primarily with time-course data of different
#' targets which have been measured under different experimental
#' conditions and whose measured values might be on a different
#' scale, e.g. because of different amplification. ... |
749c9edba326cfd55ed94a7a16da6e1594652f9e1c11e3d718033a051ec5590d | R | 23,859 | 612 | library(R.matlab)
library(tidyverse)
library(ggplot2)
library(ggpubr)
fig____path = "Z:/projects/Single-cell modeling/figures/"
setwd("C:/Work/MatlabCode/projects/SingleCellModeling/SingleCellModeling")
gg_color_hue <- function(n) {
hues = seq(15, 375, length = n + 1)
hcl(h = hues, l = 65, c = 100)[1:n]
}
####... |
a682919ad915da3c4694a667de63adb73a8745aa1fab5c9edde2315a5a8274a4 | R | 23,918 | 529 | libs <- c('ggplot2','RColorBrewer','reshape2','devtools',
'pheatmap','flowCore','plyr','scales','coin','grid',
'gridExtra','tidyr','Rtsne','FlowSOM','randomcoloR','viridis','tidyverse')
for (L in libs){
if(!require(L, character.only = T)) {
install.packages(L, dep = T, quiet = T)
if ... |
05374d5c2e4505602eaff0ed8c60755ca516c2a01f2b81932e5c81c881b2eea5 | R | 24,371 | 632 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 2, Figure 4"
author: "Antoine Beauchamp"
date: 'March 14th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = FA... |
01f084f0d6a22e814400baa5bd28d8d6a4b0d11028102f427bdaa3cf397db8eb | R | 24,524 | 469 | #------------------------------------------------------------------------------------
# Single factor DE analysis using limma/voom
#
# created by Kimberly Olney, July 19th 2019
#
#------------------------------------------------------------------------------------
# To install packages use biocLite from bioconduc... |
a95d95597dde759dcc73eb96e41c82bbf348249f448ce7966350a5371fe3126a | R | 24,556 | 461 | #### Manual Gating & Clustering ####
gated_data <- data_normalized
## visualization
gated_data %>%
filter(MAP2 >= 0 & MAP2 <= 2) %>%
filter(GFAP >= 0 & GFAP <= 5) %>%
filter(obj_type_id %in% "cells") %>%
ggplot() +
aes(x = MAP2, y = GFAP) +
geom_point(size = 1L, colour = "#0c4c8a") +
... |
10f22e2c92de5a16d90d8f204055d7f844d16a45d78a7382f810c9aa77ec55ef | R | 24,653 | 403 | library(EBImage)
library(pheatmap)
library(RColorBrewer)
library(ggplot2)
library(reshape2)
library(ggdendro)
library(viridisLite)
library(scales)
library(circlize)
allTifsData = data.frame()
outputFolder = ("/Volumes/KausaliaHD 1/AllProjects/BRAIN DATA/MIBI/MIBIData Matlab/May_June2019/TMA/MedResScan_TMA/RResults/He... |
6c2aa8f97ab8ec1cb5724f438f48b488adb4ca2e87f099cf1a1febc45ddfaa31 | R | 24,684 | 461 | #### Manual Gating & Clustering ####
gated_data <- data_normalized
## visualization
gated_data %>%
filter(MAP2 >= 0 & MAP2 <= 2) %>%
filter(GFAP >= 0 & GFAP <= 5) %>%
filter(obj_type_id %in% "cells") %>%
ggplot() +
aes(x = MAP2, y = GFAP) +
geom_point(size = 1L, colour = "#0c4c8a") +
... |
25458d82017aea69535dde962e15e12edffd7632b1eb7b3bf289bc2523178278 | R | 24,773 | 479 | #### Manual Gating & Clustering ####
gated_data <- data_normalized
## visualization
gated_data %>%
filter(MAG > 0 & MAG <= 2) %>%
filter(GFAP > 0 & GFAP <= 5) %>%
filter(obj_type_id %in% "cells") %>%
ggplot() +
aes(x = MAG, y = GFAP, colour = MBP) +
geom_point(size = 1L ) +
geom_den... |
07bd4784a7964d239ac17ef9299c0a1e30b12d06ba9797fdb44012147cd386cf | R | 24,789 | 519 | #Functions for the longitudinal analysis
####################################################
# #
# Select structural scans for longitudinal cohort #
# #
####################################################
se... |
7785a9032e161dd16b953193a4bb8a578c42c03194dd5e5a97452a28ce575be3 | R | 24,801 | 913 | # readWide() -------------------------------------------------------------
#' Import measurement data
#'
#' Data from a given wide style csv-file is imported. While importing, the data
#' is converted into a long table
#'
#' @param file character, the name of the data file.
#' @param description numeric index vector o... |
977fb67ab256fa7b8feabb88088c37bd23e1611e854874c06efafb7be98a94ed | R | 25,100 | 728 | ---
title: "Running BANKSY with Seurat"
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
output:
html_document:
df_print: kable
theme: simplex
toc: true
toc_float: true
github_document:
html_preview: true
toc: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
message = FALS... |
25b7d35f94288d73323af90d916181adcf7535eeed2d774b2312bf37be8434b6 | R | 25,278 | 617 | #code for Figure6 of the Jasek et al 2021 desmosomal connectome paper
#quantification and visualisation of node degrees in the desmosomal connectome
#Gaspar Jekely
source("code/Packages_and_Connection.R")
#read the saved igraph format graph file from supplements/
desmo_conn_graph <- readRDS("source_data/Figure3_sour... |
83d7eba80c9ddde069c9ff715c1547c836a1ca94c54ce5bb0e59af44dda864dc | R | 25,390 | 430 | ##############################################################################
# Script:CellEnginePopulationImport.R
# Project: HiRes AD Scanned Data
# Author: Dmitry Tebaykin
# Date : 19th August 2020
# This program reads in a folder of tsv files, adds a filename column, merges the files, writes out a csv & makes heat... |
0307912ffbee9559a6d7ac9d4d2ee0f30d057e29dd9cb2a5ebf0ad2e7611f8ea | R | 25,464 | 500 | #### Manual Gating & Clustering ####
gated_data <- data_normalized
## visualization
gated_data %>%
filter(MAG > 0 & MAG <= 2) %>%
filter(GFAP > 0 & GFAP <= 5) %>%
filter(obj_type_id %in% "cells") %>%
ggplot() +
aes(x = MAG, y = GFAP, colour = MBP) +
geom_point(size = 1L ) +
geom_den... |
6fb3be74f1ad3ccd127c1f2426bfb54a41f879ce8f0328b6c2f175656fed1b4b | R | 25,761 | 663 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 2, Figure 3"
author: "Antoine Beauchamp"
date: 'January 25th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = ... |
ee19d2322be1de500e00fc0a9c2a2a5d838e278da53e1e75070a29b80afdba7b | R | 26,161 | 623 | #quantification of the modularity of the desmosomal connectome and random scale-free and Erdös graphs of similar statistics
#code for Figure4 of the Jasek et al desmosomal connectome paper
#Gaspar Jekely
source("code/Packages_and_Connection.R")
# Load packages
library(reticulate)
start <- Sys.time()
# read csv expo... |
fb2ed8993ca1fee6279521c8cd2ce15ca2ccc02ab986f0c498f2ef4506063286 | R | 27,022 | 622 | ---
title: "Inflammatory plexus response in ICH-SBI"
author: "Kevin Akeret and Raphael M. Buzzi"
date: "08.08.2022`"
output:
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(ggbeeswarm)
```
# Data import
```{r data import and formatting, includ... |
17c7770fc7aa0d36090040891fd7b106685d451bc3cf2e9501e19301fb8b2723 | R | 27,537 | 639 | #Desmosomal connectome paper R - Natverse code to plot all muscle cell types
#code for Figure2 of the Jasek et al 2021 desmosomal connectome paper
#Gaspar Jekely
source("code/Packages_and_Connection.R")
# read skeletons ----------------------------------------------------------
{
#read some meshes and cells from cat... |
ec39dca0e709e50a6c2f93483f5b6bec680a2888c48ab21e98ab9a2c1243d3d6 | R | 27,747 | 550 | ##' richGO
##'
#' @name richGO
#' @title GO Enrichment analysis function
#' @param x vector contains gene names or dataframe with DEGs information
#' @param godata GO annotation data
#' @param ontology BP,MF or CC
#' @param pvalue cutoff pvalue
#' @param padj cutoff p adjust value
#' @param organism organism
#' @param ... |
69eadb132bc62f92e4b32c8142c11ccf34afebba9433046b4be860817531d3a4 | R | 27,749 | 657 |
#' Generate a 3D scatter plot html widget with color changer
#'
#' This function generates an interactive 3d scatter plot. Includes a color changer and
#' multi-panel wrapping.
#'
#' @param coordinates A m x 3 matrix of numeric xyz coordinates.
#' @param color A m x n data.frame of data to plot as color. Categorica... |
08ac6c2ac45273e24f6d2b163b1e7ef8fc5d42c5bb46aca7030a4175ff1e8473 | R | 27,772 | 667 | ---
author: "Belinda Phipson"
title: "speckle: statistical methods for analysing single cell RNA-seq data"
date: "`r BiocStyle::doc_date()`"
package: "`r BiocStyle::pkg_ver('speckle')`"
vignette: >
%\VignetteEncoding{UTF-8}
%\VignetteIndexEntry{speckle: statistical methods for analysing single cell RNA-seq data}
... |
a4fbb7521897083180c154b21497f2fda0553a99d097b2c4cd198f4fb4e93877 | R | 27,815 | 840 | ### Miscellaneous Functions
#_______________________________________________________________________________
# Aesthetic variables
# Color Schemes
genotype.cols <- c("ASO"= "#bfbfbf", "WT" = "#ed7d31")
treatment.cols <- c("PD"= "#Prebiotic", "HC" = "#Control")
treatment.group.cols <-
c("ASO_Prebiotic" = "#91a6cc",... |
c029c962b55f490c355ca5817ee4e8789b48efcd4f76e75b42277222a5657959 | R | 28,642 | 542 | #### Manual Gating & Clustering ####
gated_data <- data_normalized
## visualization
gated_data %>%
filter(MAG > 0 & MAG <= 2) %>%
filter(GFAP > 0 & GFAP <= 5) %>%
filter(obj_type_id %in% "cells") %>%
ggplot() +
aes(x = MAG, y = GFAP, colour = MBP) +
geom_point(size = 1L ) +
geom_den... |
b0b9758ee7fa2a68be450d402455d3681985b679ac0ed0c6dfb8661310cad1c2 | R | 28,707 | 805 | #data(connectivity, envir=environment())
update.wholebrain<-function(){
detach('package:wholebrain', unload=TRUE)
remove.packages("wholebrain")
if( .Platform$OS.type=="windows" ){
devtools::install_github("tractatus/wholebrain", INSTALL_opts=c("--no-multiarch"))
}else{
devtools::install_github("tractatus/whole... |
cf5e6ee08c7ddea4924717d6c2ec31bfad875d01cb60303e792ef67c7f75956b | R | 28,777 | 681 | # writeRich() / readRich() (SPEC-RICHR-004 REQ-011..REQ-014, AC-005 I/O leg,
# AC-010..AC-014): a result object stored as a folder of TSV tables plus a JSON
# manifest. Fixtures are built with the public API (helper-tested.R) and every
# folder is written under tempdir().
io_dir <- function() tempfile("rich-io-")
# F... |
1d1aff56f1a7e13191d98b422de14f9b5f14e4caf0f994e8aba2f16b6a585a3c | R | 29,290 | 489 | #### Figure DeNovo -> Identifying cell and disease object compositional differences in data-driven segregated human brain by AD status ####
#### resetting de_novo_regions order ####
master_regions_c$de_novo_regions <- factor(master_regions_c$de_novo_regions, levels = c(1,2,5,3,4))
disease_cell_overlap$de_novo_regions ... |
d76488dcf52274a556352f519f35cfcafd4c8e087819dd606bd513550eecd684 | R | 29,710 | 817 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 2, Figure 4"
author: "Antoine Beauchamp"
date: 'March 14th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = FA... |
11639eb47ad6069466e1a01482e210f6030c882572609452f3ca44d885aa56eb | R | 29,747 | 880 | # TODO Add documentation
create_sankey_bars <- function(prop, enquo_x, enquo_y, idx) {
sankey_bars <- tibble::tibble()
for (group in idx) {
group_length <- length(group)
for (i in 1:(group_length - 1)) {
ctrl <- group[i]
treat <- group[i + 1]
temp_row_ctrl <- prop %>%
dplyr::grou... |
468641d961b7c6f1ad29732ddb4c7783f29e1c50504675c64606d23a84b69087 | R | 30,114 | 703 | library(here)
library(dplyr)
library(magrittr)
library(stringr)
library(ggplot2)
library(readr)
library(patchwork)
library(cowplot)
library(ggsignif)
library(ggpubr)
df <- read_csv(here('./data/processed/features/tidyfeatures.csv'))
df <- rename(df, species = `Data Type`)
df$resection_location %<>%
str_replace('Rig... |
4249dd5e38593e027ebcf51ed90ed9e961a3923ddeecb1f8c45f057b368ef5a3 | R | 31,107 | 860 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 2, Figure 3"
author: "Antoine Beauchamp"
date: 'January 25th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = ... |
9490cb9da4a5b9e0a481e91fea8ae2d78e1357139f8f25897b9041687c48e6ce | R | 31,846 | 730 | #' Write an enrichment result to a folder of tables
#'
#' Stores a \code{richResult} or \code{GSEAResult} as a folder holding
#' \code{manifest.json} and one UTF-8 tab-separated table per data frame of the
#' object, so that \code{\link{readRich}} can rebuild it exactly.
#'
#' The folder holds \code{result.tsv} (\code{... |
be8d2b73e1dc109533667f144e0e53ae630a3f87631dffafd9737e59861a861a | R | 31,866 | 699 | #' Group reported terms into themes by the overlap of their evidence genes
#'
#' Groups the terms that one or several enrichment results report into
#' themes of related terms, by the kappa similarity of the genes that support
#' each term, and keeps everything needed to go back from a theme to its
#' terms, their rows... |
b6334db26d95589eaeeef956b98c756b7fff5d72fd58342d110507068d2069c8 | R | 33,588 | 766 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 3, Figure 5"
author: "Antoine Beauchamp"
date: 'July 15th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = FAL... |
9f22f70f28b267e35b649cceaa62550fd5eb8d4f1c5fae22a3ee5a6af07edb58 | R | 35,656 | 920 | source("scripts/R/ReadDataMTurk.R")
##### Hypothesis 1
print("")
print("")
print("Hypothesis 1: With increasing age children will exhibit more representational drawing.")
# We test whether scribbling can be explained by the fixed effects: age, AQ.
# (1|WorkerId) accounts for individual differences in ratings
# (1|Chi... |
1351f6fbaed2e1eaf2b43cddfb7f180c18569f406ebefb56c1d16e77567dcd38 | R | 36,874 | 843 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 1, Figure 1"
author: "Antoine Beauchamp"
date: 'March 14th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = FA... |
38be3251a74a71be5e1ddcc82c100eb203e103b531142dda75bcf6727aa87215 | R | 37,117 | 861 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 1, Figure 1"
author: "Antoine Beauchamp"
date: 'March 14th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = FA... |
9788ec3baef7d8337ad9a20449a49999e45ca38a5a392eb20e929f2b6861e81e | R | 37,138 | 675 | #### Region Analysis of CytoMAMP Per-Cell Data ####
# Includes anatomical region labeling and de novo region clustering labeling
#### Marker subsets ####
just_markers <- panel[-c(1:4,44:45)]
disease_struct <- c('Amyloidbeta140','Amyloidbeta142',"PanAmyloidbeta1724",'PHF1Tau', 'X8OHGuano', 'pTDP43', 'PolyubiK... |
0e1f46c38be2620f0f01630fd9a201b5c1aecf62d86ba15eb27b1799e1319771 | R | 38,982 | 803 | # richReport() study report (SPEC-RICHR-008 AC-001 ... AC-008). Fixtures and
# the base-R HTML readers are in helper-report.R; each test asserts its
# fixture roles first and names the defect it catches.
test_that("report tables, saved results and checksums reproduce what the report shows (AC-001: lost levels, list co... |
10107084c378702c0d4114be3f5983475806b622f220db40c40e274037318d42 | R | 40,166 | 1,063 | ---
title: "CanineGliomaManuscript"
author: "Dylan Ammons"
date: "6/1/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
```{r Load in required packages}
library(tidyverse)
library(ggplot2)
library(lubridate)
library(stringr)
library(survival)
library(surv... |
5426b5ad9542b37b9da0a372fe5eb7aec8a4f43424a811bdf8d32d28aabab615 | R | 40,276 | 882 | #### REGION ANNOTATIONS ####
#### subregion annotations ####
#### Ctrl Regions ####
Ctrl_MedRes_point_ids <- list(1:100,1:105,1:70)
Ctrl_MedRes_subregions <- list(c('Alveus',
'EC',
'EC',
'EC',
... |
7bb2ebef08cdabe04f6e7b77afcc40106dcf22c7c067aed5d9eb0d1cbf86c5cd | R | 40,300 | 1,014 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 4, Figure 6"
author: "Antoine Beauchamp"
date: "February 2nd, 2022"
output: html_document
---
#Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = F... |
7836c5a4bbb633c55918861fbfc9bb477cc6a372d03b8bc90be2fb50473dd4ff | R | 40,924 | 892 | ---
title: 'RBD: coloc'
author:
- name: "Regina H. Reynolds"
affiliation: UCL
output:
html_document:
code_folding: hide
theme: paper
highlight: kate
df_print: paged
toc: true
toc_float: true
number_sections: true
---
```{r setup, include=FALSE}
library(coloc) # Original colo... |
16c908e59575f95a6c1097363ea31935ffc613a6498fd91c044dfb36aa3cc7d7 | R | 41,397 | 1,061 |
printJSONneuron<-function(neuX, neuY, intensity, area, structureAN, ytop, color = NULL){
#probably should remove ytop
cat('var neurons = {\n
"type": "FeatureCollection",\n
"features": [\n')
for(i in 1:length(neuX)){
if(structureAN[i]==0){
line.color<-"#ff0000"
if(is.null(color)){
fill.colo... |
1875ea36a3cf5ee066efe4da5429f4e8a09509cd8d4f33b588cfa3c08461f29c | R | 41,855 | 975 | ## ----------------------------------------------------------------
## ORA helper functions (shared across enrichment functions)
## ----------------------------------------------------------------
#' Validate a reporting cutoff
#'
#' The one validation rule shared by every entry point that takes a raw or an
#' adjust... |
84a4917ed2b1f74884da312a1f0b1cf7a495f90f31ecb30fb10485bf74b66e6a | R | 42,902 | 961 | knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(dplyr)
library(tidyr)
library(janitor)
library(ggplot2)
library(lsr)
library(knitr)
library(kableExtra)
library(stringr)
library(neuroCombat)
library(lme4)
library(forestplot)
library(ggpubr)
library(rstatix)
library(magrittr)... |
77b510b91796dae02e0e65f132043b27d962a8579e144a5cbcbac16233efa4eb | R | 43,415 | 1,024 | ---
title: "CompareCombats"
author: "Sophie"
date: "27/10/2021"
output:
html_document: default
pdf_document: default
word_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
```
```{r}
library(dplyr)
library(tidyr)
library(jani... |
609d8beb668bdb4dd7b1b218d87728f68fc309320c9bff98239e200adc2148f5 | R | 44,243 | 1,128 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 4, Figure 6"
author: "Antoine Beauchamp"
date: "February 2nd, 2022"
output: html_document
---
#Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = F... |
f7621e9aa22a7474c3314604f59aef07ebcda65ccc953ad9b71c1701ea716eb5 | R | 44,309 | 1,253 | ---
title: "DLB_Epigenome_EPIC.Rmd"
author: "Xiaojian Shao"
date: "02/01/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# set up working directory
knitr::opts_knit$set(root.dir = '~/Documents/AgingInPlace/DLBproject/missMethyl/')
```
# DNA methylation analysis of DLB pa... |
b552a11203ebf06d1ea3d9a0115f9b9d9bdf9bd074dc79fb3b103d875ea91f8a | R | 45,571 | 719 | #### Figure Anat -> Identifying cell and disease object compositional differences in anatomically segregated human brain by AD status ####
#### A) Segmenting workflows: ez_segmenter and deepcell processes for identifying and extracting disease objects and cells, respectively ####
#### B) Image overlays: DG->CA1 (use... |
fae32db1faf54fce8840a7fe6f4eb1d67f42cde6e9d7eba5cdfc8ca1ba9c1cb3 | R | 46,017 | 988 | #' Write a study report folder from enrichment results
#'
#' Writes a folder a collaborator can open offline: a self-contained HTML
#' report, the saved results, every table behind the report as a
#' tab-separated file, an analysis manifest and a two-line rerun recipe.
#' \code{richReport()} only assembles what the res... |
ad8089d68541398f799358c52efda1d8fcb4c3e7bd47bad49d85eb14cce17f88 | R | 46,313 | 879 | # ============================================================
# S4 generics + methods for new plotting functions
#
# Primary names use rich* prefix.
# Old gg* names are kept as aliases for backward compatibility.
# ============================================================
# -------------------------------------... |
1dd569049441db5211a1b2a78a1cafa834b6a66dcf6c019ffcb5a434186bc93b | R | 46,391 | 1,012 | # script used to analyse data reported in https://doi.org/10.1101/2022.08.25.505296
# data and analysis scripts can be found at www.github.com/BriVandrey/lec-to-mec-analysis
# to use, download files and set working directory (***) to relevant path for your machine on line 13
# outputs: statistical results are saved as... |
e68daa194ede4f79f9b62a4af97da6a2958411287689430e4bdbfe35d2cb398b | R | 47,383 | 1,092 | # title: "placenta and decidua MDS plots"
# author: "Kimberly Olney"
# date: "02/04/2020"
# output:
# pdf_document: default
# html_document:
# df_print: paged
library(RColorBrewer)
library(matrixStats)
library(ggplot2)
library(edgeR)
library(DESeq)
library(limma)
library(doParallel)
library(variancePartition)
li... |
e830bd90d82d5d35a93d694b53e78c1b5dbf4431f9a0c755c07e7843ddf650a2 | R | 48,838 | 1,139 | data(glassbrain, envir=environment())
data(EPSatlas, envir=environment())
data(atlasIndex, envir=environment())
#data(atlasOntology, envir=environment())
data(ontology, envir=environment())
data(schematics, envir=environment())
suggestions<-function(dataset, normalize.by=NULL, exclude.below=10, reduce.below=100, clus... |
a8c7d4446b4512b024fdd854cbc5042b979ab6573427df7624ea3ccfc740aed9 | R | 50,400 | 1,077 | ##' @importFrom ggplot2 ggplot aes geom_segment geom_point coord_flip labs
##' @importFrom ggplot2 theme_minimal geom_bar coord_polar scale_fill_gradient
##' @importFrom ggplot2 scale_fill_manual geom_text scale_color_gradient
##' @importFrom ggplot2 scale_color_gradient2 scale_color_manual geom_vline
##' @importFrom g... |
d28c4b5b20bb9373bc26a73ecbadc82b02ebd9bb53f90be2bfc2e6e4bcf25397 | R | 51,595 | 1,147 | ################################################################
#### This app is written by Dr. Reza Aalizadeh (C) 2022 ########
#### For any questions, drop email in raalizadeh@chem.uoa.gr ###
################################################################
jscode <- "shinyjs.closeWindow = function() { window.clo... |
ddee46624b7e5559e42f0558a7bbd6f085f33301c0dbba9263e6e16d3f4c3478 | R | 52,776 | 975 | libs <- c('ggplot2','RColorBrewer','reshape2','devtools',
'pheatmap','flowCore','plyr','scales','coin','grid',
'gridExtra','tidyr','Rtsne','FlowSOM','randomcoloR','viridis','tidyverse')
for (L in libs){
if(!require(L, character.only = T)) {
install.packages(L, dep = T, quiet = T)
if ... |
b0b6d8c4d97204792601e0087408d8cc9297c7f1c0345cd713773708187cd258 | R | 53,943 | 1,288 | .validate_gsea_inputs <- function(x, pvalue, padj, minSize, maxSize,
padj.method,
eps, scoreType, nproc, BPPARAM, seed) {
scalar_size <- function(value, name, allow_infinite = FALSE) {
if (length(value) != 1L || !is.numeric(value) || is.na(value) |... |
53b3e2a5f1c610ad8c45923b0d8cabd17958878782b10d71bf6e5a1f58f58781 | R | 54,779 | 1,280 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 3, Figure 5"
author: "Antoine Beauchamp"
date: 'January 28th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = ... |
ea89cc6e42a66eb9ed956317bc3223b83d1ec02d3ae98c663e4540b8ba46b23f | R | 55,024 | 1,695 |
# getSymbols() -----------------------------------------------------------
#' Function to retrieve symbols from formula-formatted input
#'
#' Formula like strings are parsed, and returned in form of a list
#'
#' @param char input
#' @param exclude parts of the formula which will be excluded from output
#'
#' @return ... |
e5b4c4ed829cc665573356357ba02966c62ff5915335512718607bd138028d46 | R | 55,085 | 971 | # Run DeepCellAnalysisTMAQuantile.R to get all_data
libs <- c('ggplot2','RColorBrewer','reshape2','devtools',
'pheatmap','flowCore','plyr','scales','coin','grid',
'gridExtra','tidyr','Rtsne','FlowSOM','randomcoloR','viridis','tidyverse')
for (L in libs){
if(!require(L, character.only = T)) {
... |
b60c1a2f3c6bdfdce9705d0067da2276d74f5be84a8d4501a7318ec877156f1f | R | 56,322 | 1,032 | ---
title: "De novo discovery of traits co-occurring with chronic obstructive pulmonary disease"
author: "Evgeniia Golovina"
date: "26/05/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message=FALSE)
# install.packages("pacman")
# load libraries
pacman::p_load(ggplot2, ... |
fd4da8b5b6998d721908377bc51b0e7cc4b1f45447439a39ba212af4fad11358 | R | 57,194 | 2,022 | # @DESCRIPTION: heatmap
# Library -----------------------------------------------------------------
library(magrittr)
library(ggplot2)
library(patchwork)
library(rlang)
library(DESeq2)
library(ComplexHeatmap)
library(ggupset)
library(fgsea)
# Load data ---------------------------------------------------------------
... |
91d696142e5e047a0b852a4e05f461999c38d6510f57c77941f77194c800d426 | R | 59,130 | 1,410 | ---
title: "Whole-brain comparison of rodent and human brains using spatial transcriptomics"
subtitle: "Results 3, Figure 5"
author: "Antoine Beauchamp"
date: 'January 28th, 2022'
output: html_document
---
# Initialization
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,
include = ... |
a23c7057b12b8b158716d10a9bd9b6630816fdd63c3d7f595f3a7e15df9671b7 | R | 61,615 | 962 | #### Figure SubNeurons-> Identifying cell and disease object compositional differences in data-driven segregated human brain by AD status ####
#### A) UMAP of subclustered neurons ####
# Meta
p1_U <- filter(fsom_neurons) %>% #, UMAP1 > -20 & UMAP2 > -20) %>%
ggplot(aes(x = UMAP1, y = UMAP2, color=Meta)... |
35fce38edcd3f4038ff56f2c0d5c203a9240113bdf8d768bd55989f2c357f62e | R | 64,426 | 855 | setwd("/Users/m239830/Dropbox (ASU)/Placenta/BATCH2_PLACENTA_DECIDUA_ANALYSIS/HISAT_FeatureCounts/batch1_and_batch2/GTEx_TPM/GTEx_MeanTPM")
library(stringr)
library(tidyverse)
library(dplyr)
#install.packages("corrplot")
source("http://www.sthda.com/upload/rquery_cormat.r")
library(corrplot)
library(UpSetR)
library(ggp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.