sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
68fc7ea15a6a95417f7d835f656078ec68142c23ae00d31e15e258878d1d1b37 | R | 8,485 | 277 | #' Baujat plot to explore heterogeneity in meta-analysis
#'
#' @description
#' Draw a Baujat plot to explore heterogeneity in meta-analysis.
#'
#' @aliases baujat baujat.meta
#'
#' @param x An object of class \code{meta}.
#' @param yscale Scaling factor for values on y-axis.
#' @param xlim The x limits (min,max) of ... |
93e58ff3179e4f9f828809c2b12972241638e602d9036b6eb800758707f4385e | R | 8,491 | 199 | ####Heatmap creation
#### Coded: Benjamin Saef
#### Date as of commenting and documentation - 05/28/2024
load("/FNIH_Project_2/Current_Analysis_data.rdata")
library(Hmisc)
library(reshape2)
out_project <- "/FNIH_Project_2/Paper1/Spearman_Analysis" #Folder where you want all output written to, a results and plot folde... |
2417c73d401e04ba7b4f27aa4d11c981cc6a36dbf4e98b22854bee5cb2d9dc10 | R | 8,492 | 155 | ## Run it with R version 4.0.3 and biomaRt v2.45.9.
## Otherwise the getBM function does not work.
## Run gene-ontology enrichments on variants within
## HGEs that also impact brain structure
## mapping to genes using PsychENCODE eQTL
options(stringsAsFactors=FALSE)
library(GenomicRanges)
library(biomaRt)
#library(An... |
4be7b87f665bb1207a94ec4b99886e6321b8e19ad3cf9447212436449c2b6518 | R | 8,557 | 247 | ###################### ANALYSES CODE STARTS HERE #########################
require( geomorph )
require( ape )
require( geiger )
require( abind )
require( RColorBrewer )
require( cluster )
require( matlib )
require( ggtree )
require( rlang )
require( cowplot )
require( tidytree )
require( dplyr )
require( g... |
a12d6ba9e01ce6a8c72f56b6c8bf4696c731c547126d89fdd4f6e663252ed8f5 | R | 8,572 | 226 | #!/usr/bin/Rscript
# Clear workspace
rm(list = ls())
# Load libraries
if(!require(NBR)) install.packages("NBR"); library(NBR)
source("https://raw.githubusercontent.com/zchuri/BilingualBrainNet/main/Code/AuxFunctions/valid_url.R")
# Read phenotypic data
info <- read.csv("https://raw.githubusercontent.com/zchuri/Bilin... |
c733f2506bbd36e2a769a57b7295ad220b77e542f2a5657520e6c9d46d7eadb5 | R | 8,578 | 166 |
###Script 22
#Syngo analysis
library(readxl)
library(dplyr)
library(ComplexHeatmap)
library(RColorBrewer)
library(viridis)
#Get de genes
de.res <- read.csv("output/DE_plots/Cleaned_MAST_neuronal_all_genes.csv") %>% filter(FDR < 0.1)
cell_sets <- c("2.L6.CT.CTX.Glut", "16.L6.CT.CTX.Glut", "37.L6b.CTX.Glut... |
7b634355df4577918d80e824e6f1137b4c49446c4d4c093b18b96d996d87ebc5 | R | 8,580 | 153 | #' phenoscanner
#'
#' phenoscanner queries the PhenoScanner database of genotype-phenotype associations from inside R.
#' @param snpquery a vector of SNPs.
#' @param regionquery a vector of genomic regions.
#' @param genequery a vector of gene names.
#' @param catalogue the catalogue to be searched (options: None, GWAS... |
3822ba54c6c19e90957a61d158cba173015b1d2fe487cc3dcc0fddcf077644a4 | R | 8,584 | 294 |
#Use system.file("extdata", "2010.csv", package = "testdat", mustWork = TRUE)
#' Title
#'
#' @param genes
#'
#' @return
#' @export
#'
#' @examples
fromAny2Ensembl = function(genes){
if(substr(genes[1],1,1) == "X"){
return(fromGeneName2Ensembl(fromXtIDToGeneSymbols19K(genes)))
}else if(substr(genes[1],1,4) != ... |
58bfa059cddb0e6f5b531355b2d160202616554abc17651dc62eff06dc8741da | R | 8,589 | 168 | #----Figure_04 K------------------------------------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure 04 Panel K for the connectivity analysis for
# Reinhard and Fukuda et al. 2024
# The first run might take long as all synapses... |
c57496daab16f4f49c7e6fb9eee6d1292c730370c1e08b6ae1ff907f4e1cdd1c | R | 8,600 | 248 | ---
title: "Roche_Analysis_Diaz_Yohimbine"
author: "Lukas von Ziegler"
date: '2024-02-08'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Analysis of Clustering Results of Yohimbine and Diazepam Experiments at Roche
```{r, message=FALSE, warning = FALSE}
s... |
368c047e25cefef13d7d71820ab6d463ad4845e89182b24875d488f477bc8ea7 | R | 8,612 | 200 | # EEG Power LMM analysis
# this script does an LMM analysis of the effects of arousal and movement on the
# ROI EEG spectral power in the classical frequency bands (delta, theta, alpha, beta, gamma)
# 2024 by Antonin Fourcade
# load packages -----------------------------------------------------------
library(ggdist)... |
2034a1cbd1f5cd01b03f31046c18b84474543fb386dfd87d955ac03a42869624 | R | 8,635 | 273 | library(tidyverse)
library(janitor)
## Import datasets
nacc.raw <- read_csv('data/nacc.csv')
adni.raw <- read_tsv('data/adni.csv')
adprs.raw <- read_tsv('~/Downloads/results_newfam/out/score/out_pgs.txt.gz', guess_max = 60000) %>%
janitor::clean_names()
pcs <- read_tsv('~/Downloads/results_newfam/out/score/out_pops... |
66f9c6d852852d2d35f32edc3dccd9b551a639dc78680decc594e14072ff40aa | R | 8,651 | 206 | # ECG LMM analysis
# this script does an LMM analysis of the effects of arousal and movement on the
# ECG features (IBI, LF-HRV, HF-HRV)
# 2024 by Antonin Fourcade
# load packages -----------------------------------------------------------
library(ggdist)
library(gghalves)
library(raincloudplots)
library(lme4)
libra... |
30e32a01737407dc8bbdd6aad9b1ab5fb9993740f4d84769b27dc306e4445432 | R | 8,655 | 177 | library(dplyr)
library(tidyr)
library(stringr)
library(ComplexHeatmap)
library(ggplot2)
library(tibble)
library(reshape2)
library(openxlsx)
library(ggpubr)
library(gridExtra)
library(cowplot)
library(ggprism)
MD <- read.csv('Spots_metadata.csv', stringsAsFactors=FALSE)
MD$Sample2 <- paste(MD$Patient,MD$Line, MD$Mouse... |
594c26c7c1f9e2dbab261b2015cdde2790744599535526803aac082e32fa8209 | R | 8,666 | 182 | library(dplyr)
library(ggplot2)
library(ggrastr)
library(patchwork)
##########################
###Gene expression full###
##########################
dt.expr <- lapply(Sys.glob("raw data/*"), function(i) {
res <- read.csv(i, row.names = 1)
return(res)
})
dt.expr <- do.call(rbind, dt.expr)
pdf("output... |
2b609517adde8e5664a772041b9219e06851326c8c20b3de03d0cc7f9a8b0f77 | R | 8,682 | 256 | lat_esq<-rep("ESQ",100)
lat_dir<-rep("DIR",100)
mov_rep<-rep("REP",100)
mov_ped<-rep("PED",100)
olho_oa<-rep("OA",100)
olho_of<-rep("OF",100)
pos_c<-rep("C",100)
pos_f<-rep("F",100)
pos_p<-rep("P",100)
pos_o<-rep("O",100)
idd<-c("I1","I2","I3","I4","I5","I6","I7","I8","I12","I13","I14","I15","I17","I18","I20","I21","I2... |
82ef8de49bf80b27c8430a6003c12931f7e0eb1ffecb7a3f34a659661cce4f71 | R | 8,703 | 207 | ---
title: "Simulations for Causal Batch/Group Effects"
author: "Eric W. Bridgeford"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{cb.simulations}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
col... |
9e782929117533920ced817adc47118fd3e1995e6103f6a3e5694236dbe709f8 | R | 8,705 | 160 |
#' mochims__plot_validation_scatter
#'
#' Plot correlation with validation data.
#'
#' @param input_dt data.table with model free energy estimates (required)
#' @param lit_inpath path to literature free energies (required)
#' @param report_outpath output path for scatterplots (required)
#' @param highlight_colour colo... |
efd5e65559fe5581bb17dcf3593d851953160018c8ca4d9c32383b9589149fb7 | R | 8,707 | 252 | ---
title: "Sample loading and quality control"
output:
html_document:
df_print: paged
---
### Loading Samples and set up
Loading libraries
Note: please make sure to use both Seurat v4.1.1 and SeuratObject v4.1.0 to reproduce this analysis,
as later versions of either packages change the UMAP at the RunUMAP st... |
d5549cce0c226b65802c420f5704d536bb2394d72045113601fe896a0d619644 | R | 8,725 | 237 | # Auteur : Rihab AZMANI
# script Azim data
setwd("/home/orlab/Desktop/Rihab/Dataset Azim et al") # pathway of dataset
if (!requireNamespace("BiocManager"))
install.packages("BiocManager")
BiocManager::install()
# install.packages('class', dependencies=TRUE)
# install.packages('codetools', dependencies=TR... |
047c9f783225ddf379f3a368a8f457488cc1b4353ca64b7877e1eba2b8283a2c | R | 8,731 | 208 | ---
title: "axon_AP"
author: "Franz Xaver Mittermaier"
date: "2023-06-21"
output: html_document
---
This script plots the panels for the axonal AP shape changes in response to different subthreshold modulation paradigms.In brief, I conducted paired somato-axonal patch-clamp recordings. I then used somatic curre... |
700c8fec142da24f0a7eddae854bad155248afbf1968fea8206494c286bc62b9 | R | 8,736 | 283 | # ================================================================
# Visualize Feature score distributions by Fribble
# Session 2 only + feature-level sex differences
# ================================================================
library(tidyverse)
# ---------------------------------------------------------------... |
e745fc2c2c460fe81d925264e8d701bd115329083053f19b38392733261499f1 | R | 8,740 | 166 | #----Figure_04_J----------------------------------------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure 04 Panel J for the connectivity analysis for
# Reinhard and Fukuda et al. 2024
# The first run might take long as all syna... |
7508dedd270fa5684447e76c50aba8a233942dcf737c83fb5291e5aa3f49ad77 | R | 8,747 | 186 | #3g_Annotation_Pathway.R
rm(list=ls()); options(stringsAsFactors = F)
library(pSI); library(gProfileR); library(gplots); library(biomaRt); library(WGCNA); library(stringr); library(GENIE3)
load("Chinese-Signed-networkConstruction-auto.RData")
load("Chinese_human_brain_Adjust_Expr&Meta.rdata")
load("BrainGVEx_human_br... |
ab1ec5c9fe449f509dcc000ccf056fa85f4ca3323044e7f0d1dd92c533fbe4a6 | R | 8,749 | 212 | ---
title: "panel_dcg4"
author: "Franz Xaver Mittermaier"
date: "4 3 2022"
output: html_document
---
This script will plot the graphs for the DCG-IV experiments.
In brief, I performed paired patch-clamp recordings.I identified synapses that were reliable and therefore showed no sub-threshold modulation.
I the... |
35fe8dd8452042d42bfc9cb6bc7e03c7836865f9583247b84a852d4bf5a2b35b | R | 8,761 | 170 | #' Main neuroimaGene query
#'
#' Using a user supplied vector of genes (Ensembl ID's or HUGO names), this
#' function queries the NeuroimaGene resource for all statistically significant
#' GReX-NIDP associations and returns all findings as a data.table.
#' @param gene_list List of genes to work as inputs. There are no... |
8e5624c848eb53702c2676bd5fb7f8215b4968140c0b2213345a183d86ac44cf | R | 8,777 | 268 | library(circlize)
library(dendextend)
library(openxlsx)
library(stringr)
library(devtools)
library(ComplexHeatmap)
library(grid)
library(RColorBrewer)
library(dendextend)
library(dendsort)
### read data
axonF<-read.table("../data/Fig5/axon_feature.txt")
colnames(axonF)<-c('name','arbor_id','region','max_density','num_... |
c9723af655b572906444a54bd2713babda75ea389a2b81288805c26f9388c3dc | R | 8,787 | 196 |
#' mochims__get_model_results
#'
#' Get model results and coefficients.
#'
#' @param input_folder path to input folder with model results (required)
#' @param normalisation_file path to normalisation file (required)
#' @param RT constant (default:0.001987*(273+24))
#'
#' @return data.table with model results
#' @expor... |
88e53f7c37455bcbd777aa2c77a0e7947cf16e0ed21661225538928dd1cfb083 | R | 8,816 | 301 | ---
title: "Gene Set Enrichment (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
input.samples.path: "../../results/01_Filter_Samples"
input.variability.path: "../../results/03_Variability_Plots"
output.path: "../../results/07b_GO_cameraPR"
speci... |
131cd53985a7d83142b6bd25bf2c79d4ce79e665d08bfa7a734fcd839cdd2af5 | R | 8,820 | 197 | # --------------------------------------------------------------------------------- #
# #
# Hippocampal volumes in UK Biobank are associated with APOE only in older adults #
# ... |
8bb79477c36167aec8cb22601683a6fc2a916ff5b3d54b501abf33878b02fd36 | R | 8,842 | 345 | # Auxiliary functions to set arguments
#
# Package: meta
# Author: Guido Schwarzer <guido.schwarzer@@uniklinik-freiburg.de>
# License: GPL (>= 2)
#
chksetVar <- function(x, missing, replace, func, n = 0,
args = NULL, oldname, warn,
...) {
name <- deparse(substitute(x))
#... |
a96fbe98e300f2bb0ad7e47bdf63b3f896cce591bded49a51239fe353ee14392 | R | 8,854 | 158 | # docker run -ti --entrypoint /bin/bash -v /cis/home/ebridge2/Documents/research/graphstats_repos/causal_batch/:/causal_batch neurodata/cdcorr:0.0.1
# cd causal_batch/docs/causal_cdcorr_paper/Figure_reproduction/
require(tidyverse)
require(jsonlite)
require(np)
demo_key <- read_json("../data/abcd/demo_key.json")
site... |
4f4b055b5954626f1c7cffa3cbe5ea4984a4b3d2563bbdd7c4b6a707c45c5bf2 | R | 8,863 | 275 | ---
title: "ProteoMill Report"
date: "`r format(Sys.time(), '%a %d %b, %Y')`"
output: html_document
---
This report was automatically generated using the [ProteoMill](https://proteomill.com/) web tool.
```{r violin1, echo = FALSE, out.width = '60%', out.height= '40%'}
if("Data summary" %in% input$p2){
if(!is.null(... |
0b067192c3e1652659eb30b10270f3944946c1b685a8917e23dcdec2ac260694 | R | 8,878 | 305 | library(Seurat)
library(tidyverse)
library(Matrix.utils)
library(dplyr)
library(Matrix)
library(purrr)
library(tibble)
library(SingleCellExperiment)
library(apeglm)
library(DESeq2)
library(DEGreport)
library(magrittr)
library(sva)
#to be ran after updated SeqSeek Pipeline. With updated 'query.rds' object... |
b94ddf5fd0f25ceec20407160aa73222e8ed370e88f3074756ad4b8e6b390076 | R | 8,884 | 272 | lat_esq<-rep("ESQ",100)
lat_dir<-rep("DIR",100)
mov_rep<-rep("REP",100)
mov_ped<-rep("PED",100)
olho_oa<-rep("OA",100)
olho_of<-rep("OF",100)
pos_c<-rep("C",100)
pos_f<-rep("F",100)
pos_p<-rep("P",100)
pos_o<-rep("O",100)
idd<-c("I1","I2","I3","I4","I5","I6","I7","I8","I12","I13","I14","I15","I17","I18","I20","I21","I2... |
6efe205b2c0f3175122ff097aa498f9f42a7192a74179d6689e0c876e058b83f | R | 8,888 | 220 | #!/usr/bin/env Rscript
args<-commandArgs(TRUE)
main_dir="/local1/work/ginkgo/scripts"
genome <- args[[1]]
user_dir <- args[[2]]
status <- args[[3]]
bm <- args[[4]]
cm <- args[[5]]
dm <- args[[6]]
f <- as.numeric(args[[7]])
facs <- args[[8]]
sex <- as.numeric(args[[9]])
library('ctc')
library(gplots)
library(plyr)
... |
acd2a5cb785b95ca79b6e41f56f16c6494b923194b69ee1df743288667b0d519 | R | 8,892 | 290 | #' Highlights and test the time-course of effects through crossvalidation
#'
#' This function is meant to implement, roughly and with no assurance of full compatibility
#' the procedure proposed by Mathôt and Vilotijević (2022, *Behavior Research Methods*).
#' First, each trial (i.e., one complete time series) is assig... |
c09983cac3346724f43ae77c99c0ed5ea5f882df2f6db2c19f8ff745f7456904 | R | 8,892 | 165 |
#' mochims__plot_additive_trait_2state
#'
#' Plot additive trait for 2-state model.
#'
#' @param mochi_outpath path to MoCHI thermo model fit results (required)
#' @param input_dt data.table with model free energy estimates (required)
#' @param RT constant (default:0.001987*(273+24))
#' @param trait_name additive trai... |
24fc94da6aef7f76d3cc782d797eb1c2dba9744556a434bda0bec3fcd8ac548f | R | 8,898 | 305 | ---
title: "GO Enrichment (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
input.samples.rds.path: "../../results/01_Filter_Samples"
input.variability.rds.path: "../../results/03_Variability_Plots"
output.path: "../../results/07_GO_Enrichment"
sp... |
5753eba2a9ee8aa8db407a7ccb1f72639781770653cbd4c4aedbaa453e04d990 | R | 8,915 | 217 | #' Description of summary measures available in R package \bold{meta}
#'
#' @description
#' Description of summary measures available in R package \bold{meta}
#'
#' @details
#' The following summary measures (argument \code{sm}) are recognised
#' in R package \bold{meta}.
#'
#' \subsection{Meta-analysis of binary out... |
9f1d0398926861c34c019434b3f78f615ff907ea0323b0c1d9e4b83941a8f334 | R | 8,922 | 215 | #' viewDist
#'
#' Visualise a mini-batch of image chips, masks, distance-to-boundary grids,
#' and the resulting edge-weight surface for a DataLoader that supplies distance grids.
#'
#' Plots four panels stacked vertically:
#' \enumerate{
#' \item RGB image chips arranged in a grid.
#' \item Corresponding class mas... |
ed390c13e2c638f749786e5ba47a279572cdba2f5b43ea1195a5014aa0eecdfe | R | 8,958 | 184 |
library(dplyr)
library(ggplot2)
library(ggrastr)
library(ggrepel)
#########################
###Grubman volcanoplot###
#########################
res <- read.csv("results/grubman_MAST_vulnerability_results.csv", row.names = 1) %>%
mutate(DE = case_when(FDR < 0.05 & abs(coef) > 0.25 ~ "DE",
... |
46e7730eb12a2b6054c19089643c5c9da873484cc43cc792f55e0b7a0e7b294e | R | 8,961 | 197 | ---
title: "Centering covariance matrices"
author: "Corson N. Areshenkoff"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Centering covariance matrices}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
library(spdm)
library(g... |
dbcd91cc1df16423727fdf77bd40f68d1aef7cac958a54e4dcf006e42403fba7 | R | 8,999 | 296 | ---
title: "Bimodality Test (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
input.samples.rds.path: "../../results/01_Filter_Samples"
input.variability.rds.path: "../../results/03_Variability_Plots"
output.rds.path: "../../results/05_Bimodality_Te... |
e085e70fbcfea722e04e6be00e7b694d7222be9df6e6885870db0d2fab5a4820 | R | 9,000 | 234 |
library(ggplot2)
library(dplyr)
library(tidyr)
library(faux)
# create perfectly correlated vectors with a given vector (i.e. sample corelation)
# Credits to:
# https://stats.stackexchange.com/questions/15011/generate-a-random-variable-with-a-defined-correlation-to-an-existing-variables
### SET UP ###
true_reliab... |
788f45b04192851d74fe9eedca8756d878c0c0f632083f7e07aec0f9b65e0019 | R | 9,012 | 149 | ---
title: "Supplementary Figure 4"
author: "Greg Duncan, Katie Emberley, and Jonathan Nelson"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: yes
toc_depth: 3
toc_float: true
number_sections: yes
theme: bootstrap
df_print: paged
code_folding: hide
highlight: p... |
37a853c1e493931f38f0573287039353af8eb39d616d2a5e5796c9e19885e77d | R | 9,056 | 189 | ---
title: "panel_region_disease"
author: "Franz Xaver Mittermaier"
date: "2023-09-28"
output: html_document
---
This script plots the panels for the figure that compares the subthreshold modulation effect across different brain regions and disease backgrounds.
These are the same experiments as in the "panel_d... |
98e29106a1b235dbcafb35fd0790070316069432051d89d173d33262f67c8a5f | R | 9,061 | 227 | # palettes for AI plot
# ressources ----
# https://www.datanovia.com/en/blog/top-r-color-palettes-to-know-for-great-data-visualization/
# bootstrap palette ----
## individual country palettes for data exploration ----
# transparent bootstrap value when <= 95 Ultra-fast bootstrap - to avoid overplotting
rgb(0, 0, 1,... |
4e0787ca077df580699ba6bdfc3613ad592f1cca9460baf9901fb264e923b0c3 | R | 9,074 | 206 | ---
title: "Figure 0 Sims V2"
output: html_document
date: "2023-10-21"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r setup, include=FALSE}
require(causalBatch)
require(tidyverse)
require(parallel)
require(dplyr)
source("../utilities/combat_gam.R")
source("../utilities/combat_return.R")... |
34d1f66678d9df513336f7b6f303b87cebaa2ee78d40cfbeaa690ba06d3ca398 | R | 9,085 | 313 | ### Frontend Modules ###
suppressPackageStartupMessages(library(RColorBrewer))
suppressPackageStartupMessages(library(plotly))
suppressPackageStartupMessages(library(shiny))
suppressPackageStartupMessages(library(igraph))
suppressPackageStartupMessages(library(dendextend))
suppressPackageStartupMessages(library(shinyda... |
13c5d10c7a221e9b7cb7693421f930b63e38751749cc1a6089b8be5fcd261015 | R | 9,109 | 263 | # create directories ------------------------------------------------------
#create output directory
dir.create('downstream_analysis/differential_expression')
outdir<-'downstream_analysis/differential_expression/'
indir<-'counts/'
# load libraries ----------------------------------------------------------
library(DE... |
ed0914d0114564711b1a6c74fdcbb9fd1fe753a004ad503483cb8ec1e4148558 | R | 9,156 | 292 | # library
library(zoo)
library(gplots)
library(stringr)
library(data.table)
library(optparse)
# Parse options
## Set up command line argument parsing
option_list = list(
make_option(c("--bamdir"), type="character", default=NULL, help="Directory containing BAM files", metavar="directory")
)
## Parse the command lin... |
42ee2e09ef24c418c73f3f102d815ecc2ef1a857c9ba1992891c9cbadf4d11d8 | R | 9,157 | 238 | ### OASIS-3 Retest case for Boney ###
# April 2024
library(dplyr)
library(stringr)
library(ggplot2)
OASIS3 <- read.csv("/Volumes/OneTouch/MRData/202301_MRIbones/OASIS3/OASIS3all.csv",
header=F)
#######sample selection##############
#Keep MR data
OASIS3_MR <- as.data.frame(str_subset(OASIS3$V1... |
7dbf9ab6803482d7ceddb078b7f29d6deac6e91f83a3a0e303d15db27df911fe | R | 9,158 | 193 | ---
title: "contig_assignment_by_correlation"
author: "Siyuan Feng"
date: "2/10/2021"
output:
pdf_document:
fig_width: 8
fig_height: 6
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load the dataset
```{r}
setwd("/Users/siyuansmac/bioinfo/temp")
df <- read.delim(file="mean_depth_... |
38e289ec945b1e42c9f92378b9c2a6c798e5f68b463dba967e62b7ad8f64af4c | R | 9,174 | 242 | # File: IC50_mcmc.R
# Author: Kelly Chang
# based on code by Jose Vicente
# Date: Oct 2017
# Version: 1.0
#
# Description: R script to perform Markov-chain Monte Carlo (MCMC)
# simulation for Hill equations modeling drug block of
# ionic currents. T... |
a76c849df3f222cc5f5de5892e2e88e1cb0d131b589f841e6f996a7d186af8f6 | R | 9,199 | 323 | # Copyright 2022 HYBRID Team INCIA, UMR5287, CNRS, Université de Bordeaux
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required b... |
50ab6ceb2c667b1977105069580285d5c556c6f12faf3136ad9d231b5cebf1ee | R | 9,204 | 181 | #Alicia Petrany, draft as of 5.4.2024
#This file contains main functions
#Install on machine with devtools::install()
#'@title DEGage
#'@description
#'Tests for pairwise differential expression between two count distributions
#'
#'@param counts A dataframe with cells as columns and genes as rows.
#'@param gro... |
9bdc88e61ecd6e72c450f66fc54eaf1520b07189310e8b2407e5b19cd753efec | R | 9,222 | 191 | #### Characteristics Table
#### Coded: Benjamin Saef
#### Date as of commenting and documentation - 05/28/2024
library(tidyr)
library(data.table)
library(RVAideMemoire)
library(pROC)
library(RColorBrewer)
library(MuMIn)
source("./Functions_for_Analysis.R")
##Set up project folders and
out_project <- "/FNIH_Project_... |
236b4089bec56ee371738f665b07a16f7b9d958132b90b59ba1ebfae02c4a044 | R | 9,232 | 203 | ---
title: "Test_exp"
output: html_document
---
```{r}
library(dplyr)
library(tidyverse)
library(cowplot)
library(ggpubr)
```
#Cell death frm three batches, WT2 (WT68)
```{r}
setwd("Z:/16-Our Papers/In Preparation/PD_Diabetes_Alise/Figures/FigureS2/originals/B,C")
data_LDH <- readr::read_csv("LDH_ass... |
5e1afcaa22382d40e4274df21c00694731dfa8de3454de1a33c83c80ea151d07 | R | 9,237 | 297 | ---
title: "TEBC faecal samples: shotgun taxonomic data exploration, cleaning and organisation"
author:
- "Kadi Vaher"
- "Exploring the metagenomic taxonomic data in the TEBC samples"
- "Making phyloseq objects of the species-level shotgun taxonomic data"
date: '`r Sys.Date()`'
output: html_document
---
```{r s... |
b5fa239cefb4dcaf8864a7289bcd02a81344bce3bb7267e2f4ca9a901ac3cd47 | R | 9,240 | 276 | #!/usr/bin/env Rscript
# ==============================================================================
# == From "Summary" Table, launch plot generation on selected cells
# ==============================================================================
# ---------------------------------------------------------------... |
247d41403597c118a90797f2cea40ebdbc84e8d5eec1bc17839e8c40950acf2c | R | 9,242 | 229 |
library(tidyverse)
library(dplyr)
headers <- read.table('/home/mgell/Work/abcd_pheno/phenotype/abcd_tbss01.txt', header = F, nrows = 1, as.is = T)
NIHTBX <- read.table('/home/mgell/Work/abcd_pheno/phenotype/abcd_tbss01.txt', skip = 2)
colnames(NIHTBX) <- headers
# behs = c('src_subject_id','eventname',
# '... |
b893a389ab7319a4894f51f34e2377e7c82ac151666527b2c1a63fb507af90a6 | R | 9,284 | 281 | ---
title: "Marker genes and Proportion"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
warning = FALSE,
message = FALSE
)
```
Load required packages
```{r}
require(Seurat)
require(data.table)
require(tidyverse)
require(circlize)
require(ComplexHeatmap)
require(ggp... |
847249df020e50b12be2f64a6a043129207f7968aca9d41b7707b7581c97f8b7 | R | 9,351 | 200 | library(dplyr)
library(tidyr)
library(stringr)
library(STRINGdb)
library(igraph)
library(ggplot2)
# for(i in 1:15){
# plot_hub_network(gene_list = 'Hs_all_15_GeneSpectraScore_95perc_list.rds',
# GEP = i,
# corr_file = "Hs_all_GEP_Corr_with_Expr.rds",
# ... |
75279b9bf0c5fc0354868c14add546b2f5a4498369169aa8ee15df88985c4df8 | R | 9,379 | 288 | ---
title: "TEBC faecal samples: calculating gut-brain and gut metabolic modules from shotgun functional data"
author:
- "Kadi Vaher"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(readr)
# set paths
knitr::opts_knit$set(root.dir=".", a... |
9a3afbe91057f81332d38b2438ac6fce6a355248ed890d0a5f9ddb9d53ab7ce6 | R | 9,420 | 220 | # Load required libraries
library(pscl)
library(MASS)
library(randomForest)
library(e1071)
library(caret)
library(Metrics)
library(nnet)
library(ggplot2)
library(reshape2)
# Load the dataset
# Replace 'path/to/your/datafile.txt' with the actual file path
mydata <- read.delim('path/to/your/datafile.txt', h... |
498d302c029ca31d5110eaed846eb25ece630483354f9bc0cb415be8e6444ed8 | R | 9,427 | 452 | ---
title: "SEFL10k5_Analysis"
author: "Zach"
output:
html_document:
fig_height: 4.5
fig_width: 4.5
highlight: kate
number_sections: yes
theme: journal
toc: yes
toc_depth: 6
editor_options:
chunk_output_type: console
---
#Set Global Options
```{r global_options}
knitr::opts_chunk$set... |
cc4b437a47dfe14790359818cf2d2a6edb2ba4dfea14bbf1eeb1b468782724ee | R | 9,436 | 191 |
###Script 19
#scGSEA
library(msigdbr)
library(escape)
library(Seurat)
library(Matrix)
library(dplyr)
library(ggplot2)
set.seed(1234)
#load seurat dataset
dt.raw <- readRDS("output/atlas/non_integrated_neuronal_atlas.rds")
dt.sct <- readRDS("output/atlas/integrated_neuronal_atlas.rds")
dt.sct@assays$R... |
7c45c644887afd56b33a787d357791ba6470d9d1e09b2dbde855d609049135ff | R | 9,440 | 251 | rm(list = ls(all = TRUE))
# edit to your filepath containing "list_frailty_indices.csv" and "list_final_variables.csv"
# (i.e. where you place cloned git repo)
wd <- ""
out_dir <- paste0(wd, "/intermediate_files/")
dir.create(file.path(wd, "intermediate_files"), showWarnings = FALSE)
results_dir <- paste0(wd, "/scr... |
f36ffd56934593a0261db6c74cd8f55c18b572a116d449b55af7ec775cd2e96b | R | 9,476 | 237 | ---
title: "panel_pre_drive_post_plasticity"
author: "Franz Xaver Mittermaier"
date: "2023-09-04"
output: html_document
---
Multineuron patch-clamp recordings were performed. Convergent microcircuit-motifs were identified. After measuring the baseline EPSP amplitude of synapses that made up the convergent motif... |
ed93b3bddbfe09088f61f79de3b44e10e408dfb81fcd69c0fa6cf01821029e9e | R | 9,477 | 235 | #20250101 update
#Fixed a bug in the rs-number string.
#-----Joint-Tissue-gene-expression-Imputation-(JTI)-----
cat('\n---Joint-Tissue-gene-expression-Imputation-(JTI)---\n')
library('glmnet')
library("optparse")
option_list = list(
make_option("--tissue", action="store", default=NA, type='character',
... |
518887973217d15b2b8fc5495de20d92d7b674bb382d6dfa358d8e35df2ea067 | R | 9,525 | 191 | ---
title: "Matching Conditional ComBat"
author: "Eric W. Bridgeford"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{cb.correct.matching_ccombat}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
colla... |
1af46331280767b91d797fcb0f90a83cca31009ae5b6f848cf195b71b9245b3e | R | 9,547 | 264 | library(data.table)
library(readxl)
library(stringi)
library(LDlinkR)
library(flextable)
library(magrittr)
token <- Sys.getenv("LDLINK_TOKEN")
MIN_MAF <- 0.005
MIN_R2 <- 0.97
ad_gwas_results <-
fread("/data_global/summary_statistics/Bellenguez/GCST90027158_buildGRCh38.tsv.gz")
ad_snps_old <- setDT(read_xlsx('raw_dat... |
2d6d85b6635188e19d6f26cd47ced9db59c1cd1ddc85e8ce792168b03560b083 | R | 9,551 | 382 | #devtools::install_github("CeMOS-Mannheim/PlaquePicker")
library(dplyr)
# library(tidyverse)
library(msiImporter)
library(xml2)
library(stringr)
library(rayshader)
path <- ".imzML"
mis_path <- ".mis"
tolerance <- 10
resulting_res <- 20
spot_dilation <- 1#.25
m_range <- c(100,900)
# m_range <- c(650,800)
new_me... |
5094fbef51cc0da13d650c2fcfbe8421d9595b9a561438de366074b223d22c90 | R | 9,594 | 241 | ---
title: "Estimating onsets using cluster statistics: simulation using EEG-like noise"
author: "Guillaume A. Rousselet"
date: "`r Sys.Date()`"
output:
# pdf_document:
# fig_caption: no
# number_sections: no
# toc: yes
# toc_depth: 2
github_document:
html_preview: yes
toc: yes
toc_dep... |
17083575e364284218292d80da31804c0dee4068a5d43f2ddd99815005366930 | R | 9,617 | 252 | ---
title: "COLOC"
author: "Jack Humphrey"
date: "10/12/2023"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(patchwork)
```
```{r}
prep_coloc <- function( all_res, ld_res, LD = FALSE){
all_coloc_res <- read.table( all_res, header=TRUE)
if(LD){... |
4f62a1c816cc71610f3dfbf79695bcbf883c9a8ac710707f29d5dd069c0b0d26 | R | 9,618 | 217 | #subjobs
args<-as.numeric(commandArgs(TRUE))
#load real GTEx eqtl results
eqtl<-read.table('/data/c***/z***/projects/gtex/mr/twmr/liver/eqtl.txt',header = T,stringsAsFactors = F)
eqtl<-eqtl[,c('gene_id','rsid','slope','slope_se','pval_nominal','ref_allele','eff_allele')]
colnames(eqtl)<-c('gene_id','rsid','beta... |
f236183e68bb641e0a99701e2937304c5a70f684f92d50b3dd4078f3fd2264c7 | R | 9,622 | 242 | library(magrittr)
devtools::install_github('diegovalle/mxmaps')
# Accumulated growing degree days for the year with a base temperature of 5 degrees Celsius.
# Data was downloaded from https://sage.nelson.wisc.edu/data-and-models/atlas-of-the-biosphere/mapping-the-biosphere/ecosystems/growing-degree-days/,
# then was c... |
06584296d498272f8ac2908b738e86bcff27135d9a0e6d758535c0738969f468 | R | 9,635 | 230 | library(nichenetr)
library(Seurat)
library(SeuratObject)
library(tidyverse)
library(dplyr)
# Map clinical data to the metadata
merge_metadata <- function(sobj, metadata){
meta_data_sex <- inner_join(sobj@meta.data, metadata)
rownames(meta_data_sex) <- rownames(sobj@meta.data)
sobj@meta.data <- meta_data_se... |
a3825825adeabe27b4bbf92b0d3539acadd3a2bc14e0ba0005295f74f82e80a3 | R | 9,699 | 272 | ---
title: "Temporal Trajectory"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# load required packages
require(data.table)
require(future)
require(tidyverse)
require(ggpubr)
# directories
data_dir = file.path("..", "Data")
rdir = file.path("..", "Results")
source("Helper_s... |
a8b7536fdf751625c0c560bae6f7d3726c168a84c8361b554b13371857fb96df | R | 9,718 | 144 | ---
title: "Python troubleshooting"
author: "Charly H. A. Billaud, Junhong Yu"
date: "2026-09-02"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Python troubleshooting}
%\VignetteEngine{rmarkdown::render}
%\VignetteEncoding{UTF-8}
bibliography: references.bib
---
```{r setup, include=FALSE}
kn... |
58d360909b8440dce025ab1fc0a8e40a52c7c6169b3ebcdd01442f85f80ad047 | R | 9,816 | 219 | #######################################################
### Deep Brain Stimulation: STN vs GPi.
### Figures
### 2023 Katrin Petermann
#######################################################
## colors
## blue, green, red, orange, yellow
cols <- c("#125773", "#368F86", "#F0523F", "#F59E3C", "#F5CF67")
source("./code/g... |
b4e75048f96e3a7d82d6d7262d6ab72357b8c1e8277431307655ab10f82eca43 | R | 9,827 | 190 | #code to create a figure for Maaslin2 results of clinical covariates
#analyses run in the script 16S_relative_abundance.Rmd
#libraries
library(tidyverse)
library(ggpubr)
library(cowplot)
library(here)
library(patchwork)
library(readr)
library(ggtext)
source(here("src", "utils_kadi.R"))
##############################... |
b64d58c2380718ddb9b3dab22bac469c7c27d3156e50e188f2accf257acbf3b9 | R | 9,843 | 359 | ---
title: "Association between breastfeeding and outcomes"
author: "Giulio Centorame"
format: html
editor: visual
---
This notebook contains the phenotypic association analysis between breastfeeding and our outcomes of interest.
The results of this notebook are also available in Supplementary Tables 10 to 12
# Setu... |
78fc401cc0c16654031d524e5e75c530ab4a8525bd90c253786b0d123a4d8ee5 | R | 9,870 | 252 | ---
title: "Figure1_kmeans_70Clusters"
author: "Fabienne Rössler"
date: '2023-02-27'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE, warning = FALSE}
source("../DLCAnalyzer_Functions_v4.R")
source("../UnsupervisedAnalysis_Functions.R")
l... |
71ebaf3e5743fd08c22bc9ed3ee4228834cd86dccbaa34509ae5112ba157162a | R | 9,872 | 205 | library(ggplot2)
library(ggforce)
library(scatterpie)
save_dir_raw <- "Data/processed_data/simulations/merfish"
merfish_counts <- read.csv(paste(save_dir_raw, "MERFISH/merfish_counts.csv", sep = "/"), header = TRUE, row.names = 1)
merfish_counts <- as.matrix(merfish_counts)
rownames(merfish_counts) <- seq(nrow(merf... |
25ba66a218f1e8dea376aadc69296163fc83f45e0418c681aef3fbd21cb2ecc6 | R | 9,886 | 323 |
optim_path='/home/z***/script/v8/utmost/'
#args = commandArgs(trailingOnly=TRUE)
### optimization part ###
grad_prep <- function(X, Y){
## pre-calculate some metrics for gradient
## args
## X: a list of covariate matrices corresponding to each response
## Y: a list of response vectors
## value
... |
5c4e7db4fa5ec998dca59de43abf016656ad812082c3f2036ecc4b92052d323e | R | 9,948 | 256 |
library(ggplot2)
library(dplyr)
library(tidyr)
library(faux)
# create perfectly correlated vectors with a given vector (i.e. sample cor.)
# Credits to:
# https://stats.stackexchange.com/questions/15011/generate-a-random-variable-with-a-defined-correlation-to-an-existing-variables
### SET UP ###
#reliability <- c... |
4d78737a9badcc78f64c897da0d2767a0875173170be8dab04f3e1e78b905ab6 | R | 9,957 | 309 |
contrastUI <- function(id) {
ns <- NS(id)
fluidRow(
column(width = 4,
box(width = NULL,
title = "Set contrasts", status = "primary", solidHeader = F,
helpText("Which treatments should be compared?"),
selectInput(ns("contrast1"), label = "Treatment 1",
choices = list("Treatme... |
0219fb408a19c48b9cdb878eb86d9342a82dd739770d8498031c6fa6a25b0dbc | R | 9,958 | 287 | #' Identifying spectra and spectral data points
#'
#' This function allows to identify the spectrum and the wavelength of a point
#' in a plot produced by [plotspc()].
#'
#' This function first finds the spectrum with a point closest to the clicked
#' position (see [graphics::locator()]). The distance to the clicked
#'... |
c523479f26a31c7ad299fd9e5050ae37ab8ddf8359c29a635abb98ad56519794 | R | 9,964 | 170 |
#' mochims_coupling_scatter_datasets
#'
#' Coupling scatterplots for multiple datasets.
#'
#' @param dataset_names character vector of dataset names (required)
#' @param validation_list list of validation couplings (required)
#' @param base_dir Base directory (required)
#' @param output_dir Output directory (required)... |
87a4e22b75b1077b1d6c0a11a9bbfde21b5de134538708eaf93a3616f5fe1c27 | R | 9,970 | 310 | ### -------------------------------------------------------------------------~
###
### plot methods
###
### -------------------------------------------------------------------------~
# Set generic ----------------------------------------------------------------
#' @noRd
#' @export
setGeneric("plot")
# Functions ---... |
7de116606749f3348c560cbd25f614498f9ddfda04f86557e99292486d8c9c86 | R | 10,036 | 189 | library(dplyr)
library(tidyr)
library(stringr)
library(ComplexHeatmap)
library(ggplot2)
library(tibble)
library(reshape2)
library(openxlsx)
library(ggpubr)
library(gridExtra)
library(cowplot)
library(ggprism)
MD <- read.csv('Spots_metadata.csv', stringsAsFactors=FALSE)
MD$Sample2 <- paste(MD$Patient,MD$Line, MD$Mous... |
61d18db2fcc44f33fa933ea0d6fb678eb6c50eeee9e79f3daf04a0f8261e5e6a | R | 10,076 | 256 |
library(ggplot2)
library(dplyr)
library(tidyr)
library(faux)
# create perfectly correlated vectors with a given vector (i.e. sample cor.)
# Credits to:
# https://stats.stackexchange.com/questions/15011/generate-a-random-variable-with-a-defined-correlation-to-an-existing-variables
### SET UP ###
#reliability <- c... |
2fdb5da146abf29aa8393dd098b5d3d6ec23fe90d3e2ff8d3b6bf1b13aee8d40 | R | 10,110 | 193 | #code to create PERMANOVA heatmap
#plotting 16S ASV-level, and shotgun species- and GMM-level results all together
#PERMANOVAs testing univariable relationships between clinical covariates and microbiota community composition
#analyses were ran in scripts:
#16S ASV-level: 16S_beta_diversity.Rmd
#shotgun species-level: ... |
5c443936f17bd0ab13491385aaccb2d48727ae20e3c72e9667c228391e7ad664 | R | 10,120 | 309 | ---
title: "Variability Jackknife (*`r params$species.name`*)"
author: "Bucao, Christabel Floi"
output: html_document
date: "`r Sys.Date()`"
params:
input.rds.path: "../../results/01_Filter_Samples"
output.rds.path: "../../results/02_Variability_Jackknife"
species: "DRE"
species.name: "Danio rerio"
min.percen... |
9a4a37795e65a42028cb6855e15b0dcf3eb29dc4e2c9ed18e358534b9cb1a36e | R | 10,137 | 251 | #' Import RevMan 5 analysis data
#'
#' @description
#' Reads analysis data from Cochrane intervention review created with
#' RevMan 5 and creates a data frame from it.
#'
#' @aliases read.rm5 Fleiss1993_CR
#'
#' @param file The name of a file to read data values from.
#' @param sep The field separator character (onl... |
89536f19faccfaa8f97cd70303284e000375676ffae7833da01e946569b3e485 | R | 10,139 | 238 | #Alicia Petrany, 5/18/2023
#'@title QC_Simulation
#'@description
#'Performs quality control on user input for DEGage_simulation
#'@param ngenes is the number of genes to be simulated total
#'@param ndegs is the number of genes to be differentially expressed
#'@param cellgroups is factor with integers correspond... |
70636685fc579879b7a5fdc89e0f6fc07f4bed6c49158d2ee08545710edfc133 | R | 10,141 | 220 | #' @title Classify class and subclass
#' @description Classify class and subclass.
#' @param new_data Data input, single cell expression data.
#' @param group_meta meta input
#' @param ref_data Reference expression data for classication.
#' @param ref_meta Reference metadata, must include column name with class_l... |
46d7e99641faa2add1ff1c9dba5a7a9e1910a0d0327532e4c0d8fa6c653682c7 | R | 10,185 | 262 | library(caret)
library(glmnet)
library(kernlab)
library(plotly)
library(dplyr)
library(pROC)
dbAlz <- read.csv("~/POSDOCTORADO/Python Seleccion Caracteristicas/Datasets_Con_OSampler/adnimerge-EObsNA_2_SanovsEnfermo_OSampler.csv")
#dbAlz <- read.csv("~/POSDOCTORADO/Python Seleccion Caracteristicas/adnimerge-EOb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.