sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
2a9fc760f7b8c01dcb7d725eaa7730ecb4daa0b7c26d0cdf3644c0747852d42f | R | 27,424 | 747 | # Siwei 19 Feb 2024
# make peak file contains ASoC SNPs
# ! calculate GABA peaks ! ####
# init ####
{
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(GenomicFeatures)
library(BSgenome.Hsapiens.UCSC.hg38)
library(GenomicRanges)
library(org.Hs.eg.db)
library(stringr)
library(futu... |
4cd8906cb8bf89167a5f51599aca7b5d9576745eb6a5510db7f055153c0e8d66 | R | 27,427 | 746 | # Siwei 19 Feb 2024
# make peak file contains ASoC SNPs
# ! calculate GABA peaks ! ####
# init ####
{
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(GenomicFeatures)
library(BSgenome.Hsapiens.UCSC.hg38)
library(GenomicRanges)
library(org.Hs.eg.db)
library(stringr)
library(futu... |
5e397d6ccb48c7c3e717a885de2c2dc36b5820104367f7e57c096a34cc2017fb | R | 27,431 | 704 | findCircleCenter <- function(p1, p2, p3) {
# Calculate the midpoints of the chords
mid1 <- c((p1[1] + p2[1])/2, (p1[2] + p2[2])/2)
mid2 <- c((p2[1] + p3[1])/2, (p2[2] + p3[2])/2)
# Calculate the slopes of the lines (p1p2 and p2p3)
slope1 <- (p2[2] - p1[2]) / (p2[1] - p1[1])
slope2 <- (p3[2] - p2[2]) / (p... |
706415523da0523378e647c3607ad2f83c4889693b9c0b1e3e7aff53caba3e87 | R | 27,440 | 705 | library(DESeq2)
library(tidyverse)
library(UpSetR)
library(patchwork)
theme_set(theme_minimal(base_size = 16))
# vector of colours for plotting developmental stages
stage_colours <- c("nulliparous" = "grey",
"gestation d5.5" = "#a6cee3",
"gestation d9.5" = "#9ecae1",
... |
dc114cdaeada1f4789d8ba788a694ece925b9299b6f11446a88841a97d91cc10 | R | 27,550 | 750 | # libraries
library(igraph) #For network functions
library(Hmisc) #For generating correlation/p-value matrices
library(boot) #For bootstrapping
library(data.table) #for rbindlist
library(proxy) #For distance measures (e.g, Jaccard distance)
library(statGraph) #For Jensen-Shannon divergence between two graphs
l... |
99937040234154774d26d188be90a94f4ac44b8b863fdd6c41ef4686046809f4 | R | 27,664 | 486 | #load results
##### load packages and results ####
if (!require("here")) {
install.packages("here")
library("here")
}
if (!require("tidyverse")) {
install.packages("tidyverse")
library("tidyverse")
}
if (!require("magrittr")) {
install.packages("magrittr")
library("magrittr")
}
#color
color_mapping_vec <- ... |
fc27ae558004ba7da28deb34f085f4c638862812a6f1d5e0ee9d55a90f9f157e | R | 27,695 | 678 | ```{r}
# MERFISH brain receptor map
suppressPackageStartupMessages(library(xfun))
pkgs = c("SingleCellExperiment","tidyverse","data.table","dendextend","fossil","gridExtra","gplots","metaSEM","foreach","Matrix","grid","spdep","diptest","ggbeeswarm","Signac","metafor","ggforce","anndata","reticulate",
"matrixS... |
1fbc669f8662c32b8d2cd9243b45cc85741cd455b2564d20559b823177e6f6c7 | R | 27,777 | 873 | # Siwei 29 Sept 2023
# plot PCA of Alena's microglia with iPS-derived microglia + human
# Analyse Alena's RNASeq results in-house
# init ####
{
library(edgeR)
library(readr)
library(readxl)
library(Rfast)
library(factoextra)
library(dplyr)
library(stringr)
library(ggplot2)
library(RColorBrewer)
... |
087eb84fa6d25a65c8a750dd9950346dc249f83cd96fd4a4c1587699db887d06 | R | 27,868 | 790 | #
# This is a reanalysis of Evanski JM, Zundel CG, Baglot SL, Desai S, Gowatch LC, Ely SL, et al. The First "Hit" to the Endocannabinoid
# System? Associations Between Prenatal Cannabis Exposure and Frontolimbic White Matter Pathways in Children. Biol Psychiatry Glob Open Sci 2024;4(1):11–18
# It uses the ABCD 4.0 rel... |
bea0cbe3f6f630fdc24a2c6bcf67ffdd7ff9a8346695e367eb052c1c9f2e208c | R | 28,064 | 667 | require(optparse)
require(tidyverse)
require(ggpubr)
require(cowplot)
require(extrafont)
require(survival)
require(survminer)
# variables
THRESH_FDR = 0.05
THRESH_N_SUM = 5.5
# formatting
LINE_SIZE = 0.25
FONT_SIZE = 2 # for additional labels
FONT_FAMILY = "Arial"
PAL_DRIVER_TYPE = c(
"Random Genes"="darkgreen"... |
faad48dd55258aaf6e2697373d94af0a10a025011f88c043174d3e4f12077b5e | R | 28,330 | 606 | ---
title: "Figures & Analyses"
author: "Lea Zillich, Anne Hoffrichter, Eric Poisel"
date: "2022/02/17"
output:
html_document:
df_print: paged
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, tidy.opts=list(width.cutoff=80),tidy=TRUE, fig.asp=0.5, fig.width=12, warning = FALSE)
```
```{r loadL... |
1ee1c93986d1b67a439c082562b2814d0542ca1671ef75f6ab3e5cfeee68d9c4 | R | 28,371 | 658 | ---
output:
html_document:
toc: true # table of contents
toc_float: true # float the table of contents to the left of the main document content
toc_depth: 3 # header levels 1,2,3
theme: default
number_sections: true ... |
3de9642ce7a2ae036488759c6789ed633053a4af61a45f8266749b7a911ed1d4 | R | 28,403 | 665 | ---
title: "davies_2019-htseq-edger"
output: html_document
---
Data from: Cancer Discov (2019) 9 (5): 628–645. Fischer ... Davies et al
"Molecular Profiling Reveals Unique Immune and Metabolic Features of Melanoma Brain Metastases"
RNA-sequencing data downloaded as .bams from the European Genome-Phenome Archive:
log... |
641201e06c4fe07b72ca3f9f283e171a9c8ba364948c5264a111db21ad1a5a01 | R | 28,515 | 723 | library(DESeq2)
library(tidyverse)
library(patchwork)
library(ggfortify)
library(ggbeeswarm)
theme_set(theme_minimal(base_size = 16))
# vector of colours for plotting developmental stages
stage_colours <- c("nulliparous" = "grey",
"gestation d5.5" = "#a6cee3",
"gestation d9.5" = "... |
eaa57c33b226cbe1047edc5e05c4375374b742f4e346ae8cc0a430041b30c103 | R | 28,559 | 551 | #!/usr/bin/env Rscript
# Differential expression analysis from raw read count table using DESeq2
# Author: Gisela Gabernet, Stefan Czemmel
# QBiC 2019; MIT License
library(RColorBrewer)
library(reshape2)
library(genefilter)
library(DESeq2)
library(ggplot2)
library(plyr)
library(vsn)
library(gplots)
library(pheatmap)
... |
2f30633fb742e74dc336739b614aff754f1118d4051158861e4e423000b95644 | R | 28,584 | 726 | library(DESeq2)
library(tidyverse)
library(UpSetR)
library(patchwork)
theme_set(theme_minimal(base_size = 16))
# vector of colours for plotting developmental stages
stage_colours <- c("nulliparous" = "grey",
"gestation d5.5" = "#a6cee3",
"gestation d9.5" = "#9ecae1",
... |
1b597e8b7196e70ceb175c8eba3a8fd57f60dc5a4acc7813ae90a31b56144ddb | R | 28,587 | 565 | # libraries ---------------------------------------------------------------
#Load libraries
library(tidyverse)
library(Seurat)
#devtools::install_github('satijalab/seurat-data')
library(SeuratData)
library(BayesSpace)
library(scales)
# read in the seurat object already processed -----------------------------
list_brai... |
bf68997c07fec9a3761fd550439949b919a3e66b4fc3d09fe2b215eab36841cd | R | 28,601 | 689 | ---
title: "L. variegatus Cell Culture - scRNA-seq wit Seurat - 5% FBS"
output:
html_document:
fig_width: 10
fig_height: 10
date: '2022-03-10'
name: Kate Castellano
editor_options:
chunk_output_type: inline
---
#https://satijalab.org/seurat/articles/merge_vignette.html
#https://satijalab.org/... |
c78bbf3e76e3163b627dc0f6082ec44b0eebd9a6472018188e9eefc4a157f20e | R | 28,765 | 591 | # Comparison analysis of multiple datasets using CellChat - major cell types (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# March 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https:... |
aa64a4246afac983b74f26bef91f2de61e9194d7e434a29514458ec36638bb96 | R | 28,779 | 591 | # Comparison analysis of multiple datasets using CellChat - major cell types (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# March 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https:... |
28513e2d6b3aeea12516cb50041d45aba151137f0cfe7e9db5fd05e6af11ba8d | R | 28,817 | 591 | # Comparison analysis of multiple datasets using CellChat - major cell types (continued)
# CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project
# Isabel Castanho (icastanh@bidmc.harvard.edu)
# March 2024
# https://github.com/sqjin/CellChat
## Tutorial: https://htmlpreview.github.io/?https:... |
1958f1fb11271b2f98673ba8ebf70810aea797981156568212247b7852618dc2 | R | 28,832 | 596 | ## This script was used to annotate cells and convert the Seurat objects to AnnData
salloc -A def-sfarhan --time=0-8 -c 1 --mem=200g
module load StdEnv/2020
module load r/4.2.2
R
library(Seurat)
library(ggplot2)
library(tidyr)
library(stringr)
library(dplyr)
library(ggrepel)
library(RColorBrewer, lib="/lustre03/pr... |
7eb469fddb44934fcdc7b6e32342317ab024400c7aab5ab0f4d1e291943bacd2 | R | 28,858 | 792 | ---
title: '%'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(dplyr)
library(Seurat)
library(cowplot)
library(patchwork)
library(ggpubr)
library(stringr)
library(tidyverse)
```
1. WT only
2. analysis
3. WT and MUT
4. analysis
#2 cluster annotation study... |
a63c74144a3a39c553277cb1910fb15130951f369d2223a605460accb5d4a20e | R | 28,889 | 786 | # Siwei 19 Feb 2024
# make peak file contains ASoC SNPs
# ! calculate npglut peaks ! ####
# init ####
{
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(GenomicFeatures)
library(BSgenome.Hsapiens.UCSC.hg38)
library(GenomicRanges)
library(org.Hs.eg.db)
library(stringr)
library(fu... |
f467787d9c2076ff58710dedc4ca257ffdf777b8595957f1196b66b20a61cc23 | R | 29,093 | 355 | ---
title: "scDblFinder"
author:
- name: Pierre-Luc Germain
affiliation: University and ETH Zürich
package: scDblFinder
output:
BiocStyle::html_document
abstract: |
An introduction to the scDblFinder method for fast and comprehensive doublet
identification in single-cell data.
vignette: |
%\VignetteIndexEntr... |
507f0896d6375677d917a967fddaaba078617fef411f31d820ff03986b0fa110 | R | 29,263 | 503 | #' @title Calculate genomic control inflation factor for a QTL/GWAS summary statistics dataset
#'
#' @param summaryDT A data.frame containing one or two columns: p-value (required) and group (optional)
#' @import data.table
#'
#' @return A data.table object
#' @export
#'
#' @examples
#' \donttest{
#' url1 <- "http://bi... |
cd1f6354a5ad81fba95ca509aa2e8af26a319cbea078db88b9c429ad28e1bf82 | R | 29,279 | 527 |
#' Launch the PAWS Dashboard
#'
#' This function launches a Shiny dashboard for running PAWS interactively without
#' any code. Settings will be able to be specified in the Dashboard and visualizations
#' that are the output of many PAWS functions will appear in their corresponding tabs here, too.
#'
#' @return The PA... |
7f87dcb2111aecf16e525115500d1632fd3889cad998090df7d08ab5486766ee | R | 29,600 | 692 | ---
title: "L. variegatus Cell Culture - scRNA-seq wit Seurat - 10% FBS"
output:
html_document:
fig_width: 10
fig_height: 10
date: '2022-03-10'
name: Kate Castellano
editor_options: ---
#https://satijalab.org/seurat/articles/merge_vignette.html
#https://satijalab.org/seurat/articles/pbmc3k_tutoria... |
e5dfb54c8fc19eb9dff9a7c0467d9dff10a1e7eb2131cfbaa0f96ddfd2e84da2 | R | 29,646 | 791 | #' Extract variants from DRAGEN BGEN file(s) into single BED file
#'
#' @description For a given set of genomic coordinates extract the UK Biobank WGS DRAGEN variant calls (from the BGEN format, field 24309) into a single BED file.
#'
#' This assumes your project has access to the WGS BGEN files released April 2025. If... |
8b8db6c328419db85a59a3b06a7343d16fe8cce71338c9936ba768c119a4144a | R | 30,163 | 660 | # 10 Nov 2023 Siwei
# sample GABA, nmglut, and npglut neurons
# Use 2000 cells per type each
# project 2000 cells, do not integrate
# init ####
{
library(Seurat)
library(Signac)
library(readr)
library(future)
library(parallel)
library(ggplot2)
library(RColorBrewer)
library(stringr)
library(gridExtra)... |
fa23155616ab4dff6d56c40581b5e07aa10f52d85915325b1bb78f9709c0d5cd | R | 30,179 | 692 | ---
title: "28andMe_1d_fc_analyses"
author: "JingyiWang"
date: "Aug/10/2023"
output: html_document
---
```{r setup, include=FALSE}
rm(list=ls(all=TRUE))
library(pacman)
p_load(gtools,dplyr, reshape2, ez, lme4,lmerTest,ggplot2,nlme,psych,car,languageR,gdata,scales,doBy,grid,stringr,plyr,ppcor,tidyr,gtools,dplyr,lambda... |
bdde74d265034aa82544fdd2ea1d3c6c9a136ec05eac743363900d4feec5af40 | R | 30,260 | 703 | suppressMessages(library("here"))
suppressMessages(library("optparse"))
source(here("utils","plink_utils.R"))
panel_colors = c(
"#8DD3C7", "#FFFFB3", "#BEBADA", "#FB8072", "#80B1D3", "#FDB462",
"#B3DE69", "#FCCDE5", "#D9D9D9", "#BC80BD", "#CCEBC5", "#FFED6F"
)
allele.qc = function(a1,a2,ref1,ref2) {
a1 = toupper(a... |
9d885546f29bacca3ed07b15cd7997fc26e363f7583a3d65c28c9234593c2c7c | R | 30,262 | 1,120 | ---
title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - genes from CellChat"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
```{bash, eval=FALSE, engine="sh"}
# Run the script using my... |
9ebd3291acf3e42a22a4248f7cb3ad7f1ef792de42c0f022de539c9158332785 | R | 30,342 | 611 | # morphological analyses
# last update: 17.06.25
library(readr)
library(data.table)
library(readxl)
library(ggplot2)
library(ggpubr)
library(tidyverse)
setwd("/path/to/")
loop <- read_excel("loop_parameters.xlsx",
sheet = "loop_sum")
##QUANTIFICATIONS
#VZ diameter
kruskal.test(l... |
6ea18da8476d6b33fd480db019d50f32d3eb753a6de09150048fdebc96986c61 | R | 30,769 | 932 | #'@author Gerard Baquer, \email{gbaquer@@bwh.harvard}, \email{gerard.baquer@@alumni.urv.cat},\email{baquer.gomez@@gmail.com}
#'@keywords Mass Spectrometry Imaging, Ion Mobility, Tandem Mass Spectrometry, Bioinformatics, Cheminformatics, Image Registration, Data Fusion, Quantification, Metabolomics, Lipidomics, Proteomi... |
cdb197c58b461ec1e37884f045bc0bfdbe4e40d7e7dd64a939572db0af2cbafe | R | 31,006 | 1,099 | ---
title: "078_Upload"
author: "Matteo Gasparotto"
date: "2025/05/08"
description: ""
output:
bookdown::html_document2:
code_folding: hide
fig_caption: true
toc: yes
toc_depth: 4
toc_float:
collapsed: yes
link-citations: yes
editor_options:
markdown:
wrap: 72
---
```{r setup, incl... |
8b7ab4ca14bdbf36d3cf1c2d9c61d25c06abe22649a8486d86889a9042e129ae | R | 31,066 | 653 | ################################################################################
### LIBD pilot 10x-Frankenstein (n=12) snRNA-seq samples
### STEP 01: Read in SCEs and perform nuclei calling and QC
### Initiated: MNT 29Jan2020
### Modified: MNT 03Mar2021
### Intention: To generate/have a streamlined, easy-to-follow pip... |
0ba2aba01b6602ef79292cdabceaa3b9cdc6c2099c241874ce8948f87005e22d | R | 31,139 | 842 | #' Get UK Biobank participant Date First (DF) diagnosis
#'
#' @description For each participant identify the date of first diagnosis from all available electronic medical records & self-reported data.
#'
#' If `use_baseline_dates=TRUE` (the default) then will also produce a binary 0/1 variable, indicating the controls ... |
d49481336a9da8f342b8dee407ce16af9f0a3741ab18697b1e3d727ed493ee9e | R | 31,415 | 941 | ## SCRIPT RNAseq Differential expression analyses ##
## Whole brain M. minutoides ##
## Author : Louise Heitzmann (2023) ##
rm(list=ls())
library(sjPlot)
library(ggplot2)
set_theme(
geom.outline.color = "black",
geom.outline.size = 1,
panel.gridcol = 'white',
axis.linecolor = "black",
geom.la... |
11aa11447704b32ad8af5ca5d1dad51435106040c2a1175f0644ab00396bac4f | R | 31,429 | 648 | ### MNT 10x snRNA-seq workflow: step 02
### **Region-specific analyses**
### - (2x) amygdala samples from: Br5161 & Br5212
### Initiated MNT 29Jan2020
### MNT 21Apr2021: add expansion samples (n=3, incl'g 2 female)
#####################################################################
library(SingleCellExperiment... |
3a638d1d11caf6d084e4528db648f9dd9ec8870db185b1d518d73d36fe9f6a5d | R | 31,567 | 736 | ## This script was used to produce Figure 4.
salloc -A def-sfarhan --time=0-8 -c 1 --mem=40g
module load StdEnv/2020
module load r/4.2.2
R
library(Seurat)
library(ggpubr, lib="/lustre03/project/6070393/COMMON/Dark_Genome/R/x86_64-pc-linux-gnu-library/4.2")
library(ggplot2)
library(tidyr)
library(stringr)
library(d... |
cd37366694b4b765b2bc61ac82e82a62f148bd14cd706bb85507bc65e81e05f3 | R | 31,629 | 664 | # Authors: Lauren Rylaarsdam, PhD
# Note: for testDMR function, used fast fisher's exact test developed by @zellerivo; see https://github.com/al2na/methylKit/issues/96
# 2024-2025
############################################################################################################################
#' @title Find ... |
cd634e0a3f2bce931fd569609066384bbc8af683179e461ff3e842ebbb30ebbd | R | 31,760 | 999 | ---
title: "CIRCUITS Multiregion single-nucleus RNA-seq data - single cell resilience project - Clusters - Harmony - PFC"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
---
```{bash, eval=FALSE, engine="sh"}
# Run the script usin... |
7d3702fb5733a11ba1e116635f7d991e81f1ccbfe108badf29734e0b283cc971 | R | 31,869 | 758 | #---------- Package Loading ----------
library(data.table)
library(TwoSampleMR)
library(dplyr)
library(tidyr)
library(ieugwasr)
library(ggplot2)
library(patchwork)
library(htmlwidgets)
library(plotly)
library(cowplot)
library(MRPRESSO)
#---------- Custom Function ----------
# Path concatenation operator
... |
1015797c238fb05c0982572e80de4b39d9fc1c92b8f47ab3d3372b675bd4baff | R | 31,881 | 690 | ### MNT 10x snRNA-seq workflow: step 03 - marker detection
### **Region-specific analyses: nucleus accumbens (NAc)**
### - Preprint: (3x) un-selected samples + (2x) NeuN-sorted samples
### - Revision: (3x) samples (2 female, 1 NeuN-sorted)
### MNT 25Jun2021
####################################################... |
3ec503671ae07752bcfe90cf0b6eb17d33988d762bbe2a0c866a84ca1a35b6be | R | 31,884 | 555 | ---
title: "Whole genome alignment between the mouse and dunnart"
author: "lecook"
date: "2022-02-23"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
knitr::opts_chunk$set(echo = TRUE)
```
# Notes ... |
9308d053aea789d2f99156f06095684abc10591324ebf58cd4890e266c5ad32a | R | 32,155 | 743 | # AIM ---------------------------------------------------------------------
# the aim is to plot the data after integration.
# this integration was run by skipping the seurat integration (by merging the matrices) and running Harmony
# libraries ---------------------------------------------------------------
library(ha... |
fc865054cfe41e9a07f364f073d84e94a499146b5785b104f6f7dbf6c9a2a947 | R | 32,255 | 530 | # script to generate data for causal simulation
if (!require("here")) {
install.packages("here")
library("here")
}
if (!require("magrittr")) {
install.packages("magrittr")
library("magrittr")
}
if(!require("tidyverse")) {
install.packages("tidyverse")
library("tidyverse")
}
if (!require("SingleCellExperime... |
9eee18fcf181659bbbcfaeb0bcd9e8993d2e6324be63c308252af61f4abd0feb | R | 32,281 | 547 | #----07_activity_analysis_v01---------------------------------------------------
#-------------------------------------------------------------------------------
# Locomotor activity analysis for Reinhard et al. 2025 (10.1073/pnas.2506164122)
# Requirements:
# 1)scripts:
# 01_setup_v01
# 02_variables_an... |
2caafe2dbc2a771b69307ac5612554b3cfb03dc9a6b02604cd6ad65e376b071b | R | 32,410 | 908 | ---
title: "Custom bar plots for EWCE results from rare variants"
author: "Isabel Castanho"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float:
collapsed: false
toc_depth: 4
code_folding: hide
---
---
CIRCUITS Multiregion single-nucleus RNA-seq data
single cell resil... |
04fa5a82ffaeeb90265dc486fa287619f698977bc4d6305d550f37fba093aba0 | R | 32,497 | 564 | ---
title: "Processing mouse and dunnart data for comparison"
author: "lecook"
date: "2022-02-23"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
# Pipeline for mouse and dunnart peak calling
## Download mouse unfiltered alignments from ENCODE
See [mouse_data_ENCODE](mouse_data_ENCODE.h... |
485b216679859f9af521f6e7127e2ba83ba5a1caece00a3e90c57f2ae784702c | R | 32,539 | 438 | # set working directory
setwd("/data/pt_life/ResearchProjects/LLammer/gamms/Analysis/Simulations")
# load required package
library(gamm4)
# define functions for LME modelling
simulate_amm <- function(dv){ # dv is respective dependent variable
fullmod <- gamm4(data = df[df$neurocog == 1,], formula = as.formula(paste0(... |
55091cedd260403c255fb8b8ae09589d46cc61a9efb047189015ae7ab9c48484 | R | 32,701 | 1,074 | # Author: Stacey L. Kigar
# 20250317
# set-up ------------------------------------------------------------------
# load packages
library(tidyverse)
library(magrittr)
library(ggpubr)
library(ggplot2)
library(rcompanion)
library(report)
library(showtext)
#import data
setwd("~/~r_projects/Meninges_neuts/clean/")
all <... |
b77edbaf015b6a77f22e6ff2d831bbc9a43d7b3173ebf6546cc2256f1845478e | R | 32,831 | 1,180 |
local({
# the requested version of renv
version <- "1.0.3"
attr(version, "sha") <- NULL
# the project directory
project <- getwd()
# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
if (diagnostics) {
start <- Sys.time()
profile <- te... |
3c67c1d1d726b2cf323612cf2862a8e512b9ed8cdb0cd65ec853ca165ec15387 | R | 32,969 | 706 | require(ggpubr)
require(plyr)
require(tidyverse)
#### work direction ####
setwd("C:/Plos_data")
###### Load Data #####
# load and run vglut2 OR vgat seperately
#### vglut2 mice ###
pos<-read.csv(file = 'vglut2_mice.csv')
#### vgat mice ###
pos<-read.csv(file = 'vgat_mice.csv')
### name the channe... |
7a1e59a62e003a69b626435bc773440873a7c8166bc0ebcc303029c11bb20cf5 | R | 33,105 | 800 | #### Gut-IBD/IBS-Autism Analysis
### Meta-Analysis
### Data Processing
# Load required packages
library(data.table) # For fread(); explicitly loaded here
library(plinkbinr)
library(TwoSampleMR)
library(R.utils)
library(ieugwasr)
library(VariantAnnotation)
library(gwasvcf)
library(gwasglue)
library(dply... |
4dfbf8842b990e5c08bc35984d80e1d8915faf188d2bc2c20fa2f84c4d204f78 | R | 33,157 | 650 | ### MNT 10x snRNA-seq workflow: step 02
### **Region-specific analyses: nucleus accumbens (NAc)**
### - Preprint: (3x) un-selected samples + (2x) NeuN-sorted samples
### - Revision: (3x) samples (2 female, 1 NeuN-sorted)
### Initiated MNT 04Mar2020
#############################################################... |
a4160ae36608c734defb904a37b0636487d478335f572ceb5a2299202d3b75af | R | 34,479 | 733 | #!/usr/bin/env Rscript
### title: Boxplots and bar plots of cell-type frequencies
### author: Jana Biermann, PhD
library(dplyr)
library(Seurat)
library(ggplot2)
library(gplots)
library(viridis)
library(ggpubr)
'%notin%' <- Negate('%in%')
colBP <- c('#A80D11', '#008DB8')
colBP_scn <- c('#762A83','#A80D11', '#008DB8'... |
355970c447cc23de64d2caaeb82afa7ddd67be17bac2e563f81a8785018c1b24 | R | 34,890 | 497 | library(shiny)
library(DT)
library(shinyBS)
library(ClusterGVis)
library(shinydashboard)
library(shinydashboardPlus)
library(colourpicker)
library(shinycssloaders)
# Define UI for application that draws a histogram
dashboardPage(
dashboardHeader(title = "ClusterGvis"),
# ==========================================... |
fa232af7d6d958faea03bacfb174d3f2802b62af640b8197cdc2aa2523c672b0 | R | 35,089 | 574 | ---
title: "20240419_Integrating mouse and tree shrew data_Orthologs&TSDB3"
author: "Yuanming Liu"
date: "2024/4/19"
output: nl_document
---
# sessionInfo()
# R version 4.3.1 (2023-06-16)
# Platform: x86_64-pc-linux-gnu (64-bit)
# Running under: Rocky Linux 8.7 (Green Obsidian)
# Matrix... |
51ebd4d1c7ec36dd24ca7e19d0f9315ee45602019962a7ad632eb97337d26167 | R | 35,239 | 911 | library(Seurat)
library(stringi)
library(tidyverse)
library(cowplot)
library(Matrix.utils)
library(edgeR)
library(Matrix)
library(reshape2)
library(S4Vectors)
library(SingleCellExperiment)
library(pheatmap)
library(apeglm)
library(png)
library(DESeq2)
library(RColorBrewer)
library(data.table)
library(as... |
fa10991dcf7295de8a6a6daf4bec789f56932d69dc6ebf20198722073361b9dd | R | 35,826 | 765 |
library("tidyverse")
library("sessioninfo")
library("DeconvoBuddies")
library("here")
library("viridis")
library("GGally")
## prep dirs ##
plot_dir <- here("plots", "08_bulk_deconvolution", "08_deconvo_plots")
if (!dir.exists(plot_dir)) dir.create(plot_dir, recursive = TRUE)
## load colors & shapes
load(here("proces... |
5e3bc7ec823ddd9d3925ae422aa7357293fa38ce26b29dd545ccbdd7fd67c508 | R | 35,847 | 840 | ### MNT 10x snRNA-seq workflow: step 03 - marker detection
### **Pan-brain analyses**
### - n=12 samples from 5 regions, up to three donors
### MNT Mar2020
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.v86)
library(limma)
library(scater... |
2a01bdc8c1939d6a377ee94a5afb5a5787b7c4be306ed0ee5e78a8a7f0340b18 | R | 36,031 | 771 | ```{r}
# MERFISH brain receptor map
suppressPackageStartupMessages(library(xfun))
pkgs = c("SingleCellExperiment","tidyverse","data.table","dendextend","fossil","gridExtra","gplots","metaSEM","foreach","Matrix","grid","spdep","diptest","ggbeeswarm","Signac","metafor","ggforce","anndata","reticulate",
"matrixS... |
034f3aae9795e66cd54adc0fd1b5a0787db25866ed5a69530cf9ae66dde0cd23 | R | 36,222 | 1,313 |
local({
# the requested version of renv
version <- "1.1.1"
attr(version, "sha") <- NULL
# the project directory
project <- Sys.getenv("RENV_PROJECT")
if (!nzchar(project))
project <- getwd()
# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALS... |
46b405a3fc205885d498095604b620b09f3a79ebb62fd72c0f4db18cd622a2b0 | R | 36,669 | 759 | ---
title: "SUPPLEMENTARY MATERIALS"
subtitle: "Are prediction error attenuations domain-specific in autism but domain-general in ADHD?"
author: "I S Plank et al."
date: "`r Sys.Date()`"
output:
pdf_document:
toc: true
toc_depth: 5
number_sections: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$... |
e4c25428ad01d9b3f2d1a8b42855321f7926febf2d64d3b109b02d779601aa64 | R | 36,705 | 828 | # Установка необходимых пакетов
if (!require("BiocManager")) install.packages("BiocManager")
if (!require("NormqPCR")) BiocManager::install("NormqPCR")
if (!require("readxl")) install.packages("readxl")
if (!require("ggplot2")) install.packages("ggplot2")
if (!require("dplyr")) install.packages("dplyr")
if (!requ... |
9f355f19d33fa44efdf764657ec41f9a511b5ae02dedbbf07254d677b6e1c9d1 | R | 36,735 | 828 | # Установка необходимых пакетов
if (!require("BiocManager")) install.packages("BiocManager")
if (!require("NormqPCR")) BiocManager::install("NormqPCR")
if (!require("readxl")) install.packages("readxl")
if (!require("ggplot2")) install.packages("ggplot2")
if (!require("dplyr")) install.packages("dplyr")
if (!requ... |
9adb2301d3aafb4dc398b4340e241576f6407e4c0c03ed795560c0d9aac626ab | R | 36,754 | 1,080 | #### Paired-map
#### Paired-seq/tag associated Multi-modal Analysis Pipeline
#### runJaccard and normOVE borrowed from SnapATAC [https://github.com/r3fang/SnapATAC]
#### Chenxu Zhu, cxzhu@pku.edu.cn
#### 2020-01-29
version="2020.08.15"
###
{ ### External packages
print("Checking, installing and loading packages...")... |
daecce0313dbf7d052ff107074887403d1f159e99cd4b30da8e8bf990fd21b33 | R | 36,783 | 579 | #### Oligodendrocytes analysis ####
### Pre work ####
library(tidyverse)
library(Seurat)
library(SeuratObject)
library(ggplot2)
library(doParallel)
library(future)
library(cowplot)
library(patchwork)
library(monocle3)
library(monocle)
library(SeuratWrappers)
library(Nebulosa)
library(dplyr)
library(edgeR... |
cd27656eecdb64348f9ad9ebc3cd3777b56991e10e7b84fcb5868ccf7910507d | R | 36,941 | 823 | # Calculate differential gene expression of MBM vs. ECM for each celltype
# Plot number of diff. expr. genes, fold-change distribution, volcano plots
# Cacluate correlations between aggregated patient expression data and singel cell data
options(java.parameters = "-Xmx32g") # to write excel sheets
library(dplyr)
libr... |
bb3a0131eb09ddf03074646d39d29f957676bb3abc34e7cbf190a749e55fd0a8 | R | 37,155 | 704 | #' @title Detect sentinel SNPs for GWAS using summary statistics data
#' @description
#' Return sentinel snps whose pValue < 5e-8(default) and SNP-to-SNP distance > 1e6 bp.
#' @param gwasDF A data.frame or a data.table object. Five columns are required (arbitrary column names is supported):
#'
#' `Col 1`. "snps" (cha... |
22440366a969703d5200d9fa12a0cbab188d3f48e6a1fa2f038f64479b0e9bbf | R | 37,396 | 1,054 | # 06_Heatmap_figures
##############################################################
# recreate heatmap figures
##############################################################
#####################################################################
# Now get the gene ID for presynapse
#######################################... |
11a80bec82cd56dedcdfef8d4dbfc1d3aa380a807f19777a20c5448f990dc958 | R | 37,419 | 879 | ---
title: "Mouse and dunnart peak features"
author: "lecook"
date: "2022-03-16"
output: workflowr::wflow_html
editor_options:
chunk_output_type: console
---
# Set-up
```{r setup, include = FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
# Load in libra... |
afd561cb24c2ce610e5c6ba04270ec25938853815ac6b1e0706000acd902eee9 | R | 37,506 | 796 |
library(here)
library(SummarizedExperiment)
library(rlang)
library(clusterProfiler)
library(org.Hs.eg.db)
library(cowplot)
library(ggplot2)
library(sessioninfo)
################################################################################
## Over-representation Analysis (ORA) for GO & KEGG terms in DEGs*
##... |
5577fb850ea27565ea7b83b650c687854a7d410786db79bbb074d55be0af8466 | R | 37,828 | 831 | ### MNT 10x snRNA-seq workflow: step 04 - enrichment testing
### **Region-specific analyses**
### - (2x) DLPFC samples from: Br5161 & Br5212
### MNT Feb-Mar2020
#####################################################################
library(SingleCellExperiment)
library(EnsDb.Hsapiens.v86)
library(scater)
library(... |
ed6375de98ebbe72e7b97d2dc9acf872748fcd43137a0d2a8d4d0647b21d0029 | R | 37,848 | 887 | #!/usr/bin/env Rscript
# run_spp.R
# =============
# Author: Anshul Kundaje, Computer Science Dept., MIT
# Email: anshul@kundaje.net
# Last updated: Aug 29, 2016
# =============
# MANDATORY ARGUMENTS
# -c=<ChIP_tagAlign/BAMFile>, full path and name of tagAlign/BAM file (can be gzipped) (FILE EXTENSION MUST BE tagAlign.... |
857e4750553709807861adb0bc94c3bf39dab0055d345c8c4c48a1065a91b54f | R | 37,904 | 902 | Sys.setenv("VROOM_CONNECTION_SIZE" = 5000000)
require(optparse)
require(tidyverse)
require(ggpubr)
require(cowplot)
require(scattermore)
require(extrafont)
require(ggrepel)
require(clusterProfiler)
require(ggraph)
require(tidygraph)
# variables
COSMIC_DRIVER_TYPES = c(
"Not in COSMIC",
"COSMIC Suppressor",
... |
f44ce981e13014c3204b8d47a232a4612bc7c1200db00f342664bd48d00a4200 | R | 37,911 | 850 | # Authors: Lauren Rylaarsdam, PhD
# 2024-2025
############################################################################################################################
#' @title makeWindows
#' @description Calculate methylation levels across fixed genomic windows, bed file coordinates, gene bodies, or promoter regi... |
559a41782364ddc2d0d0adfb38ef0f35f264acde1e0b46a829c81bd496540fd9 | R | 38,095 | 792 |
library("tidyverse")
library("sessioninfo")
library("DeconvoBuddies")
library("here")
library("Metrics")
library("survival")
library("viridis")
library("GGally")
library("patchwork")
library("ggrepel")
library("broom")
#### prep dirs & plot info ####
plot_dir <- here("plots", "08_bulk_deconvolution", "09_deconvo_plot... |
52bab3370ca9939e0dcccaf2e440f53b34efd4ce90f1a74eae32343909d7ee9c | R | 38,466 | 686 | ---
title: "Integration_E11E13"
output: html_document
date: "2024-06-20"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### Load necessary libraries
```{r}
suppressMessages(library(grid))
suppressMessages(library(SeuratData))
suppressMessages(library(Seurat))
suppressMessages(library(ggplot2))... |
e81e498149878c46cc6a2be7d6c587e4874c6075077a2eab9ec2634445d3b073 | R | 39,025 | 658 | # this script gathers and prepares all data for the analyses
# load required packages
library(readxl)
library(tidyverse)
library(naniar)
library(lme4)
library(kit)
hints <- function(df, col, tops = 5, tp = 1){
# a brief overview intended to give hints at potential issues in the data
# tops can be used to determin... |
e9390b7344de6d5ce9b5ad688e185931ce3d55e66d5582f0215c3a2cbc909dfa | R | 39,275 | 717 | if (!require("here")) {
install.packages("here")
library("here")
}
if (!require("tidyverse")) {
install.packages("tidyverse")
library("tidyverse")
}
if (!require("magrittr")) {
install.packages("magrittr")
library("magrittr")
}
if (!require("seismicGWAS")) {
if (!requireNamespace("devtools", quietly = TRU... |
caf579b9004d6e28c8e773e962ffc7d42e509d8daafcd1d91b398e7b7fa2d4f9 | R | 39,297 | 891 | #' scDblFinder
#'
#' Identification of heterotypic (or neotypic) doublets in single-cell RNAseq
#' using cluster-based generation of artificial doublets.
#'
#' @param sce A \code{\link[SummarizedExperiment]{SummarizedExperiment-class}},
#' \code{\link[SingleCellExperiment]{SingleCellExperiment-class}}, or array of
#' c... |
ae4824c586d5cc9fe68724278400a8d619fdbe726af921008013fa1077cce5c1 | R | 39,564 | 940 |
require(ggplot2); require(scales); require(reshape2);
#install.packages("dplyr")
require(dplyr)
#require(Hmisc)
library("readxl")
library(RColorBrewer)
library("ggsci")
#install.packages("ggrepel")
library("ggrepel")
library(ggpubr)
library(rstatix)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
#set... |
4b2b6f2c3acebfa7b8af94fb915563a96e1c4b3e29e3d1fc9cbb5195f2b22c4b | R | 39,978 | 1,082 | ---
title: "EEG_TD"
author: "Lisa Michel & Marianne Latinus (c) "
date: "mars 2025"
output: html_document
---
####### PATH
```{r message=FALSE, warning=FALSE}
rm(list=ls())
graphics.off()
getwd()
```
####### Libraries
```{r}
# #install.packages("readr", dependencies = T)
library(readr)
# #ins... |
32fc417818fc7a7c5c6e61cb4f709b56c23f1b0e0e96169786e1938d211113f2 | R | 40,207 | 987 | library(Seurat)
library(stringi)
library(tidyverse)
library(cowplot)
library(Matrix.utils)
library(edgeR)
library(Matrix)
library(reshape2)
library(S4Vectors)
library(SingleCellExperiment)
library(pheatmap)
library(apeglm)
library(png)
library(DESeq2)
library(RColorBrewer)
library(data.table)
library(as... |
d7e5ff204b8c1d033c22f3c5467fdb133a4db5f62be8c4e44b4d321fefedd7dd | R | 40,476 | 781 | ### for MAGMA with LIBD 10x pilot analyses
# - Comparing some gene-level stats vs.
# those from Liu, et al.
# - Color by cell class marker label
# MNT Jul2021 ============================
library(readr)
library(stringr)
library(RColorBrewer)
library(ggplot2)
library(fields)
library(jaffelab)
library(Sing... |
809b8525ddab85208dac7fd4cc975b375003b2de73a30fa4427ed3d39f89cf85 | R | 40,677 | 1,468 | # Load required libraries
library(readr)
library(ggplot2)
library(dplyr)
library(tidyr)
setwd("E:/005---ThirdProject/ThirdObject/6.Results/")
# Define the tags and corresponding file names
tags <- paste0("T", seq(10, 50, 10), "p")
file_names <- paste0("evaluation_metrics_50_runs_", tags, ".csv")
... |
869ed4328dab92dacd8da5e7c93ba8929cf5614764332c8a4206d5e09ba37c83 | R | 40,780 | 852 | #' Script: Statistical comparison of taxonomic composition and alpha-diversity parameters between groups
#' Author: Ilias Lagkouvardos
##################################################################################
###### Short information about the script ######
##################... |
44f5aa4659d1cd3ac797814740132c8d2a1bbde1bbc126b5232cb8c39d7bed2a | R | 41,182 | 953 | ---
title: "L. variegatus Cell Culture - scRNA-seq wit Seurat - 3% FBS"
output:
html_document:
fig_width: 10
fig_height: 10
date: '2022-03-10'
name: Kate Castellano
editor_options:
chunk_output_type: inline
---
#https://satijalab.org/seurat/articles/merge_vignette.html
#https://satijalab.org/... |
3297998c3d084b0ddedc28d1e47fdfeb66c849b79fcb48b9273b35dae11d71f8 | R | 41,222 | 915 | #!/usr/bin/env Rscript
### title: Analysis of myeloid cells (UMAP, violin plots, diffusion maps, volcano plots)
### author: Jana Biermann, PhD
library(Seurat)
library(destiny)
library(SingleCellExperiment)
library(dplyr)
library(ggplot2)
library(gplots)
library(viridis)
library(scales)
library(plyr)
library(ggrastr)... |
8bdd90477e14c6ad291fb9d737b73611f1a61f7894ec93644c4a64ec851d3971 | R | 41,717 | 936 | ### MNT 10x snRNA-seq workflow: step 04 - downstream comparisons
### **Region-specific analyses**
### - (5x) NAc samples from Oct2020
### - (3x) revision samples, incl'g female donors
### * Comparison to Jeremy Day Lab's rat NAc samples (n=4)
#################################################################... |
ac01ff48bfaffec4c9ee4868d3661bb591018b33214c1cf897661f8b8b1c0b88 | R | 42,198 | 857 | ### MNT 10x snRNA-seq workflow: step 04 - downstream comparisons
### **Region-specific analyses**
### - 5x AMY samples (incl'g revision samples)
### * Comparison to UCLA's Drop-seq on mouse medial amyg (MeA)
#####################################################################
library(SingleCellExperiment)
lib... |
b6d939ae3e9749c242d2a5111f60cc69f51113c2b52f39085a67253650d6b198 | R | 42,379 | 838 | #File to analyze differentially expressed genes between neuronal classes
library(dplyr)
library(stringr)
results_list = readRDS("Output_Classes.RDS")
results_list = unlist(results_list,recursive = FALSE)
CA1_l = results_list[grep("^CA1-\\d",names(results_list))]
CA1PROS_l = results_list[grep("^CA1-ProS-",names(result... |
b5f2c990efcd338b047affaf89f3629d617060e3cd316ba5299cbd5a5a3216b6 | R | 42,415 | 1,160 | ---
title: "ALS/FTD data analysis"
author: "Nils Briel"
date: "2025-11-14"
output: html_document
---
```{r message=FALSE, warning=FALSE, include=FALSE}
library(dplyr)
library(ggplot2)
library(tidyr)
library(readxl)
library(tibble)
library(janitor)
library(gtsummary)
library(lubridate)
library(ggrepel)
library(ggpubr)
... |
dac70ca0b194db61555908ce5c66b4f9b1ca1041c306f076db8056cab3fb526e | R | 42,545 | 1,078 | # Siwei 09 Aug 2023
# Siwei 05 Jul 2023
# plot 1MB proximal region of rs1532278 (CLU)
# chr8:27608798
# init #####
{
library(Gviz)
library(rtracklayer)
library(BSgenome)
library(BSgenome.Hsapiens.UCSC.hg38)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(ensembldb)
library(org.Hs.eg.db)
library(gr... |
8b1f441364badb2ada8b04759893501849f31da80f50c561703631bcbc69d18e | R | 42,585 | 995 | ```{r}
# load libraries
library(tidyverse)
library(data.table)
library(Matrix)
library(Rfast)
library(matrixStats)
library(reticulate)
library(anndata)
library(future.apply)
library(gtools)
library(ggridges)
library(scales)
library(ComplexHeatmap)
library(forcats)
library(igraph)
library(mclust)
library(UpSetR)
librar... |
8374595ea95374d368ee1c37628111f95e72fb9c1d0004ed6606c551dc1e237f | R | 43,176 | 1,067 |
qtrim = function(x, qmin=0, qmax=1, vmin=-Inf, vmax=Inf, rescale=NULL){
# Trim by value
x[x < vmin] = vmin
x[x > vmax] = vmax
# Trim by quantile
u = quantile(x, qmin, na.rm=T)
v = quantile(x, qmax, na.rm=T)
x[x < u] = u
x[x > v] = v
return(x)
}
plot_tsne = function(seur=NULL, names=NULL, ... |
a92eaeffa0bbd289ad09e104033a70e67fa8b0561c1eb869c659f9b14e924e06 | R | 43,425 | 921 | #' Script: Statistical comparison of taxonomic composition and alpha-diversity parameters between groups
#' Author: Ilias Lagkouvardos
##################################################################################
###### Short information about the script ######
##################... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.