sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
c26ed5bdf1a8d080f8dcceff68a11ee72b2571eea22e931b6e4e0c6c9a6112f1 | R | 12,284 | 347 | ---
title: "BASiCS - 20,000 iterations"
date: 2015-08-10
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
We analyzed our single cell data with [BASiCS][] developed by [Vallejos et al., 2015... |
3aae84a3447852613f3a747e1acad4495984725c83fa3c19f6a806f4ff365d64 | R | 12,353 | 395 | ---
title: "ERCC correlation"
date: 2015-06-15
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
In this analysis:
* Investigate the fit between the observed ERCC data and the expected conc... |
59f67c2293a74f7fcf35078c8f2e23516442bbc8cad60424117124acf5b85bae | R | 12,411 | 339 | # Created on Tue May 11 18:04:27 2021
# Name: glomerulus.R
# Purpose: Evaluates the spatial separation of synapses within the corresponding
# glomerulus
# Author: Andrea Vaccari (avaccari@middlebury.edu)
#
# Generates three plots:
# - one 3D plot showing the location of the synapses for the two posts, the best
# ... |
64523364b47446d1447ef953d7d2e488a3595c794cc719291a5edf30aeeff1ac | R | 12,474 | 286 | ################################################################################
#################### EMA Plasma Lipidomics Species ############################
################################################################################
# Updated March 7, 2024
#set working directory
setwd("~/Dropbox/2023_EMA_Ma... |
8ba63d30ac63a21cef2127681af68bda39380b7ba467ae4561ae727d81047873 | R | 12,488 | 317 | #' Submit a query string to the Open Targets Genetics GraphQL API
#'
#' @param query_string A string containing the query to be submitted to the Open Targets Genetics GraphQL API
#' @param variables A list of variables to be passed to the query
#' @param wait A numeric value indicating the number of seconds to wait bef... |
6cdd98fe96dd286068a63b9ed8edbe3df6ff6565b1e509f7aee57b968c218d98 | R | 12,499 | 266 | # Load the Seurat object
base_dir <- "path/to/data/" # Update with relative or custom path
BLA_neurons <- readRDS(file.path(base_dir, "BLA_neurons.rds"))
# Set the default assay to SCT and perform standard preprocessing
DefaultAssay(BLA_neurons) <- "SCT"
BLA_neurons <- BLA_neurons %>%
RunPCA(npcs = 100) %>... |
046b587cb2e4ac1ad16f792a8ea98111039e927746d5b0bacc092b89be9801b4 | R | 12,555 | 460 | # Patrick Cahan (C) 2017
# patrick.cahan@gmail.com
#' barplot this specific GRN
#'
#' barplot this specific GRN
#' @param qScores queryScores
#' @param control scores
#' @param stQuery sample table
#' @param dLevelQ dLevel of query samples
#' @param snName name of subnet to plot establishment level
#' @param ctrSamp... |
68174143d936afefd73846fccd7f57ebc1cf42e22c02738ae0ea35c8a3a5684b | R | 12,565 | 270 | # Load the Seurat object
base_dir <- "path/to/data/" # Update with relative or custom path
BLA_neurons <- readRDS(file.path(base_dir, "PC_neurons.rds"))
# Standard preprocessing for neurons
DefaultAssay(PC_neurons) <- "SCT"
PC_neurons <- PC_neurons %>%
RunPCA(npcs = 100) %>%
FindNeighbors(dims = 1:60) %>%... |
1f38b303a42fe51b55970cc2d8f7c2d5752582fd62a2148870c12d7e6f5f2bd3 | R | 12,585 | 379 | ---
title: "Cov figs"
output: html_document
editor_options:
chunk_output_type: console
---
# Load pacakgesS
```{r}
library(tidyverse)
library(ggplot2)
library(RColorBrewer)
library(ggnewscale)
```
## Match sing KO, mod and paths
```{r}
# match sign KOs with path and mod
df.sign.KO <- readRDS("/metaG/R_analyses/Fun... |
c595745682f5cc07ac240787de70d55bbde63cd8dd1b8a2bd3e3dcfb330d5d33 | R | 12,600 | 305 | library(Seurat)
library(tidyverse)
library(slingshot)
library(RColorBrewer)
library(cowplot)
library(gdata)
set.seed(1000)
#Script to create Figure 2
#Figure 2AB- Use control cells from Ascl1 experimemt to visualise Ascl1 and Mycn expression across pseudotime ----
load(file = "1st_submission/seurat_objects/Ascl1_NSC... |
af510665ee2c8079de5864d520db5151c075de7508de21c0c580fa96d72e57be | R | 12,638 | 344 | # see Fig_4.R for ED Fig.6A, ED Fig.6F
# ED Fig.6A, Mercator projection ---------------------------------------------
LL = 2
vv <- ucl_rot_sm + 0.5*(RF_lens_T4_pred_sm[,(3*(LL-1)+1):(3*(LL-1)+3)] - ucl_rot_sm)
vv_Mer <- cart2Mercator(vv)
# H2
df_H2 <- cbind(H2p_Merc, H2d_Merc) %>% as.data.frame()
df_H2 <- df_H2[!is... |
1a7a4252896deb5aea7e864f0160ba84e8046ca5dde19b9fa4579e20de74fd32 | R | 12,652 | 450 | #' Check if the File is a Zip Archive
#'
#' Determines whether the specified file has a `.zip` extension.
#'
#' @param f The file name to check.
#'
#' @return `TRUE` if the file is a zip archive, otherwise `FALSE`.
#'
#' @examples
#' \dontrun{
#' is_zip("example.zip") # returns TRUE
#' is_zip("example.txt") # returns F... |
600b224f7ca84faa2b39a586acf49b95c7040b407cc60fecffdfd644649ca498 | R | 12,661 | 426 | # Created on Wed Aug 4 13:25:59 2021
# Name: retinotopy.R
# Purpose: Evaluate if there is a relationship between the distances of the
# end-points centroids in the lobula and in the glomerulus
# Author: Andrea Vaccari (avaccari@middlebury.edu)
#
# Generates:
# - One 3D plot showing the used endpoints and... |
14de24f9e3262a149c2e0da4e4b8daf9612b9dce6d80fd72e18eabc07c17a0ce | R | 12,714 | 214 |
loso.combinatorics<-function( list.combination, # list of study combinations
test.name, # names of study to use as test
df, meta,
sd.min.q = 0.1,
log.n0,
study.label = "... |
0c60b846be2101a72433e98e82630e4c7296b7596dcdaa55743157e12fcccb49 | R | 12,715 | 279 | library(tidyverse)
library(Signac)
library(Seurat)
library(EnsDb.Hsapiens.v86)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(BSgenome.Hsapiens.UCSC.hg38)
library(patchwork)
library(scCustomize)
set.seed(1234)
options(scipen = 999)
polychrome_pal <- DiscretePalette_scCustomize(num_colors = 36, palette = "polychrome... |
23de62d11d987a4e0fb738dd4c940907ccc6e36a461e8ed7b26d9088db02286a | R | 12,759 | 208 | ---
title: Accessibility, Methylation, and Expression Scatterplots and Boxplots
---
```{r warning=FALSE, message=FALSE}
library(ggplot2)
library(gghighlight)
library(RColorBrewer)
library(tidyverse)
library(DESeq2)
library(egg)
res_rank_gene <- read_tsv("/Users/lindsey/Desktop/Hodges_Lab/NPCdiff_RNAseq/data/DESeq2/al... |
ae545f31ff8dc7f1f2f419642c199dd26b2783da3dc249d8566e6f3992cfa748 | R | 12,839 | 323 | #### SCT Pipeline ####
#This script runs Seurat's SCT Pipeline with Harmony Integration
#INPUT: a Seurat Object with only RNA assay and counts slot,
#with each sample in a separate layer in counts slot
#following sctransform tutorial (pub. 10/31/2023): https://satijalab.org/seurat/articles/sctransform_vignette
... |
d6e56c3cbc5425effc1bf6731220087b3204fa160df7f27e6b8fbf69e2000e05 | R | 12,899 | 276 | ## each time, just change the name of gene which needs to be checked
## note: need to use R 64 bits, not R 32 bits program
geneA = 'gene1'
geneB = 'gene2'
gene_exp_table = ''
library(scales)
library(RODBC)
library(ReporteRs)
library(ggplot2)
#library(formattable)
library(plyr)
library(htmltools)
lib... |
bd5a60f61bafa3def75b4b9ff5647a24b9e43fd84abb7b44f1d542004313dbeb | R | 12,902 | 356 | library(tidyverse)
library(R.matlab)
library(rstatix)
library(perm)
library("dplyr")
library(effsize)
source('util.R')
#Specify parameters of permutation
perm.opt <- permControl(nmc=5000,seed=123451, setSEED = TRUE)
#For the optimal clustering solution -> calculates differences in features (centiles and clinical) be... |
c3fa521c82ec9be569edd00a8b664f5bf31de2de63ac59df5acbc33a364bc1b0 | R | 12,927 | 218 | ---
title: "Understanding the eyelinker Data Structure"
author: "Austin Hurst"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Understanding the eyelinker Data Structure}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
After you've imported your ASC into ... |
db8164240bc743f4fba13428c28ec1a2a6f711e356dc4f87649857d15272f63f | R | 12,949 | 424 | #' @export
#' @import methods
#' @import reshape2
#'
#' @title NfurzeriAnnotation
#' @description Takes in input a dataframe, and a column name. Add the annotation and the mapping
#' for Nothobranchius furzeri.
#' @param x a dataframe
#' @param id the column name of the id to map
#' @param filename if you want to use... |
08e70de0527b472810ecb8d534d0107d839c38aa31e1ae7a56028a54e147e2c5 | R | 12,973 | 399 | ---
title: "Medications_table"
output: html_document
editor_options:
chunk_output_type: console
---
# Load packages + data
```{r}
library("readxl")
library("tidyverse")
load("/metaG/R_analyses/Functions/AC_KOpath/RData/Confounding_wallen_alldrugs15_leaps.RData")
```
# Define function
Refit the model with the right... |
857a587ad6054f73ef9dca7826fa791e84a04bcdec5dc12f48e6ac55b869bdce | R | 12,979 | 237 | library(RColorBrewer)
library(ggplot2)
celltypes = c("ExN","InN","OLIG","MG","ASC")
dpsi2fdr2state.sig.all = NULL
largedpsi.sig.noConfirm.all = NULL
for (i in 1:length(celltypes))
{
ct.path = paste0("/Users/apple/Wen/Neuroscience_papers/Human_AD_Multiome/Multivelo/state_PSI/state_reads_perExon/AD_allCT/ADvsContro... |
ce551ea9dd016a6763112a1ed5b814c580ef0993ebcb67524f57c726cd1fcbd2 | R | 13,050 | 345 | library(tidyverse)
library(R.matlab)
library(rstatix)
library(perm)
library("dplyr")
library(effsize)
source('util.R')
#Specify parameters of permutation
perm.opt <- permControl(nmc=5000,seed=123451, setSEED = TRUE)
#For the optimal clustering -> calculates significance with respect to control!
thresh <- 0.01
#Loa... |
2deed7c7176805ce7184270c517208fe8ebbad3949be6acfeee4b7c74acccda0 | R | 13,167 | 288 | #'@author Yuan
#'@desc comparision with scRNA-seq
#'@version comparison and visualization of shared celltype using our ct_dataset_01 and public scRNA-seq dataset downloaded from GSE129455
library(ggplot2)
library(dplyr)
library(Seurat)
library(tidyr)
library(corrplot)
library(GGally)
options(stringsAsFactors = F)
opt... |
764c3ffebadc6a6293e2fa962b33e8201ccc9646bc5e12ef829b47b869526d3a | R | 13,240 | 380 | #'@export
#' @title CompareClassification
#' @description Takes in input two SpatialExperiments with their classification values
#' and return an heatmap indicating the percentage of assigment that is shared accross
#' the two experiments. Uses the pheatmap package
#' @param X an object of class SpatialExperiment
#' ... |
1d393c72c2162eb62747819578eb4c32118258ff54ec32ddaae6368c196d96da | R | 13,245 | 376 | # Fig.1C, T4 eg -------------------------------------------------------------------
# - coord transform via pca
tar <- T4_eg[[2]]
ind_D = match(tar$tags$"dendrite start" , tar$d$PointNo)
node_dend <- child_node(tar, tar$d[ind_D,])
cen <- colMeans(xyzmatrix(node_dend))
cen_ii <- rowSums(sweep(Mi1_M10_xyz, 2, cen)^2) %... |
c2196f74bc406a1ba403ce16ebe4977520e949c9d02f105b126832d8548a771f | R | 13,264 | 402 | ---
title: "04_ProteinSolubility"
author: "Domenico Di Fraia"
date: "8/17/2020"
output: html_document
---
```{r}
#Fast set wd
setwd("/wins/ori/Domenico/multiomics_notho/data/notho/solubility/12w_39w/processed_prot_dist/")
```
```{r setup, include=FALSE}
#Root directory comes from the multiomics data folder
rd <- "/... |
a6956f04e927186625d39a9d9b5f3b214b6c7c58357525109211c5b8c71bf433 | R | 13,304 | 431 | Beta_Weight<-function(MAF,weights.beta){
n<-length(MAF)
weights<-rep(0,n)
IDX_0<-which(MAF == 0)
if(length(IDX_0) == n){
stop("No polymorphic SNPs")
} else if( length(IDX_0) == 0){
weights<-dbeta(MAF,weights.beta[1],weights.beta[2])
} else {
weights[-IDX_0]<-dbeta(MAF[-IDX_0],weights.beta[1],weights.beta[... |
a46caf595aa409877711565caf142dd82b8972e0c6431cadc16496c20194342c | R | 13,315 | 235 | library(RSQLite)
library(dplyr)
library("ggpubr")
library("tidyr")
setwd("D:\\bigdata\\dimelo\\new_code")
gene_name = 'NKX2-1'
DB <- dbConnect(SQLite(), dbname = "D:\\pdb\\database\\METHYLATION.db")
NEPC_sample <- c('SRR3146982','SRR3146983','SRR3146984','SRR3146993','SRR3146995','SRR3146996','SRR3146997','SRR31... |
e66e1cc5b98157be82a6ca5dfe042bf5a84826460bd1ff6acf9e464c5d6b45fb | R | 13,316 | 297 | #The goal of this code is to add the results from GEO2R for two antipsychotic datasets to Ra'eed's meta-analysis
#Challenges:
#1) The GEO2R output only has Affymetrix probe id and Gene Symbol annotation
#### so we'll need to join by Gene Symbol and then add the results to the rest of our output (which is currently j... |
dc81a5f7a3ddeffa430d9ef78cd9466e44981a14110654643ba2cd128199927e | R | 13,328 | 298 | #Load in MYCN samples
#four iterations of normalisation and clutering
#1 - all data, all clusters
#2 - neurogenic lineage
#3 - NSCs
#4 - quiescent NSCs
#Script_01 - read in and analyse mycn data----
library(Seurat)
library(tidyverse)
library(gdata)
library(slingshot)
library(RColorBrewer)
library(sctransform)
library(g... |
0e66e33b0f58d581be31d71e2b4a322f6224b9447d3dbcaab955da5b73aa023f | R | 13,498 | 248 | ---
title: "Detected genes and total molecule counts per cell"
author: "Po-Yuan Tung"
date: 2015-09-15
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
```{r library, message=FALSE}
source("... |
de2ed5b98b2b4a5c2b3ece427df95a15e813f78b37e6c393f62df3e4110fe476 | R | 13,521 | 254 | ###################################################
### DESeq2_1factor parameters: to be modified by the user
###################################################
rm(list=ls()) # remove all the objects of the R session
workspace <- "." # workspa... |
d21a047c84ceb4765e911b3cef4add4e28acedc9a2208191501988123d005639 | R | 13,560 | 299 | ---
title: "Harris scRNA-seq Mycn qNSCs mouse model trajectory analysis"
subtitle: "tradeSeq fitGAM nknots = 6"
author: "Rebecca Johnston and Lachlan Harris"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
editor_options:
markdown:
wrap: 72
---
```{r original-data-directory}... |
c7616b8f5489aaa37d8b5c4d9cb5d78f71b8ddd7828a777f2a4a293182b6495c | R | 13,655 | 314 | # This script calculates the multivariate analysis on corticomuscular coherence (CMC) values
# Detailed information on the methods can be found in the corresponding manuscript by Meyer et al. (2025).
library(ez)
library("fitdistrplus")
library("rstatix")
library("MuMIn")
library("lme4")
library("car")
library("em... |
61d7ba7cb644e5a1e4fedabb818db17fce83be99a7fe1ed07ebef250a606c93b | R | 13,704 | 382 | #!/usr/bin/env R
#
#
#
#
libv <- c("lute", "scuttle", "dplyr", "limma", "ggplot2", "ggforce", "gridExtra",
"glmGamPoi", "sva", "DeconvoBuddies", "SingleCellExperiment", "limma",
"SummarizedExperiment")
sapply(libv, library, character.only = TRUE)
#---------------
# manage paths
#---------------
#... |
38b5465af81f1de3ebfd65502a1c171930d713626420e8ba87ed227286cd7ea2 | R | 13,731 | 477 | ---
title: "Profile individual adjusted CVs"
author: "Joyce Hsiao"
date: 2015-10-29
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
library(knitr)
opts_chunk$set(message = FALSE, warning = FALS... |
587b540cdfcb87e288995f0abcac86918badf7bbed4deebef6fb37db5b8f5fd6 | R | 13,740 | 348 | ---
title: "Getting Started With eyelinker"
author: "Simon Barthelmé & Austin Hurst"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Getting Started With eyelinker}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r results="hide", message=FALSE, warni... |
c0523abaf18374c9a3c5da9a498fdc9b337a99b91088b98c509229246cc6de85 | R | 13,772 | 433 | ---
title: "Creating tables from profiling results"
output: html_notebook
---
```{r}
library(tidyverse)
```
In this document, we will summarize profiling results in different computers and different tasks to create a supplement on computing resources.
## Bembidion tests
Let's start with a test using Bembidion data... |
c80ea07074a6335e904698d9a4ae22475f6d2791c77e503cbe449a12db1f3e04 | R | 13,819 | 417 | rm(list = ls())
library(plotly)
library(tidyr)
library(ggrepel)
library(gtools)
library(data.table)
library(gplots)
library(useful)
library(locfit)
library(Matrix)
library(dplyr)
library(ggplot2)
library(Seurat)
library(Rmagic)
library(readr)
library(phateR)
library(viridis)
library(magrittr)
library(harmony)
library(R... |
201c3a1fddd4b336e8c067f5041cc76fefb6b470eb728c59bdecf8fbbd0b5a96 | R | 13,851 | 380 | # Overview ---------------------------------------------------------------
# This script sets the stage (library/func/data/conventions/etc) for plotting.
# It loads processed data. To re-process, see "proc_*"
# proc order, uCT -> eyemap -> T4, ephys,
# "Fig_*" and "ED_fig_*" scripts carry out further analysis and pr... |
648109e00c896c740419fac054d168e6eb3149951eff307c9734a1273271085d | R | 13,903 | 388 | ---
title: "PBTA-ancestry demographic & clinical stats"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Ryan Corbett
date: 2023
params:
plot_ci: TRUE
---
This script generates demographic and clinical summary statistics tables in the PBTA ancestry cohort
```{r load packges}
library(data.table)... |
a1634f9323c35355a37da9def95923cdbcea9b2dfb2fd5acc6e317e24e1bd3b9 | R | 13,922 | 477 | # Created on Mon Sep 13 20:41:47 2021
# Name: glomerulus_ranking_scan_thresh.R
# Purpose:
# Author: Andrea Vaccari (avaccari@middlebury.edu)
#
# Generates:
# - ...
#
#
# Copyright (c) 2021 Andrea Vaccari
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Genera... |
2c9173e864cb2b7b31b0cc8bc06c5f6e52718bb99504abb33b286d72388b2011 | R | 13,937 | 388 |
```{r}
library (Seurat_Ctrl_YAP_D10_merged)
library(dplyr)
library(MetBrewer)
library(presto)
library(gplots)
library(RColorBrewer)
library(ggplot2)
library(simspec)
library(Seurat_Ctrl_YAP_D10_mergedWrappers)
library(tidyr)
library(patchwork)
```
```{r}
setwd("~/polybox/Jain_Gut_et_al_2023/Ctrl_YAP_scRNAseq_Day10/")... |
c5d5cf5e289afe6c897a8e9dc5af9631610e5d8807e00d256d9966a999835787 | R | 14,025 | 331 | #Example code for processing the differential expression results for each study
#Megan Hagenauer
#2026-07-23
#####################
library(gemma.R)
install.packages("tidyverse")
library(tidyverse)
install.packages("dplyr")
library (dplyr)
########################
str(differentials)
str(differentials[[1]])
#He... |
12e1658d79f78980f559e1aeb769ce4b8c447cb77dbfed5eaa618b0b2fa95d20 | R | 14,043 | 232 | #This code illustrates the analysis pipeline for running a meta-analysis using the effect sizes and sampling variances for each gene stored in the objects MetaAnalysis_FoldChanges and MetaAnalysis_SV
#Megan Hagenauer
#July 25 2024
##############
#Specifying the minimum amount of results necessary to run a meta-anlays... |
159add229e57b817470d135aa74b89326c5f761530851f28ea6e54d9e3fa0c23 | R | 14,097 | 330 | library(Seurat)
library(dplyr)
library(ggplot2)
library(tidyr)
library(gridExtra)
library(tidyverse)
#Load in Ascl1 data and visualise clusters ----
load(file = "1st_submission/seurat_objects/Ascl1_NSCs.RData")
DimPlot(final.integrated, split.by = "Genotype")
final.integrated$integrated_snn_res.0.6
DefaultAssay(final... |
e4aa5db807bd86d7cea33078b3861611481961392c7489f0b749bd3b6019cf7a | R | 14,100 | 418 | # --- function for table visualization
simple.DT <- function(df, title = NULL, pagelen = 15) {
tblno <<- tblno + 1
if (!is.null(title)) {
title <- glue("Table {tblno}. {title}")
} else {
title <- glue("Table {tblno}.")
}
num.colnames <- names(which(sapply(df, class) == "numeric"))
num.idx <- which(c... |
44ac6137d765d605c3e9d03300d11cf98b99f22c1e2064bca46e64ca7fb1bf87 | R | 14,107 | 300 | library(tidyverse)
library(plyr)
library(arrow)
library(janitor)
data_root <- "/home/mica/storage/healthspan/v6.2"
trait_path <- file.path(data_root, "data/make_trait_data.rda")
load(file=trait_path)
# Convert back to factors
records_demog_traits$sex <- as.vector(mapvalues(records_demog_traits$sex, to = sex_from, fr... |
418228f855fab22f93398e0b246b2e97b54e9b75f543c48c44c68116369a538b | R | 14,109 | 262 | ###################################################
### DESeq2_GLM parameters: to be modified by the user
###################################################
rm(list=ls()) # remove all the objects of the R session
workspace <- "." # workspace f... |
182231274d5c7a2156a879325556ac40e93e946c39c39473a3c40ad2ae439ce8 | R | 14,204 | 305 | library(dplyr)
library(readxl)
library(ggplot2)
library(ggrepel)
library(enrichplot)
library(clusterProfiler)
library(org.Mm.eg.db)
setwd("")
# Figure_6c, heat map of Sig. PM proteins for 14 cell types
{
rm(list=ls())
Obj.list = readRDS(file = "ct_dataset_01.rds")
pm.df = Obj.list$GO_mouse_pm %>% filter(l... |
06de4323cfbef5658f9e1f71f47739c78362626c3c6c448df7c4eb55a7ed800d | R | 14,247 | 416 | ---
title: "Compare read and molecule counts per batch"
date: 2015-08-18
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
opts_chunk$set(cache = TRUE)
```
Comparing the conversion of reads to mo... |
dca7d74727e5a7baa2c63ba42e0191ae5983eaadd7b2e10efd0956115f65c675 | R | 14,339 | 420 |
###########################################################
##################### convert distances #################
###########################################################
# scale a distance matrix between 0 and 1
# by default the max value (1) is given for distances lower than 3A
# and the min value (0) is g... |
125dd80ab6b5139f7b4cca5c16b2577bcd2116590d9c40915f9a51f5047d0bac | R | 14,344 | 390 |
```{r}
library(Seurat)
library(dplyr)
library(ggplot2)
library(usethis)
library(devtools)
library(harmony)
library(patchwork)
library(ggplot2)
library(gridExtra)
library(jcolors)
library(MetBrewer)
```
```{r}
setwd("/Users/jainak/polybox/Jain_Gut_et_al_2023/2.Matrix_perturbation_scRNAseq_Day13")
seurat_Day13_matrix... |
e608ce7c174e8770e2486f75f08e77a50dacf8281dc739b75f0bb69f3e4951fe | R | 14,348 | 317 | #Script_01 - read in and analyse Huwe1 data----
#four iterations of normalisation and clutering
#1 - all data, all clusters
#2 - neurogenic lineage
#3 - NSCs
#4 - quiescent NSCs
library(Seurat)
library(tidyverse)
library(gdata)
library(slingshot)
library(RColorBrewer)
library(sctransform)
library(glmGamPoi)
set.seed(1... |
a2e9bd7f1a6c7afc7b56e1745988eb807b3663f191a5201adb17c117710b35b9 | R | 14,358 | 301 | ---
title: "Shrunk linear transformation"
date: 2015-10-20
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
opts_chunk$set(fig.width = 8, fig.height = 8)
```
```{r packages, message=FALSE}
libra... |
d5dc34997509f5523eaa3c350826701fb66d78435dced26e33a156b4e66d4054 | R | 14,368 | 322 |
##################################################
#SQL tables to start
library(stats)
library(WGCNA)
library(ggpubr)
library(reshape2)
allowWGCNAThreads()
load('mouse.RData')
######################################
#Mingqi These scripts are just reproducing the adipoQ file that you have so ignore as these ... |
0dff71f9f9dcd3424e0e764d0be048b1bc994367bc4da4c54d5fab6aeab2cb66 | R | 14,416 | 407 | #' Join a sound classification file into trial_results tibble
#'
#' This function reads a sound classification file with column
#' `mic.wav_location_0` (potentially pointing to a different study path than the
#' trial_results) and joins it. It then parses the `sound_cat` column and parses
#' the classification to ad... |
d2ff5e2708106d2cba67550cca2f78ac334aaff15b03699798676bfc0a166565 | R | 14,515 | 380 | rm(list=ls())
args <- commandArgs(TRUE)
DATATAG <- args[1] # "ChineseData_Global_TotalGM"
IndexTag <- args[2] # TotalGM
dataPath <- args[3]
FFlag <- args[4]
DATA.TAG <- DATATAG
Datadir <- paste0(dataPath, "/", DATA.TAG, ".csv")
if (FFlag == "Global" || FFlag == "Sub") {
ZZScore <- 10000
} else if (FFlag == "DK68_G... |
89a038997bb16b573e0428a2dd61a8bbaf4e0cd4f798c79df2250c7e65e08f9b | R | 14,517 | 384 | # R Corbett 2023
#
# Generate summary statistics for PBTA ancestry project
# load libraries and set directories
library(data.table)
library(tidyverse)
library(ComplexHeatmap)
library(RColorBrewer)
library(circlize)
library(colorblindr)
library(ggpubr)
library(cowplot)
root_dir <- rprojroot::find_root(rprojroot::has_d... |
d7225f33fd4027c51cc13d823560fae2d1c3c384c4b8b7aecf74e0b32676427c | R | 14,585 | 331 | my_netVisual_chord <- function(net.diff, edge.transparency = FALSE, signaling.name = NULL, color.use = NULL, thresh = 0.05, vertex.receiver = NULL, sources.use = NULL, targets.use = NULL, idents.use = NULL, top = 1, remove.isolate = FALSE,
vertex.weight = 1, vertex.weight.max = NULL, ver... |
3ed27cbe0da319f7e5438cd1699d585d7442ebab513df268152b0d7a4d2d1713 | R | 14,601 | 418 | ---
title: "Per gene individual differences in CV and mean"
author: "Joyce Hsiao"
date: 2015-10-23
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
library(knitr)
opts_chunk$set(message = FALSE,... |
fdd5f008bb36c2fb59a349519c1bca72dc8e7231076b63b8d556ef12e127dfec | R | 14,611 | 391 | long_model_report_stats <- function(meas, hem, trk_sz, dir_in, regions,
beh_names, covariates, covariates_interaction, stats_sum){
# reports stats for dev_struct_dwi analysis
# clarify covariates
if (is.null(covariates_interaction) == 1){
all_covs <- covariates
} else {
... |
1f34295e2826900aa38df35337d38aaf193b72f7a67ee6761f659710a984e2e8 | R | 14,630 | 411 | library(tidyverse)
library(magrittr)
library(neuprintr)
library(igraph)
library(ggplot2)
library(ggpubr)
library(plotly)
# library(scran)
library(factoextra)
library(RColorBrewer)
library(gplots)
library(cluster)
library(philentropy)
library(dendextend)
library(colorspace)
library(reshape2)
library(scales)
library(Venn... |
adf38f3d1a6912a681756410604661ef274ea3e877f5fd6d0ec487b00f1fc57c | R | 14,695 | 284 | # R script
#
# Tutorial 1 - Surface Visualization
# micapipe v0.1.1
# R version 3.6.3
#
# Created by RRC on September 2021 (the second year of the pademic)
# ------------------------------------------------------------------------ #
#### Set the environment ####
require('RColorBrewer') # version 1.1-2
require... |
1f604190666cf5c86b34f39432819ef1500643dea401ea4eb330ee47269f71f5 | R | 14,740 | 352 | ---
title: "stemness pluripotency"
author: "Po-Yuan Tung"
date: 2015-07-10
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
Current model of reprogramming suggests that pluripotency occurs i... |
2bc3ce14d59d34368d50d324a9e2263e6da5222f45b1aad65626954bcb7c4bb1 | R | 14,746 | 277 | ##########################################
### VAAST: descriptive statistics of the behavioral outcomes
#######################
rm(list=ls())
# libraries
library(lmerTest)
library(lme4)
library(tidyr)
library(psych)
library(MuMIn)
library(ggplot2)
library(readxl)
library(plyr)
library(effects)
###### insert the neede... |
d207b666aa8aaa1ab0497f70ede9df3a718576c5d137b5c0ab25c75c801c5758 | R | 14,903 | 498 | ---
title: "Run `dndscv`"
author: "DCI Bioinformatics"
date: '`r format(Sys.Date(), "%B %d, %Y")`'
output:
html_document:
highlight: pygments
code_folding: hide
toc: true
toc_float:
collapsed: true
toc_depth: 4
number_sections: true
---
```{css, echo=FALSE}
.watch-out {
background-col... |
4d5b372649c0950da4238a5eec141383d5b1230b41fbf5ac67fe38bfa9e27d5b | R | 14,968 | 421 | ---
title: "Cluster samples using transcript compatibility counts from kallisto"
date: 2016-03-26
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
```{r packages, message=FALSE}
library("ggp... |
bb1015bc2584452fec28b83db8e12d9b706c44186ea74ec4c6b8fd288a43e364 | R | 14,995 | 460 |
#' Find Hierarchy Object
#'
#' Search an object hierarchy for an object by name. This is useful for searching for a specific object in a saved scenario `.json` file.
#'
#' @param x The object hierarchy to search. This is typically a `list` loaded from a scenario `.json` file.
#' @param name The object name to search f... |
4cedf89c2d05db7f39a352a68629ed6e81fcff0438ba737f079b9e6258e4dedf | R | 15,010 | 319 | ## Differential Expression with Sex*Genotype Interaction Analysis ##
library(Seurat) # Seurat_4.3.0 # SeuratObject_4.1.4
library(openxlsx) # openxlsx_4.2.5.2
library(ggplot2)# ggplot2_3.5.1
library(edgeR) # edgeR_4.2.0
library(limma) # limma_3.60.3
library(scran) # scran_1.32.0
library(readxl) # readxl_1.4.3
library(S... |
30274ea1926493c7a3100a107f4da5d3b9e9f3d8ba319b2600b995f00fad6e0c | R | 15,111 | 472 | #' Install Required Dependencies
#'
#' This function checks for and installs required Bioconductor packages for the package,
#' and any command-line tools needed, e.g. plink, bcftools etc.
#' Currently, it ensures that `biomaRt` is installed, using `BiocManager`.
#'
#' @details The function first checks if `BiocManager... |
bea8881298e080341dac3ae2f47a342a59421ce0c1a9c317c494e813d17ba958 | R | 15,112 | 454 | ---
title: "Proportion of genes detected after filtering"
date: 2016-02-05
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
opts_chunk$set(cache = TRUE, fig.width = 8, fig.height = 8)
```
```{r ... |
ef2c8dcb344e4d02d1078a8b6be126cf47069b7307958433b4034ef8ed3070af | R | 15,138 | 471 | #!/usr/bin/env R
# Author: Sean Maden
#
# Run this script from: ./deconvo_method-paper/cohort1/
#
# Makes an object of type MultiAssayExperiment containing experiment data organizead on sample ID
# (BrNum + Position). Data types in the MultiAssayExperiment:
#
# * snRNAseq
#
# * bulk RNAseq
#
# * RNAscope image proces... |
decb940cfa112957c4bba8094fc83e6dc186be8417d6e178db0dfeed7948d978 | R | 15,201 | 357 |
#_____________________ For mouse objects _________________________
#' Detect atlas regions that only show up in a single slice object within a mouse.
#' @description Quality check function to make sure that the regions included for analysis show up
#' in more than 1 slice object, otherwise the user can remove exceptio... |
9c0c40e9bdf354c4cfc3e027e13c60d9f7c711febe9beb8f49855453025fcedb | R | 15,322 | 454 | #' Simulate genotypes for genetic association studies
#'
#' This script simulated unnasociated genotypes only. It will draw minor allele frequency for
#' SNPs uniformly from maf_range.
#'
#' @param n number of individuals
#' @param p number of SNPs
#' @param maf_range range of minor allele frequencies
#'
#' @return A n... |
c88c22241baa3af6526697a80499806d4bc08e3a8fba19b9f0c4ff3e43e28929 | R | 15,461 | 438 | ---
title: "Cross-validation to test varKoder against NN alternatives"
output: html_notebook
---
In this notebook we compare the performance of:
1. Image representation of kmer frequencies:
1.1. varKodes
1.2. Raw chaos game representation (CGR) (produced with code from [idelucs](https://github.com/Kari-Genomic... |
1883a24128ce2b4e893621ddf03eb6cf3ab47fb5379d1abb3133a7d2b4ddebc7 | R | 15,587 | 283 | fastman <- function(m, chr = "CHR", bp = "BP", p = "P", snp, chrlabs, speedup=TRUE, logp = TRUE, col="matlab", maxP, sortchr=TRUE, bybp=FALSE, chrsubset, bprange,
highlight, annotateHighlight=FALSE, annotatePval, annotateTop=TRUE, annotationWinMb, annotateN, annotationCol, annotationAngle=45... |
962c8b7730797e90b161839de74af8f3d69d37f7b4041dd6774d201b4609daf1 | R | 15,612 | 358 | options(stringsAsFactors=F)
#' Run single variant score tests with SPA based on the logistic mixed model.
#'
#' @param dosageFile character. Path to dosage file. Each line contains dosages for a marker to be tested
#' @param dosageFileNrowSkip integer(>=0). Number of lines to be skiped in the dosage file.
#' @param dos... |
a7f593caeefc98eff44a0ba082fd458824679258fcec17d46449c99a40a976a9 | R | 15,639 | 382 | setwd("/Users/silaskoemen/Library/CloudStorage/OneDrive-ImperialCollegeLondon/Imperial/NowcastPNN/")
library(cmdstanr)
#install_cmdstan(overwrite=TRUE)
library(epinowcast)
enw_set_cache(tools::R_user_dir(package = "epinowcast", "cache"), type = c('session', 'persistent'))
library(data.table)
library(ggplot2)
library(d... |
39135be839e3eb0f792dd8c8c9fbc7de6c8561a953c1cbbc364a5a46ea9ee6c2 | R | 15,672 | 217 | ###EVE experiment with only adults in analysis
###Here just taking our transcripts and converting them to gene level expression
###purpose is to look for evolutionary shift in expression in shrew lineague
###Using a regrowth adult brain regions (Stage4)
###Some of this is copied over from mini_eve.R
###Updating and cl... |
f6b0fdb47cb786a181a094118d0b40fe279c1e95c7459883046732fc4f3668f4 | R | 15,729 | 379 | ---
title: "variance"
author: "PoYuan Tung"
date: 2015-06-15
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
## Input
```{r packages, message=FALSE}
library("dplyr")
library("ggplot2")
the... |
8813ff4f560e9e86c4f3a67caae4b66d09865d865750d762acfd2c9a4746f8b1 | R | 15,744 | 681 | # scCellNet
# (C) Patrick Cahan 2012-2017
# commonly used or misc functions
#' @export
ctMerge<-function(sampTab, annCol, ctVect, newName){
oldann<-as.vector(sampTab[,annCol])
newann<-oldann
for(oldName in ctVect){
xi<-which(oldann==oldName)
newann[xi]<-newName
}
xnot<-which(colnames(sampTab)!=annCo... |
7b415759ba84e6e9a317566b2d243d184b5c167cf47ef6701288e2b3259e4000 | R | 15,751 | 339 | #code for sup figure 5
#load useful libraries
library(nlme)
library(multcomp)
library(ggplot2)
library(tidyverse)
library(cowplot)
library(REdaS)
library(patchwork)
#Evolution of offset precision
precision_evo_data_bar_trial <- read.csv("C:/Users/mbasn/Dropbox/Manuscript-Basnak/Nat Neurosci Aug 2024 revis... |
37e2044d6ade19141e8b298a05282baaa39b1fc9ddb4f6418c8b9f2a48264056 | R | 15,755 | 393 | ---
title: "Tracking down bug in reads to molecules conversion - Attempt 01"
author: "John Blischak"
date: 2015-02-18
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
opts_chunk$set(cache = TRUE)... |
a772ef1886b53c5f7144b28a8eff4de89e6fd22a5365657dd10330d251513801 | R | 15,937 | 432 | ---
title: "Beta"
author: "SRomano"
output: html_document
editor_options:
chunk_output_type: console
---
# Load packages
```{r setup}
list.of.packages <- c("dplyr", "vegan", "ggplot2", "RColorBrewer", "cowplot")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(n... |
1c4b2b3b3217628208ab0e58272cbcb64f6f1bb2c7de06e144cbafd11e733190 | R | 15,939 | 488 | clean_memory <- function(n=10) {
for (i in 1:n) gc()
}
#' Convert GO terms to gene names.
#'
#' This function download or load Genes/GO terms association maps from BioMart.
#' @name genes_from_GOterms
#' @param go_ids a character vector containing the GO terms to convert. Each term must be written with the 'GO:' p... |
909f83619223d8360c4e125308ffe10ae9ada8c533b2b697f3d4e7c634bbb223 | R | 15,958 | 330 | # creates final plots for the PRS GXE project
# grab command line arguments
args = commandArgs(trailingOnly = TRUE)
print("Arguments received:")
print(args)
if(length(args) < 2) {stop("not enough Arguments received")}
baseLoc = args[1]
outputLoc= args[2]
plotName= args[3]
# Debug vars
# baseLoc = "C:/0LocalHPC/PR... |
55c0af9c5dfdc1d82e1c092dd394cb9989b0a598ea1ec9c508f913a3b5a77045 | R | 15,967 | 475 | ---
title: "Sex_Age"
output: html_document
editor_options:
chunk_output_type: console
---
Download metadata from here:
https://zenodo.org/records/7183678
https://zenodo.org/records/7246185
# Load packages
```{r}
library("readxl")
library(tidyverse)
```
## Wallen
```{r}
m.w <- read_excel("Source_Data_24Oct2022_Wal... |
2a07935e8e016aca6201cd33d2570a38f5cb63e1c6af52a0b5a2b51e4efc8185 | R | 15,998 | 443 |
#Conflict experiment
# 1. Transform and explore data
# 2. Models for the conflict experiment
# 3. Model simplification and comparison
# 4. Differences from 50% for conflict for each species
# 5. Differences in the number of feeding attempts
# 6. Plots
library(plyr)
library(dplyr)
library(sqldf)
libra... |
ae9645cbac29c53249af012f1508343f8a3a4c884e939e72acb3c4397a808a53 | R | 16,008 | 280 |
# Sort data by time
df <-rvn.sel %>% dplyr::select(m_subject, pnd, wks, treatment, time, call.other)%>%
dplyr::filter(!(wks%in% 7))%>%
#dplyr::filter(wks==2& treatment %in% "cingulotomy")%>%
rename(event=call.other,
week =wks)%>%
arrange(time)
# Create a new column for the next event
df <-... |
f2a74d26fd2f0c3446d72c74fc139c1f0c71beee1093d46493416bb1e5ee8ffc | R | 16,035 | 294 | library(tidyverse)
library(plyr)
library(arrow)
library(survival)
library(broom)
data_root <- "/home/mica/storage/healthspan/v6.2"
fmodel <- "nn_demog_bb_bbc_sbc_blood_5e-05_1e-05_0.0_256_0_None"
print(fmodel)
for (adjust_name in c("basicplus", "full")) {
for (quartiles_suff in c("q", "h", "continuous")) {
p... |
e1f534de1960b25f00b4366054edd00c935cb5bcbb676c2bf2672756bfe92ab9 | R | 16,037 | 331 | ################
#Adapting the old meta-analysis code for our new objects:
#8) Run a meta-analysis using all of the effect sizes for each gene that has data from at least 2 studies.
#We can only run a meta-analysis if there are differential expression results from more than one comparison.
#Since I know that the... |
3783102962d0680cbd2d1ba367e6fbe1a139f83b8243d1fb5b0d561fccbcc912 | R | 16,063 | 334 | ---
title: "Cell-Cycle Analysis"
author: "Po-Yuan Tung"
date: 2015-07-06
---
**Last updated:** `r Sys.Date()`
**Code version:** `r system("git log -1 --format='%H'", intern = TRUE)`
```{r chunk-options, include=FALSE}
source("chunk-options.R")
```
Carry out cell cycle analysis of single cell iPSCs using the method ... |
bff28564ae3c692399f41e76d8e7d580ed95167ec4e5bd9765da4efe589549ed | R | 16,087 | 456 | #' Create threat name column from episode name
#'
#' Creates "threat" column, parsed from episode name. Expects column called
#' `episode`
#' For finding Unity's internal threat name, see "find_unity_threat_name"
#'
#' @param df A trial results data frame.
#'
#' @return The data frame with the new column added.
#' @exp... |
35c0d8d48a67ea6bd11237464f01a6e87f13146e07baef7ad863ec1e8795df6d | R | 16,098 | 504 | # map lens to medulla to LOP
# eyemap = [Mi1 rownames, ucl_rot rownames]
library(natverse)
library(tidyverse)
library(RColorBrewer)
library(np) # kernel regression to find the base pt on the eye
library(alphahull)
library(deldir)# for smoothing uCT data
library(sp) #in.poly
# clean everythign up.
rm(list=ls())
#clos... |
c560740fdf7acee71d3e92a2a846586e389be265530d547b2339da14b21adde4 | R | 16,120 | 226 |
#Note: This code file assumes that you have already read in the functions in the "Example_MetaAnalysis_GemmaOutput_StreamlinedReadingInAStudy.R"
#.... but I also discovered a bug in that file that was making one of the FilteringDEResults_GoodAnnotation function choke on datasets that didn't include pipes (|) in their ... |
2390001d67e9d39e9ac500ac7cb19fc0c0345f5cb11a07c1d29521ea868c3c06 | R | 16,124 | 398 | ---
title: "Anatomical_variation"
output: html_document
date: "2023-05-16"
---
```{r read in data and organize into one big marix DKA }
library(ggplot2)
library(dplyr)
library(BayesFactor)
library(ggseg)
library(ggsegDesterieux)
library(colorspace)
cbbPalette= c("#4f89e0", "#f5ec6c",'#156605',"#76D7C4","#268236", '#4... |
71c37e48f902f97cdc6f0262f2bbc2d8de8dd3511b311746ab12e30ef7e56dbc | R | 16,191 | 440 | ---
title: "Ribosome Stalling"
author: "Di Fraia"
date: "2023-02-09"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
export <- c()
```
## Set theme
```{r}
paper_theme <- theme(strip.text = element_text(colour = 'black',size = 12),
strip.background =eleme... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.