sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
7cac77af201c6c3af4359357c08038803af0455550062be33839298b7060b4ad | R | 5,224 | 175 | ### -----------------------------------------------------------------------------
###
### plotc - plot timeseries, concentration, ...
###
### C. Beleites
#' Calibration plots, timeseries plots, and depth-profiles
#'
#' Calibration- and timeseries plots, depth-profiles and the like
#' `plotc` plots intensities of a... |
e47c9e87829735305a682f1d93f980d12c4e080c0c354ebcafbe28c44510ef24 | R | 5,227 | 151 |
#-----performance-----v8--------
tpm<-read.table('~/../Dropbox/data/gtex/GTEx_Analysis_2017-06-05_v8_RNASeQCv1.1.9_gene_median_tpm.gct.49',header = T,stringsAsFactors = F)
tpm[,1]<-sapply(tpm[,1], function(x) strsplit(x,"[.]")[[1]][1])
main_path=paste0('~/../Dropbox/DansPaper/data/performance/v8/')
tissue_lis... |
2e5a5f810e157ebc9ea31e7878f4ccd32f7d8720f81c5ae76ce4bf3bea228c03 | R | 5,240 | 219 |
downsampling fetal data for global fetal preservation of fetal co-expression
Use the annotated fetal dataset with the largest number of cells GW18_2
Downsample 100, 1000, 10000, 100000
Make a co-expression network
Get global conservation of co-expression with the rest of the aggregate fetal co-expression network
`... |
ce51c99d9ec2d47ae3eca1f0dbeae8378190b8d4a9aa37fd549da93d6cfb232d | R | 5,241 | 103 | library(plotrix) #This library includes additional plotting functions not available in base R, such as plotCI, which is used for adding error bars to plots.
library(stats) #This library includes fundamental statistical functions, including lm for fitting linear models, which is essential for regression analysis.
... |
87e73ef1816922b4a2e3d2af75b62835b86e3e44ac94c754245e176ab0b34391 | R | 5,243 | 160 | # File: setup_hERG_fitting.R
# Author: Kelly Chang
# Zhihua Li
# Date: Oct 2017
# Version: 1.0
#
# Description: R helper script to setup fitting for the hERG drug binding
# model.
#
#--- code to setup simulations
nnnfile<-"models/hergmod_drug_param_bounds.txt"
m... |
f139284daec645f8a18e63f39a6e262f08488175fed6ce209d8a62a2f26443af | R | 5,258 | 124 | library(ChIPseeker)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
library(clusterProfiler)
library(ggplot2)
library(stringr)
library(IRanges)
library(GenomicRanges)
library(data.table)
library(stringr)
library(RColorBrewer)
library(ggplot2)
library(readxl)
#Plot Fig4a, annotatio... |
46ae2d61194a3b42f846864d8fed9e6f63151be23bd47847e7aa678df47878eb | R | 5,262 | 139 | #' @title Getting started with tutorials
#'
#' @description Guides the user through the various tutorials and assist with downloading the demo data
#'
#' @param demo_data A boolean object specifying whether to prompt user about downloading the demo data (default is TRUE)
#' @examples
#' getting_started()
#' @importFrom... |
35bb9d36bd7f69211cc47a63bab3f4d5b45af0f201c7624fb55e57c68a798297 | R | 5,286 | 124 | # --------------------------------------------------------------------------------- #
# #
# Hippocampal volumes in UK Biobank are associated with APOE only in older adults #
# ... |
f047e977a342646048d73e488d847cca0c9cda7d65f985700e1a18a1bbe2cae6 | R | 5,296 | 173 | ---
title: "DPX-EEG: Descriptive analysis behavioural data"
author: "José C. García Alanis"
date: "`r Sys.Date()`"
output:
html_document:
theme: lumen
highlight: pygments
css: "styler.css"
---
Created with `r R.version.string`
```{r, setup, include = FALSE}
knitr::opts_chunk$set(class.source = "customCode",
... |
138632d44cdbb9ef6dac05bccff95a8c9984e4280232e89c0f1ef626c7d2e71f | R | 5,306 | 146 | ---
title: "Optic Nerve Hets vs WT DEG list"
author: "Jonathan Nelson and Katie Emberley"
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: pygment... |
a1d7a4855daa9f81524108377ecbc54c00fdf09ed37850d183ea97a865ff424e | R | 5,318 | 147 | make_preferred_alias_unique <- function(nomenclature){
# This function converts the preferred_alias vector to a unique vector
# combining preferred alias and cell set label
preferred_alias_in <- nomenclature$cell_set_preferred_alias
lus <- function(x) length(unique(setdiff(x,"")))
children <- split_column... |
faf07ec6731270edcd7f9959347fc0d4f8a62fb36dd59474232c6c97b20e633e | R | 5,327 | 144 | ---
title: "Kv_recovery_inactivation"
author: "Franz Xaver Mittermaier"
date: "2024-04-14"
output: html_document
---
This script creates the graphs for the long inactivation and recovery from inactivation experiments.
In brief, I performed axonal bleb recordings. In the whole bleb configuration I performed vol... |
c2612638e3f84a20b2b9e697fb8254443eadfd9cffec2a4cdb857ba21c681094 | R | 5,341 | 130 | ##### Supplementary Figure 4-f #####
# Levels of prd, GT28s, lipases, and DAG metabolism genes in male reproductive organ
#
# Single-nucleus RNA-seq data are retrieved from Fly Cell Atlas (https://flycellatlas.org).
# Four files (two loom files and two meta data csv file) are used in this script;
# 1. s_fca_biohub_te... |
5b09acd0766d34f8644ebd2178c0acd79f82904a8c440287ca7bfaf7d033319b | R | 5,349 | 174 | #! /usr/bin/Rscript --vanilla
##-------------------------
## ordinal regression
##-------------------------
# use latest version of ordinal package (https://github.com/runehaubo/ordinal)
library(data.table)
library(magrittr)
library(ordinal)
library(stringi)
library(argparse)
library(dataPreparation)
parser <- Argume... |
1ecadd968b089b2b7931c82e595ae5d02acf5c9388bf0a453d1a522489fb4379 | R | 5,361 | 145 | ---
title: "Optic Nerve Sox10Cre+ DEG list"
author: "Jonathan Nelson and Katie Emberley"
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: pygments... |
68d1ef0b6626376450889d0319e80a70a035e76d9092a2703b2dcba167d8212d | R | 5,378 | 146 | ---
title: "Optic Nerve PLPCre+ DEG list"
author: "Jonathan Nelson and Katie Emberley"
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: pygments
-... |
54d0925be4488b7ce5109328e59a6f02b64f965bc7340ed9cdb813123d6dae1d | R | 5,379 | 190 | ### ---------------------------------------------------------------------------
# FIXME: update examples
#' Export `hyperSpec` objects to ASCII (text) files
#'
#' These functions write `hyperSpec` objects to text files.
#'
#' @rdname write_txt
#' @aliases write_txt_long
#'
#' @param file Filename or connection.
#' @pa... |
9e261a97fe9f3a8bbc9748c415aaeae7373d260c45683b471cb39934859831fb | R | 5,379 | 120 | ---
title: "cv_ratio"
author: "Franz Xaver Mittermaier"
date: "2023-06-22"
output: html_document
---
This script will plot the panels showing the coefficient of variation (CV) of single trial EPSP amplitudes. For these plots I use the basic subthreshold modulation experiments (see description of "panel_depol_di... |
c136d1570113b3240fc6fe762df8959a31afb72a5ffc2d3aa1d04d55765af212 | R | 5,379 | 168 | #' Impute missing data points
#'
#' Replace `NA`s in the spectra matrix by interpolation. With
#' less than 4 points available linear interpolation of the 2 neighbor points
#' is used. For larger numbers of neighbor points, smoothing interpolation is
#' performed by [stats::smooth.spline()].
#'
#' @param spc hyperSpec... |
dccfa145d8f02a09c4723aae74c6e89932abd02a9e120443aea14de229574292 | R | 5,385 | 151 | # Optional generic preliminaries:
graphics.off() # This closes all of R's graphics windows.
rm(list=ls()) # Careful! This clears all of R's memory!
#-------------------------------------------------------------------------------
### plot
library(latex2exp)
library(plyr)
library(dplyr)
library(ggplot2)
library(ggchar... |
92c5065ea61783eafd7baeea0b42a232f7f7dc563cd0b7836e76a87ae0cf0859 | R | 5,395 | 112 | library(scales)
library(dplyr)
# receive cmd arguments
Args <- commandArgs(T)
wd <- Args[1]
dd <- Args[2]
para <- Args[3]
# # parameters for test only
# wd <- "/Users/siyuansmac/Desktop/PhD research/Suzukii WGS analysis/manuscript_suzukii/Figures/Figure 3/plot/dot_pop_mean/plot_most_pops"
# dd <- "/Users/siyuansmac/b... |
295b8264b4c5cf2a3142652d11a785e01fd07cf815d2d705e84ee3a42aa524bb | R | 5,402 | 205 | #### Markos et al 2024
#### Script used for analysis of 10X matrices
#### Stage N0
# load prerequisities
library(Seurat)
library(patchwork)
library(ggplot2)
set.seed(10)
# Data load ####
AmphiN0stage.data <-Read10X(data.dir = "../10X_matrices/N0/filtered_feature_bc_matrix/")
# read gene id conversion table
gene_map ... |
445ba55152119f6255bd50ed1f8bb758a26e11740a9fdf1be00bb28ee5476566 | R | 5,406 | 121 | # 1. receive cmd arguments
Args <- commandArgs(T)
wd <- Args[1]
dd <- Args[2]
sp <- Args[3]
cl <- Args[4]
para <- Args[5]
# parameters for test only
wd <- "/Users/siyuansmac/bioinfo/project/suzukii_WGS/genetic_diff/ML_tree/plot/mincount_10_no_se_auto_X_over10"
dd <- "/Users/siyuansmac/bioinfo/project/suzukii_WGS/genet... |
1ed80e3dd18302ada1595b5084235ec9f383f9c9e7f59b70ee26e90c6c5772d6 | R | 5,410 | 104 | ---
title: "Supplementary Figure 2"
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: py... |
80efd95f7ce6ce0b9aa3170af1262d8e0693b324d92109e5a2ec1679086a7413 | R | 5,419 | 99 | #' @title FSLRvextract
#'
#' @description Extracts vertex-wise surface-based measures for each subject from sMRIprep, fMRIprep, ASLprep, HCP processing or XCP-D preprocessed directories, and stores it as a single .RDS file.
#' @details The function searches in the preprocessed directory by listing out files with certai... |
b30d10a5a4eb2c6a12e734569b73c1dcb57a1e8f4ad0f1672f9bcec5c4ec2d88 | R | 5,422 | 161 | # --------------------------------
# Load libraries and data
# --------------------------------
library(rstudioapi)
library(yaml)
library(readr)
library(lme4)
library(lmerTest)
library(emmeans)
library(ggplot2)
# Set working directory to script location
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
# Lo... |
d8d947fbdc8d3144fd6555ce23f2aa25e7d25d101e86d2c2c45b7458ccc50a27 | R | 5,436 | 79 | library("R.matlab")
library("xlsx")
library("lmPerm")
library("car")
path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/mri/conn_matrix/pvt"
beh_path = "/m/cs/scratch/networks-pm/effects_externalfactors_on_functionalconnectivity/data/"
strategy <- "24HMP-8Phys-Spike_HPF"
atlas_na... |
c17fa781340c083acc58ea8d09ebfa3719dd761e2a6525b293c0caddfb6a5971 | R | 5,438 | 164 |
##################### ldsc
## peak width= 2000
## 5'
## non 5'
## non-regulating
Dist <- c('1k','2k')[1]
.libPaths(c(.libPaths(),'/sc/arion/projects/roussp01a/jaro/programs/R_libs_4_0_2/'))
primarySourceDir="/sc/arion/projects/roussp01a/jaro/atacseq_ad/NYGC_AD_R01/"
#primarySourceDir="/sc/arion/projects/roussp01a/l... |
90b65b129fcd135a737036a248b6c9bf289e4ce29e3d59ef8ed5c3e3153280f8 | R | 5,442 | 104 | #' makeChipsDF
#'
#' Create data frame and CSV file listing image chips and associated masks
#'
#' This function creates a data frame and, optionally, a CSV file that lists all
#' of the image chips and associated masks in a directory. Three columns are
#' produced. The chpN column provides the name of the chip, the ch... |
714a3333adaba1dda79d304791473b1901e0299f30b829745aba67196170d159 | R | 5,445 | 123 |
library(dplyr)
library(ggplot2)
library(nortest)
exp.dt <- read.csv("output/Cleaned_cellprofiler_results.csv")%>%
mutate(Rbm3_expr = log2(1+Rbm3_density),
Gad1_expr = log2(1+Gad1_density),
Slc17a7_expr = log2(1+Slc17a7_density))
meta.dt <- read.csv("output/RNAscope_cellprofiler_Image.csv... |
6ee44bd346f4e051364c92445105e0695658bdb193b63f87ba27c00175a0e7bb | R | 5,448 | 222 | # Auxiliary function
#
# Package: meta
# Author: Guido Schwarzer <guido.schwarzer@uniklinik-freiburg.de>
# License: GPL (>= 2)
#
xlab_meta <- function(sm, backtransf,
pscale = 1, irscale = 1, irunit = "person-years",
newline = FALSE, revman5 = FALSE,
bi... |
98a131529f38b93463bc9c0d725eee809d2486fc1eb21960e2644843011192fd | R | 5,449 | 119 | # loading libraries
library(Seurat) # v5.0.3
library(SeuratWrappers)
library(patchwork)
library(dplyr)
library(ggplot2)
library(speckle)
library(sctransform)
library(glmGamPoi)
# Loading integrated Seurat object
stress.merged.filt.sct.cca <- readRDS("~/Downloads/scRNA/stress_merged_filt_sct_cca.rds")
# Visualizing PC... |
d19ac07a46771cec960ba24f7289d15475ed9c4c8499c942e426aa941fd48845 | R | 5,465 | 147 | make_preferred_alias_unique <- function(nomenclature){
# This function converts the preferred_alias vector to a unique vector
# combining preferred alias and cell set label
preferred_alias_in <- nomenclature$cell_set_preferred_alias
lus <- function(x) length(unique(setdiff(x,"")))
children <- split_c... |
5506b07cc1b5f2425dc191b4be9a6448ad6c8c079dd6d9cb7fe15184d4f96905 | R | 5,483 | 140 |
###Script 5
#Assign cluster names and perform DE analysis
require(Seurat)
require(sctransform)
require(patchwork)
require(dplyr)
timestamp()
parallel::mclapply
dt.sct <- readRDS("output/atlases/3_seurat_integrated_clustered_sctype.rds")
print("dataset is loaded...")
print(gc())
timestamp()
dt.sc... |
d6e9649a29f311ce4e6163e658028b7c2edd5ae54e7320379cf9843dea4f028e | R | 5,487 | 132 | ---
title: "globularity_summary"
author: "Gokberk Alagoz, L&G Dept., MPI for Psycholinguistics"
date: "`r Sys.Date()`"
output: rmarkdown::github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(cowplot)
```
```{r partherit}
partherit_res = read.table("/data/cluster... |
ee01dfc029d354d00ee28ce59978d9ec8de9568b6c7a4403bb0e9d7b8ee59bd0 | R | 5,488 | 152 | TISCH_preprocess <- function(files_path, n_cells_per_type = NULL, output_dir = NULL, do_return = FALSE, prefix = ""){
library(Seurat)
library(readr)
expression <- Read10X_h5(list.files(files_path, pattern = "expression.h5", full.names = TRUE))
# expression <- round(as.matrix(exp(expression) - 1))
me... |
01a9bf456b49f00058ca3a1fe6f731b9d71fafca7d79732f1ecbce42ba966768 | R | 5,491 | 185 | ---
title: "CoRR Demographics"
output: html_document
date: "2024-02-01"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r, message=FALSE}
require(tidyverse)
require(grid)
require(dplyr)
require(gridExtra)
require(parallel)
require(gtable)
require(scales)
require(cowplot)
require(ggplot2)
#... |
822aa5f25da0ae2daff67fd1b51dac9307b87c93e685bc6f30d4c56acc4bbc39 | R | 5,495 | 215 | args=as.numeric(commandArgs(TRUE))
library(ggplot2)
tissue_list<-dir('/data/c***/z***/projects/gtex/weights/st/')
tissue=tissue_list[args]
main_path<-'/data/c***/z***/data/biovu/pred_exp_23k/'
out_path<-'/data/c***/z***/projects/gtex/simulation/type1error_genome/'
simu_times=1 #test 50 100 1000
#geneli... |
b67534509b2071c3aa5a1cda675d3f701909a57d980bc16f9276fd5bede28416 | R | 5,496 | 153 | #### Notes ####
#### Libraries ####
library(ggplot2)
library(ggpubr)
#### Sourced functions ####
#source("../functions/annotate_boxplots.R")
# Annotate boxplot with number of observations per grouping
annotate_n <- function(x) {
return(c(y = -0.01, label = length(x)))
}
# Annotate boxplot with median per grouping... |
69178c36113545620793a1df9b4833a63f422aa907385e878ad5b0420c5334dc | R | 5,503 | 251 | library(purrr)
library(dplyr)
library(vctrs)
library(tidyr)
library(ggplot2)
library(tibble)
library(data.table)
# Will be the dataset "wang" or "pbmc"
dataset <- commandArgs(trailingOnly = TRUE)[1]
output_path <- "output"
source("../utils/0-indices.R")
gene_indices <- read_gene_indices(sprintf("data/%s-gene-indices... |
c335ebc814afeac248c4428cc3bce85bec280b42b6200cacf9b7611cfbba0c40 | R | 5,508 | 104 | plotGroupComp <- function(sigDat, quantDat, boxDat, eventDat,
baseDat, TitleDat, QuantWidth){
## fix 0 baased coordinates passed in
sigDat$Position <- sigDat$Position + 1
quantDat$Position <- quantDat$Position + 1
boxDat$Position <- boxDat$Position + 1
eventDat$Position <- ... |
f2a7424139fe39b7d9e9d5cc3778cbfb82fcf2b8e3770f1d3cf66d01fff67f22 | R | 5,511 | 260 | ---
title: "Cell type annotation"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load packages
```{r}
require(Seurat)
require(data.table)
require(tidyverse)
require(ggpubr)
require(cowplot)
library(rstatix)
library(RColorBrewer)
library(doParallel)
library(foreach)
#load ... |
6c57676b3842088d27c591fc9135e03c17fd8f1b9b1daceed892165cbf79e3d0 | R | 5,518 | 155 | # File: Milnes_sensitivity.R
# Author: Kelly Chang
# Date: Oct 2017
# Version: 1.0
#
# Description: R script to do sensitivity analysis using hERG bootstrap
# results for the 12 CiPA training drugs.
# New drugs can be specified by running this script with the
# ... |
fe2cbf0818257912d0cfb51383615f9a80bf6e21204b00707a3d82f1af8825d7 | R | 5,524 | 151 | ---
title: "peaky_pitch"
author: "mpolonenko"
date: "2024-06-10"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
setwd('C:/code/peaky_pitch/')
easypackages::libraries('tidyverse', 'lme4', 'lmerTest', 'emmeans', 'psych')
... |
bc77846c2ebe61e1b4942b9be636686b511437bed2efa25f1730e30ff3070b86 | R | 5,526 | 163 | #st xt
library(RColorBrewer)
library(ggrepel)
library(ggplot2)
#display.brewer.all(type = "qual")
#---colors---
dark_col<-brewer.pal(12, "Paired")[c(8,2,4)] #orange blue green
light_col<-brewer.pal(12, "Paired")[c(7,1,3)] #orange blue green
names(dark_col)<-names(light_col)<-c('st','ut','xt')
#---load_... |
c9011d0d09e0d337fa7f7eb828fadd3648b2aaca7bb1494c42173e3a54c0a1d2 | R | 5,527 | 162 | ---
title: "TEBC faecal samples: contribution of species to gut-brain modules"
author:
- "Kadi Vaher"
- "Taxon-specific modules calculated in the script calc_gutbrainmodules"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(readr)
librar... |
ce80b985167a7ba046cf0063af6d9fc08cd253ee7bb8c2ef324b87bbae46632d | R | 5,561 | 144 | library(SingleCellExperiment)
library(scDblFinder)
library(tidyverse)
library(data.table)
library(assertthat)
library(SeuratDisk)
library(Seurat)
if (!file.exists(file.path("data", "v5_reference_mapped_all.RData"))) {
## Antunes data is downloaded from url: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE16312... |
d5b1667d168f575629473dd6d4ee292c658fc6f2cd8f33b32f205dbb491ca471 | R | 5,561 | 214 | #### Markos et al 2024
#### Script used for analysis of 10X matrices
#### Stage N2
# load prerequisities
library(Seurat)
library(patchwork)
library(ggplot2)
set.seed(10)
# Data load ####
AmphiN2stage.data <-Read10X(data.dir = "../10X_matrices/N2/filtered_feature_bc_matrix/")
# read gene id conversion table
gene_map ... |
63662a4a6f217b345f0cece5831879731467091b92e10406b9e192b93d260e52 | R | 5,564 | 122 | ## -----------------------------------------------------------------------------
##
## Somatic variant detection in lesional focal epilepsy
## This script plots the results of the dNdScv meta-analysis
##
## Author: Dr. Christian Bosselmann
##
## Date Created: 2023-09-05
##
## Copyright (c) Christian Bosselmann, 2023
#... |
f73192c5af7c3d28da1f24060f0b747296f3bbe72931c0d78152689932cf9505 | R | 5,575 | 184 | #' @name spc-bin
#' @title Wavelength binning
#'
#' @description
#' In order to reduce the spectral resolution and thus gain signal to noise
#' ratio or to reduce the dimensionality of the spectral data set, the
#' spectral resolution can be reduced.
#'
#' @details
#' The mean of every `by` data points in the spectra i... |
c559c51f6165babe6e3bd23470ab8e0a3aa9bf55ae3ecfaa895306f7a1c1eec1 | R | 5,579 | 123 | run_SPOTlight <- function(st_counts_path, sc_counts_path, sc_labels_path, output_dir = "."){
library(SPOTlight)
library(SingleCellExperiment)
library(scran)
library(peakRAM)
if (!dir.exists(output_dir)){
dir.create(output_dir, recursive = TRUE)
}
sc_counts <- read.csv(sc_counts_pa... |
e690e589ef7917a9dae399891153f4128df400ab042df5391e181149d3ebaa86 | R | 5,595 | 194 | #Alicia Petrany, draft as of 4.5.2024
#This file contains mathematical components of the model
#'@title NB_model_fitting
#'@description
#'A helper function that performs genewise standard negative binomial regression
#'
#'@param counts A sliced dataframe that contains the counts for an individual gene.
#'@param group ... |
c89f1b4ca6b6896ac1ba14af62d4030a6a05e3e1b25b470e240ac6a83ac91d5d | R | 5,602 | 131 | #!/bin/Rscript
#' ---
#' title: "overlap_analysis_eQTL"
#' author: "Gokberk Alagoz"
#' date: "October 10, 2021, last updated on: 21.04.22"
#' output: html_document
#' ---
#'
## ----setup, include=FALSE----------------------------------------------------------------------------------------------------------------------... |
5dd7afb0c9b45ccb5b6153c6453438412692c19a1c9beacdf643738c32ed48d0 | R | 5,615 | 164 | ---
title: "TEBC pre-discharge faecal samples: correlations between Enterobacteriaceae (16S) and Klebsiella species (shotgun)"
author:
- "Kadi Vaher"
date: '`r Sys.Date()`'
output: html_document
---
```{r setup, include=F, message=F}
library(tidyverse)
library(here)
library(phyloseq)
#library(decontam)
library(R... |
b9e418a9676a3091c3c9e710aa04ce38632919ad524dbd60c552085b15c88f5d | R | 5,619 | 156 | #Create seurat object
library(Matrix)
library(ff)
library(Seurat)
library(data.table)
library(readr)
library(Seurat)
library(ggplot2)
library(RColorBrewer)
#Acess reference dataset here https://portal.brain-map.org/atlases-and-data/rnaseq/human-multiple-cortical-areas-smart-seq
#Create matrix by combining the counts... |
d939ec122c85f57089e65edc467d0dfc848f7f97e34eb11f756af0eed8057359 | R | 5,619 | 110 | ---
title: "panel_depol_diff_length"
author: "Franz Xaver Mittermaier"
date: "2023-09-07"
output: html_document
---
This script plots the panel for the basic analog signaling experiments with different duration of Depol. In brief, I performed paired patch-clamp recordings of synaptically connected pyramidal neu... |
3752d9fe88c30b7f8b43d4e5c6c6fdb563fc51fa4dd15884ddf3b7c9cf14d096 | R | 5,647 | 220 | library(canvasXpress)
# functions available:
# cXp_taxonomy_sunburst
# cXp_species_piechart
# cXp_eggnog_funcat_barplot
# cXp_GeneOntology_Skim
# cXp_pfam_barplot
## Taxonomy view
cXp_taxonomy_sunburst = function(filename, num_top_cats=50) {
data = read.table(filename, header=T, row.names=NULL, sep="\t... |
90b95da812ef58130a8998f3bd57d0de69f080e0f038ad9956c04701b5aa7b3a | R | 5,650 | 126 |
#' @title Formula reader for RFT_vertex_analysis()
#'
#' @description Function reading dataset and formula arguments from RFT_vertex_analysis(), TFCE_vertex_analysis() or TFCE_vertex_analysis_mixed(); and deducing the contrast, random or model objects from a linear formula.
#' @param formula A string or formula object... |
b616ef97adebb1cdc3ea789dbfaf0c05e07f785b379e0225c5be0d730e15fa10 | R | 5,655 | 204 | #author Justin Savage
#js664@duke.edu
#Version 1.0
#8/16/21
#This script is for combining the data from the coloc_results file output of the
# Syn_Bot ImageJ Macro. You should be able to simply select the entire script (Ctrl/Cmnd + A)
# and click the Run button in the top right corner. You will then select the same f... |
4f0ea4a26b6494be2b04ff1b1b9dfa0b6889d9a5e76cf2cf87d9e0418a9cd66f | R | 5,657 | 185 | ---
title: "Polar_metabolietes_etracellular"
author: "Alise"
date: "2019 M10 9"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
setwd("Z:\\16-Our Papers/In Preparation/PD_Diabetes_Alise/Figures/Figure1/originals/G-H")
metdata <- read.csv("Data_KIX8... |
4ee03a5927a117cbc7071f6f998a084e8e5eeac2d970c934f1637a10d80349e8 | R | 5,676 | 189 |
# Faux cell data generation function -----------------------------------------
#' @rdname faux_cell
#' @aliases faux_cell generate_faux_cell
#' @docType data
#'
#' @title Faux cell dataset for testing & demonstration
#'
#' @description
#' This is a synthetic data set intended for testing and demonstration.
#' Functio... |
dcad7a7f235d315757b7955fd105996ccf72d3699c142206044f855438371574 | R | 5,676 | 121 | library(ggplot2)
library(data.table)
library(tidyverse)
library(cowplot)
# 1) Dyslexia
dys_ss = fread("/data/clusterfs/lag/users/gokala/beat-dyslexiaevol/data/dyslexia.filtered.2.dat")
chisq = qchisq(dys_ss$pvalue,1,lower.tail=FALSE)
newchisq = chisq/1.18 # dylexia paper says lambdaGC is 1.18, but LDSC outputs 1.572... |
34ac2fa6e0dce97b25f2b74693e3d0e7b77ce1662daa80cf3e19a565b5c7a33c | R | 5,688 | 156 | ---
title: "SupplFigure_kmeans_70Clusters"
author: "Fabienne Rössler"
date: '2023-05-10'
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"... |
cc0823ee93b82a0ab74e9991c29cf7394fa5a475acb2dc389bf3a2e6ef73537c | R | 5,690 | 230 | ---
title: "scCoAnnotate `r params$cons_type` - `r params$sample`"
output:
html_document:
df_print: paged
theme: flatly
toc: yes
toc_float: yes
toc_depth: 1
code_folding: hide
params:
refs: ''
tools: ''
consensus: ''
cons_tools: ''
output_dir: ''
sample: ''
threa... |
c5dc574e1676ea79203a71fd1120304355bfa23c6266f4f1855dbd10276288e2 | R | 5,708 | 187 | ### ---------------------------------------------------------------------------
###
### read_txt_long: import measurements from .txt file
###
### Format:
### (y x) wl int
###
#' Import and Export of `hyperSpec` objects
#'
#' Besides [base::save()] and [base::load()], two general ways to import and
#' export data in... |
c811424a5688513a5eb7805c1f1dc54a66f35b45131385e9a00d4f32330f2dc9 | R | 5,713 | 120 | #' metadata_link_var_cont_fun
#'
#' Wrapper function to get the metadata corresponding to a set of tips
#' which are given as a vector in a col_link column.
#' The metadata for a series of factors or the interaction of two factors
#' is implemented as a nested dataframe containing the raw metadata series of one
#' f... |
fc9dce1c59350b9a3b5b0c98dcbaf601406e258063dcebe9fcac1164f49f9096 | R | 5,718 | 164 | library(geodl)
setwd("Your Working Directory")
# Binary examples ---------------------------------------------------------
#Read in reference data
refC <- terra::rast("data/metricCheck/binary_reference.tif")
#Read in predicted logits
predL <- terra::rast("data/metricCheck/binary_logits.tif")
#Read in predict... |
81cf6f0008e453e92c01ebb086fb997a27f4f396c0f22ead168f1662fac9dbe0 | R | 5,726 | 174 | library(tidyverse)
library(magrittr)
df = read.csv('ms_data.csv')
data <- df %>% drop_na()
quantile_normalisation <- function(df){
# Find rank of values in each column
df_rank <- map_df(df,rank,ties.method="average")
# Sort observations in each column from lowest to highest
df_sorted <- map... |
607c5e4da90debd217acff11cdfb65ca224bab1b8ecbf471c98800d10bb8f308 | R | 5,730 | 79 |
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
h3("Design a dataset"),
helpText("To learn how the input data file should be formatted, play around with the settings below and generate simulated datasets. When you have set the conditions and replicates according to your expe... |
7a4bfcaffb9c69ce0ed3b3f86b64714edd00e80ad42cfeb27883f06ff6016c05 | R | 5,737 | 141 | #' saveDynamicChips
#'
#' Save chips meant to be generated dynamically to disk.
#'
#' Save chips defined by makeDynamicChipsSF() to disk. It is not required to save
#' dynamically generated chips to disk. This is primarily a utility function.
#'
#' @param chipsSF output from makeDynamicChipsSF().
#' @param chipSize siz... |
75be2c1c83ace29150ddcac629cef80474096aecdd77d0805074d51c3033a7e1 | R | 5,738 | 148 | ---
title: "SupplFig_IFS_FreezingResponse"
author: "Fabienne Rössler"
date: '2023-07-06'
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"... |
d773937cf83351449692aab53b40f809674d609d1463b29b56fbaa4601e860e3 | R | 5,744 | 138 | ---
title: "ResilientPhenotype_IFS"
author: "Fabienne Rössler"
date: '2023-04-20'
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")
library(rl... |
27b374b794bfbe916b24f452831116830de711be62b87220b4b7318febd019dd | R | 5,751 | 95 | #----Figure_S03-----------------------------------------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure S03 for the connectivity analysis for
# Reinhard and Fukuda et al. 2024
# set variables:-----------------------------------... |
a349d0bd35f7d642f19ff49ae3ce0bd9441ad959f891272ea42d9dc2ca88ae1f | R | 5,754 | 211 | rm(list=ls())
#make source data file
# options(bitmapType = "cairo")
# resdir="/cluster/p/p274/cluster/projects/p040-ad_change/ADchangeRisk/reproduce/results"
# setwd(resdir)
library("here")
# load packages ----
library("magrittr")
library("tidyverse")
library("sgof")
library("openxlsx")
# ROIs ----
roinames = c... |
7ee1d387acbd701100a9e480d183be08b42819276ba0d6290ae557fb5ace3dbf | R | 5,775 | 209 |
.hands <- c("RHand", "RShoulder", "Neck", "LShoulder", "LHand")
.foot <- c("RFoot", "RKnee", "Hip", "LKnee", "LFoot")
.body <- c("Nose", "Head", "Neck", "Hip", "Tail")
import_omp_data <- function(matpath){
parts <-
"Nose-Head-Neck-RShoulder-RHand-LShoulder-LHand-Hip-RKnee-RFoot-LKnee-LFoot-Tail" %>% ... |
27437002eedd52b05e48a95c2d469ab592037b3420ee06023ec32ef7ec7dca3e | R | 5,780 | 203 | read_el= function(ID,
keep_events= NULL,
path= getwd(),
sep= "\\",
start_behavior= "subject-",
start_eyelink= "sub_",
separate_behavioral= TRUE,
import_all= T){
if(is.null(keep_events))(w... |
b4ec5045579fec5d3bdd4c211889bfa72274a60f127230e4ccc738af6eea36b6 | R | 5,812 | 129 | library(tidyverse)
library(cowplot)
library(optparse)
option_list <- list(
make_option(c("-i", "--input"), type = "character",
help = "Input table. Multiple tables sebarated by comma.",
dest = "input"),
make_option(c("-r", "--region"), type = "character",
help = "name of the region to p... |
c3b71b734d4ea0e2401784a30d53ea6f6a1648b52e00bffa63d241252fa17e11 | R | 5,813 | 148 | library(httr)
library(jsonlite)
library(RCurl)
httr::set_config(config(ssl_verifypeer = 0L))
#URL base for GeneCodis
urlBase = "https://genecodis.genyo.es/gc4/"
checkRatelimit <- function(content){
ratelimit=FALSE
#print("checking rate-limit...")
if(length(grep("rate-limit",content))>0){
ratelimit=TRUE
}
... |
06131657d4cde42d25d3a588ddd69bb7bca97371b023e7d0b837ac8d06cb2353 | R | 5,823 | 159 | #' Title Check whether one network module is preseved in a tissue gene expression profile
#'
#' @param network The network you want to assess about preservation (can be a full
#' path and file name. Can be a network object as well.
#' @param expr.data.files A list with the expression data used to create the network (1s... |
99070b3c0c2cc90a599217ce9e7d45cc8595217d2460c30e13e0f81215a77e24 | R | 5,828 | 274 |
# Function -------------------------------------------------------------------
.replace <- function(x, i, j, ..., value) {
validObject(x)
if (missing(i)) i <- row.seq(x)
if (missing(j)) j <- col.seq(x)
if (is(value, "hyperSpec")) {
validObject(value)
x@data[i, j] <- value@data
} else {
x@data[... |
f3c9f229cb54b3b88c22c48c5877ac9638f15afe223d2aa8f0c9037b12b07b69 | R | 5,830 | 163 | ---
title: "ClusterClassifier_AllData_25Clusters"
author: "Fabienne Rössler"
date: '2023-06-15'
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... |
4a87fd71da08a2e221a79a1264998a39d22cdfba104d4e382395de4f1f7c2f01 | R | 5,845 | 217 | #### Markos et al 2024
#### Script used for analysis of 10X matrices
#### Stage G4
# load prerequisities
library(Seurat)
library(patchwork)
library(ggplot2)
set.seed(10)
# Data load ####
AmphiG4stage.data <-Read10X(data.dir = "../10X_matrices/G4/filtered_feature_bc_matrix/")
# read gene id conversion table
gene_map ... |
21d6db815d0654d9c271a834942bf462d6e1afe4d12b66eda7740ebf43a18446 | R | 5,875 | 131 | # FNIH Project 2
# combine all plasma data
#### Coded: Kellen Petersen
#### Date as of commenting and documentation - 05/28/2024
# Merge unblinded data
library(tidyverse)
library(lubridate)
library(here)
#here::i_am("make_plasma_data_CLEAN.R")
# Load files
c2n <- read.csv(here("adni_data","Study_2_unblinded_datasets... |
4ec4d8426cf70df08264b793df1ec9edb97c188c03b66fb5588b5fb25bb79192 | R | 5,875 | 115 |
##This script processes fluorescence kymographs, normalizes, smooths, and plots them,
##then saves the results.
############ Libraries
library(tiff) ##Handles TIFF image files.
library(fields) ##Provides tools for visualization and analysis of spatial and spatio-temporal data, including image.plot.
l... |
6bdb7b574927c3b72c93cf950f8de934c71d7fd9751db8ebc65c92082437346c | R | 5,875 | 140 | ## AXON GUIDANCE HEATMAP ################################
#########################################################
library(dplyr)
neurod2_peaks<-readRDS("neurod2_peaks.Rds") %>% select(chr,start,end, summit, ebox_start, peak_id, central_dinucleotide)
write.table(neurod2_peaks, "neurod2_peaks_motifs.bed", quote = F, s... |
6efee1b43c1d0643e3a7fb7d3a378714de43b4554e859a7318b93474903365e3 | R | 5,881 | 107 | #----Figure_05G_H---------------------------------------------------------------
#-------------------------------------------------------------------------------
# This is the code for Figure 05 Panel G,H for the connectivity analysis for
# Reinhard and Fukuda et al.
#---------------------------------------------... |
656c7543f68e7706e8dab21a9d1eba867f11b39b4b462ab350fd9f0e394dda16 | R | 5,882 | 122 | #' makeDynamicChipsSF
#'
#' Generate a vector point sf object of chip center locations for use with defineDynamicSegDataSet().
#'
#' Requires an input vector point object defining chip center locations, an input vector polygon object
#' of reference features used to generate segmentation masks, a boundary extent, and t... |
89b5850f0b5988240941985b9b90d68dec36f192f9f7e914245c3c72c858bb3a | R | 5,886 | 142 | ---
title: "Overall_QC_all_samples"
author: "JJ"
date: "2024-01-11"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(dev = "png",
dpi = 300,
echo = TRUE, # prints the code (if FALSE then only code output is shown)
cache = TR... |
08474c8a00fcfc07d9bf805a9fbfb0f9a45602b89db1e9dd34ad8a6987d89a07 | R | 5,893 | 206 | ### --------------------------------------------------------------------------~
###
### write.txt.long
###
###
#' @name DEPRECATED-write_txt
#' @concept deprecated
#'
#' @title (DEPRECATED)
#' Export `hyperSpec` objects to ASCII (text) files
#'
#' @description
#' These \pkg{hyperSpec} functions are **deprecated... |
518b1946f5610e8c9dd4f67a3755c83884e989f1d6071b36cf77d56f59138c40 | R | 5,903 | 131 | #' describeChips
#'
#' Generate data frame of band summary statistics and class pixel counts
#'
#' This function generates a set of summary metrics from image chips and
#' associated masks stored in a directory. For each band, the minimum, median, mean,
#' maximum, and standard deviation are returned (along with some o... |
f145b83926c989bc7ffc064da1cbe19589c8db128731e2fc3f215d72369d489b | R | 5,911 | 151 | #Support analyses for the revision of the manuscript
#July 2024
library(readr)
library(dplyr)
library(naniar)
library(janitor)
#import the Juelich data
UKBJuelich <- read_tsv('/Users/polona/Downloads/UKB_November_2022/ukb670018_fieldset3_MRI20230822.tsv')
exclusion_UKB <- read.csv('/Users/polona/Downloads/exclus... |
7ee441def53191a0f84374dfb4c6b0105986fb011a405fec31b8a0c76e79c1c3 | R | 5,935 | 87 | #Simple script to run a two-way (repeated measures and group) MANVOVA or MANCOVA for four different dependent variables
library(stats)
library(psych)
library(rstudioapi)
library(readxl)
rm(list=ls())
#Print warnings as they come up for troubleshooting purposes
options(warn=1)
# Import Data in long format
Data <-... |
d8c5942d17afaa36015014aa81805310dbfca06fa2056525f67e33bd2c32275a | R | 5,936 | 235 | # Functions ------------------------------------------------------------------
.merge <- function(x, y,
by = setdiff(intersect(colnames(x), colnames(y)), "spc"),
by.x = by, by.y = by,
...) {
force(by)
force(by.x)
force(by.y)
if (any(grepl("^spc$", by.x)... |
80bd680eb6f6f5903a7763f275b3923200001b450838b11903558825cc126127 | R | 5,944 | 151 | #https://github.com/zhanghao-njmu/SCP
#https://github.com/zhanghao-njmu/SCP/blob/main/R/SCP-plot.R #see p values i.e DE_threshold = "p_val_adj < 0.05"
#R-4.3.0
library(Seurat)
library(reticulate)
library(SCP) #Not with conda env activated
library(forcats)
seu <- readRDS("directory/Consensus_broad_high_res_annotated_... |
41a80ce7e3cc266551304edeed334502255ef9b073b1cc03a307bcf9421bf9f0 | R | 5,945 | 151 | ##--------------------------------------------------
## Create bisulfite conversion efficiency covariate
##--------------------------------------------------
library(data.table)
library(magrittr)
library(synapser)
library(illuminaio)
synLogin()
covars <- fread(synapser::synGet("syn5843544")$path,
i... |
e9f6c74c7b1f19262be4358486f7f3a7177dd3018c3baf1f4b517b5a6f3ffd04 | R | 5,949 | 148 |
###Script 7
#MAST DE analysis
library(Seurat)
library(SingleCellExperiment)
library(scater)
library(MAST)
library(dplyr)
library(future)
library(future.apply)
###Pseudo-bulk DE analysis
#Get pseudo-bulk expression data
dt.raw <- readRDS("output/atlas/non_integrated_neuronal_atlas.rds")
dt.sct <- read... |
aac414a87f8e66895b2f5fdefcdb8dcb4393bac36456e82dcda24290b0cde595 | R | 5,953 | 251 | setcat <- function(x, labels) {
if (is.null(labels))
return(x)
#
x <- setchar(x, labels, stop.at.error = FALSE, setNA = TRUE)
factor(x, levels = labels)
}
setdom <- function(dm, tool, domains, domain.available) {
n <- length(dm)
#
n.names <- length(domains)
n.domains <- sum(domain.available)
#
... |
10e4d532f657319d0bd6cc3c1fa980e99b961e553e7829055f67cd2e02990047 | R | 5,968 | 152 | #The script processes TIFF images to extract and analyze local maxima, normalizes the distances
#from the center of the flagellum, and visualizes these distances over time. It also performs
#linear regression to understand trends and saves the results for further analysis.
library(tiff) #To read TIFF image fi... |
1d6bf877f24ff6604cdcf13aed86b2f4984bce3fabed5e20ebe2b204def6b804 | R | 5,968 | 219 | #' Reduce time-series to few (rotated) Principal Components
#'
#' This function is under active development. It is meant to
#' reduce the entire time-series of normalized and baseline-corrected
#' pupillary data in just a few scores obtained by rotated Principal
#' Component Analysis. PCA is an effective way to reduce ... |
173f324cafc4d005466d19dcc31e3777e840b424f6d8bb4b87e0b3536ebfa86e | R | 5,972 | 218 | ### plyr has rbind.fill for matrices now. We keep with our version to avoid the
### dependency, but do not export it anymore.
#' Quick data frame
#'
#' Experimental version of [as.data.frame()] that converts a list to a data
#' frame, but doesn't do any checks to make sure it's a valid format.
#' Much faster.
#'
#' @... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.