sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d53c534d4fa9569c45bce6056a37d6700a0bfb0eab326628972ee7b3220e0a18
R
10,190
245
#-----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', help="tissue name [required]"), make_option...
000fd6ff959cee13cf65c48b4b7a20dc7c4d8a04773ce76dc22c7a953f5d6f31
R
10,215
160
############################################################################## # # Subject selection # # In this script, we selected the data of the subjects who is suitable in # this study. # # Liang Qunjun 2023/11/13 library(tidyverse) library(NbClust) library(ggiraphExtra) library(ggsci) library(ggeasy) library(ti...
fc919a459d5a5b825f16e5742f5fa085d8f7a578f44a6de65d13202e01eacda3
R
10,242
212
### determine which guide the cells in ADAR-KO teratoma carries library(dplyr) library(stringr) # working path setwd('/media/Scratch_SSD_Voyager/sammi/RNA_editing/') input_dir = '/media/NAS1/Sammi_NAS1/Cellranger_Output/ADAR_20220614/dual_ref/' ter_list <- c("ter1","ter2","ter3","ter4") #Load dataset ter_KO <- list(...
c3d25cefce3ca3e68979e29f8ffa9b73aa014fd576a56260f9fd5a3740154e11
R
10,248
349
--- title: "Astrocyte Subcluster Correlation based on High Variable Genes" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load required packages ```{r} require(dendextend) require(SNFtool) require(data.table) require(tidyverse) require(pbapply) require(ComplexHeatmap) ```...
b63c9fadc8469941c11cf2672768ba0dad5159cc4751ea779c3c17fe46573cf2
R
10,256
213
library(dplyr) library(Seurat) library(tidyverse) library(patchwork) library(ggplot2) library(scCustomize) # load snRNA-seq data # construct a data pathway table first(including the pathway and data type) data.pathway <- read.csv("../data.detail.csv") data.list <- list() data.pathway.multiomes <- subset(data.pathway,d...
0a6abe23283f161960ad6c091290892650dda96f64d535eb4021b8913a2428d8
R
10,314
379
--- title: "InferCNV_NGCHM_DAOYcoculture.Rmd" author: "JJ" date: "2024-08-24" output: html_document --- ```{r graphical_output} options(bitmapType='cairo-png') # this line of code needed BEFORE knitr code in chunk below ``` ```{r setup, include=FALSE} knitr::opts_chunk$set(dev = "png", dpi = 300...
7b9aa4f64654111a482f2c7c371184f304af5a893ebe45d9a0e66ee890faf601
R
10,367
203
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...
7b80eaf05d1bf16d6e232cac0a58d7cc82e0ae98f04eee6123ffb50cc515713a
R
10,378
316
--- title: "InferCNV_NGCHM_ONS76coculture.Rmd" author: "JJ" date: "2024-08-24" output: html_document --- ```{r graphical_output} options(bitmapType='cairo-png') # this line of code needed BEFORE knitr code in chunk below ``` ```{r setup, include=FALSE} knitr::opts_chunk$set(dev = "png", dpi = 30...
422942d0377dd2370afcb35949be9376215162c390dac942f29d947852f2f116
R
10,437
148
#' mochims__plot_model_performance #' #' Plot model performance. #' #' @param input_dt data.table with model free energy estimates (required) #' @param report_outpath output path for scatterplots (required) #' @param suffix suffix for output files (required) #' @param highlight_colour colour for highlights (default:re...
ee9e70c6923639b4c490336af7564355fb185891b6076a693a06317f622bc7f0
R
10,479
194
--- title: "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: pygments --- ```...
a5083dd5b2518d1638e61a23d254819a50a0fe0f9a316be03713d3842ea94a0d
R
10,515
366
# Fun: show ------------------------------------------------------------------ .show <- function(object) { print(object) invisible(NULL) } #' @name show #' @rdname show #' @aliases show show,hyperSpec-method #' #' @title Show brief summary of `hyperSpec` object #' #' @description #' Functions `show()`, `print()`, ...
42fcc33bc32ea83fae812ab7f945e0371d7c5e5afad8ba101f63dde8f064f29a
R
10,529
176
rm(list=ls(all=TRUE)) path='C:/Users/Christoph/Documents/ETH/git/dslab/summaries/20181120_22-29-55_aug10bincont__fold' data=data.frame() for (fold in 0:9){ data=rbind(data,read.csv(paste(path,fold,'.csv',sep=""))) } data$squared=(data$label-data$prediction)^2 human=read.csv('C:/Users/Christoph/Documents/ETH/git/dsla...
3cf1eafc457c0a82d2efc9f72ef27434e2f6aff22c12abc37137c10dba54d321
R
10,530
319
#### This is Alex and Ben :) require(tidyverse) library(pheatmap) library(Hmisc) library(RCy3) library(igraph) library(plyr) library("dplyr") library("psych") library(maplet) # Commit number 1030613ae4bc88ec4d98a466fe2251b70f60a5e8 10/10/20 if (!exists('qmdiab')){ base::load(data.makepath("QMDiab/qmdiab_2019_03_13.r...
f8405518d0f1731306ec761e1560a1a7987a9b1285a6f433ae9c572d4b0e5032
R
10,539
186
setwd("/home/wangmg/Documents/deconvolution/Data_and_code_for_reproduction") source("Code/utils/metrics.R") source("Code/utils/plot.R") library(ggplot2) ##### MERFISH ### The original MERFISH data can be downloaded from https://alleninstitute.github.io/abc_atlas_access/descriptions/Zhuang-ABCA-3.html. ### The par...
9d4d3238740ee467259e227a205a4c8dbedbb066a51f30e3cb40c587dca8363f
R
10,568
245
--- title: "panel_plasticity_dAP5" author: "Franz Xaver Mittermaier" date: "2023-10-12" output: html_document --- This script will plot the panel for the plasticity experiments with dAP5. For description of the stimulation paradigms, see "panel_plasticity_500ms_train.Rmd". ```{r, message=FALSE, warning=FALSE...
9420b0d19227f97d92874c00680708aa3ad1f24e9cf263de43cf72d6667c1cbf
R
10,595
291
--- title: "Variability of organ-biased genes (observed vs. randomized) (*`r params$species.name`*)" author: "Bucao, Christabel Floi" output: html_document date: "`r Sys.Date()`" params: input.rds.path: "../../results/12_Organ_Bias" output.rds.path: "../../results/14_Organ_Bias_Observed_vs_Random" species: "DRE" ...
11993c2f4621ca724ec0f829a935d78d806b1ad26c9ff4e723cbd48b12b94e82
R
10,617
190
#----Figure_04_I---------------------------------------------------------------- #------------------------------------------------------------------------------- # This is the code for Figure 04 Panel I for the connectivity analysis for # Reinhard and Fukuda et al. 2024 # The first run might take long as all syna...
f6145fdc61cd119c3a86504a8c596449f748e8d932db52c399dea9c17645375f
R
10,682
99
source('./scripts/01_Setup.R') # A treemap R script produced by the Revigo server at http://revigo.irb.hr/ # If you found Revigo useful in your work, please cite the following reference: # Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology # terms" PLoS ONE 2011. doi:10.1371/journal.pone.002...
6a02a3c6e0969ecc6e8d6d6861d6100b2f195a68df5619c1b92dec3aa25b219f
R
10,692
229
suppressPackageStartupMessages(require(tidyverse)) suppressPackageStartupMessages(require(magrittr)) server <- function(input, output) { y_axis <- list( title = "", showline = TRUE, showticklabels = F, mirror="ticks", showgrid = F, zeroline = F, linecolor = plotly::toRGB("black"), li...
c1d7aeb467c4e63c0b49e1da3535b306c18f1b810bf347c54cad7c751c0fd5c6
R
10,733
458
#' Auxiliary functions for (back) transformations #' #' @description #' Auxiliary functions to (back) transform effect estimates or #' confidence / prediction interval limit(s). #' #' @details #' Often in a meta-analysis, effect estimates are transformed before #' calculating a weighted average. For example, the log ...
e023d901e0c70b7c70f5a6059cf2ce7ab8a172bfd1910500a2d9243b5053ce4e
R
10,766
246
library(DESeq2) library(RITAN) library(RITANdata) library(ggplot2) library(stringr) library(biomaRt) # Set working directory setwd("/Users/derek/Desktop/Katie/") #read in raw count data and metadata with columns of first matching rows of second countdata<-read.csv("Liver_gene_expression_rawcounts.csv", row.names = "e...
2ac0702cb6d18b7c5d6a8804d14112b577cde18ccbe3141999b4ee0d61314e14
R
10,771
297
#' Conversion from log odds ratio to standardised mean difference #' #' @description #' Conversion from log odds ratio to standardised mean difference #' using method by Hasselblad & Hedges (1995) or Cox (1970). #' #' @param lnOR Log odds ratio(s) or meta-analysis object. #' @param selnOR Standard error(s) of log odd...
20ad867327c9df71dd3561c12a9258c48355d161f287ed21af1b039706047057
R
10,779
207
library(ggplot2) library(reshape2) library(RColorBrewer) ################################################################################################################### # PCA MDS ################RNA########################################################### setwd('/sc/arion/projects/CommonMind/roussp01a/INGE...
a61a8f7987a5433edae18e5f2a01a0c9da6815d4d62e35b259087af633607d16
R
10,802
324
--- title: "Variability rank correlation across conditions (*`r params$species.name`*)" author: "Bucao, Christabel Floi" output: html_document date: "`r Sys.Date()`" params: input.variability.rds.path: "../../results/03_Variability_Plots" output.rds.path: "../../results/04_Correlation_Across_Conditions" species: ...
fe337397a57126284de38268d9ddb9ad68696b0a644d8682d8475ad504b0a334
R
10,894
308
#### Notes #### # Functions to filter samples for quality control #### Libraries #### library(edgeR) library(matrixStats) library(sva) #### Sourced functions #### source("../functions/unit_tests.R") source("../functions/helper_functions.R") #### Functions #### # Remove barcodes not included in metadata and map to s...
c78537d88f2fe958b10a27ca729b5ab7a5d6b49c8de3a1b6cde43a123b30f155
R
10,933
346
# Summary ----------------------------------------------------------------- # Run a parcel-wise ANOVA to detect differences in ISC between movies # for the Emofilm dataset # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(ggpubr) library(broom) li...
9b3036e996dde150b588f4ab285dac97b023f8024de2a0d202e4f0faa79427c9
R
10,971
319
# Summary ----------------------------------------------------------------- # Run a parcel-wise ANOVA to detect differences in ISC between movies # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(ggpubr) library(broom) library(rstatix) # Prelud...
e997236b7973c1c069a8544311ae09f415bc6413cc20e5d837877e3c1fc80ec8
R
11,010
319
# Summary ----------------------------------------------------------------- # Run a parcel-wise ANOVA to detect differences in ISC between movies # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(ggpubr) library(broom) library(rstatix) # Prelud...
da233e8ccb2437d475410e91a7a6e72759c149ea8bc9e31fc97915a9a09a17ff
R
11,026
277
#Alicia Petrany, draft as of 4.20.2023 #Contains all helper function for DEGage #'@title parse.input #'@description #'parses input of the user based on the data type of the input #' #'@param counts user input for 'counts' #'@returns dataframe containing counts parse.input <- function(counts){ dtype <- class(counts) ...
8c683c73ad355148402e0412e9feeb548a169f6e6e752d1737bce266e86b729e
R
11,029
152
```{r load-config, incluse=FALSE} source("config.R", local = knitr::knit_global()) ``` ```{r load-csv} # Load filtered dataset df_2sc = readRDS("parts/patient_sc2.Rda") # Data of patients with 2 SC MRI df_sc_mri = readRDS("parts/sc_all.Rda") # All SC MRI data ``` ``` {r load-treatment} # Import treatment data df_trea...
860a5dbf9d2eb9490b3a4fec28625beac1b7c22d8115f5cd189308cc3fb281a0
R
11,033
307
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
e3ca9ddf34395f3c56341d55fef4b14e428c6a5862ac08791aa892a8fef7cb57
R
11,033
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
146b3b7c18327bb8523acbb23e6e70a056d5aef421cc51509e7e1a493982ddd8
R
11,034
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
24ae1c8191d28e20849e820e6f50a1739620d97e0f598cb5eed77bedc9787630
R
11,034
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
40ccbfd8ffe6caf920fb8e77958bc17fe80e65f7baceb604ace90c64aff35c5d
R
11,034
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
a4c11025d4b8aa34c241eccaaec2d33f810e29f7b946283b85fbc4095d45220a
R
11,034
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
fdbc7d6c6144897eb63b1ea81096e09e1a8f419014e75e867f5675d71a5f57ed
R
11,035
306
# Copyright 2021 The On Combining Bags to Better Learn from Label Proportions Authors. All Rights Reserved. # # 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/lice...
6e429821ddd7f7991d0d3fc3d908d50b3a6e784053b11ae4fda9faefc55456e8
R
11,045
371
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### ### initialize -- initialization, called by new("hyperSpec", ...) ### ### C. Beleites ### ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Function ------------------------------------------------------...
1977595123d3640b3246e926606b565c631e557dd1d75a553fb62c785acc5524
R
11,086
271
--- title: "Quality control assessment" author: "Jeremy Miller" date: "March 8, 2019" output: html_notebook --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Overview This script reads in the data output to the feather file and uses it to calculate and plot some QC information for...
ae5472899eff84ab9742476ffe22b6c4716b770fd150b5707bc39a3ab6758d79
R
11,098
328
# Summary ----------------------------------------------------------------- # Run a parcel-wise ANOVA to detect differences in ISC between movies # Packages ---------------------------------------------------------------- library(tidyverse) library(ggplot2) library(ggpubr) library(broom) library(rstatix) # Prelud...
07e049aa6278d51e926ae588bd5278b71ea04af76802994e9d4695e0e272a54e
R
11,121
303
#' Conversion from standardised mean difference to log odds ratio #' #' @description #' Conversion from standardised mean difference to log odds ratio #' using method by Hasselblad & Hedges (1995) or Cox (1970). #' #' @param smd Standardised mean difference(s) (SMD) or meta-analysis #' object. #' @param se.smd Stan...
753aac7f412dc818863d25a7f02d5edc3e28b2ead0b73c7c99f0bfe10ab675ea
R
11,133
281
#========================================== # Produce Table 2: GWAS results summary #========================================== library(data.table) library(magrittr) library(rtracklayer) library(flextable) source("code/functions/find_closest_gene.R") source("code/functions/make_or_95_ci.R") bim <- fread("data/mega/me...
ffdb0eccdd0fbf829e75b5c30182e0f8026f4188574f22793128cc7f7441b4e4
R
11,134
341
# Optional generic preliminaries: graphics.off() # This closes all of R's graphics windows. rm(list=ls()) # Careful! This clears all of R's memory! #------------------------------------------------------------------------------- # Load rjags library and the wiener module library(rstatix) library(runjags) library(rja...
ee722647250b0cacd28d48e327c5c6d5918cbb76eb373b77a9c493353a5f2ef8
R
11,157
214
## ----echo=FALSE--------------------------------------------------------------- knitr::opts_chunk$set(crop = NULL) ## ----message=FALSE------------------------------------------------------------ library(CTSclocks) data(MurphyGSE88890) agePred.v = CTSclockAge(beta.m, CTSclock = 'Neu-In', dataType = 'bulk', CTF.m = N...
5a21570d997c4e4e4e6e498746a2b5092ca5463762dd7fb6056bbe4663fd524b
R
11,165
277
# Install optparse package to parse the parameters if (!require("optparse", character.only = TRUE)) { install.packages("optparse", dependencies = TRUE) library("optparse", character.only = TRUE) } # Parameters definiton option_list <- list( make_option(c("--inputPath"), type="character", default = NULL, ...
66f07b85105c8091e3f5af7cddc09e728eb37b8c9d1fc94bb3fdc67bd388cc11
R
11,165
345
## Backend Modules ### suppressPackageStartupMessages(library(dendextend)) suppressPackageStartupMessages(library(magrittr)) suppressPackageStartupMessages(library(parallel)) suppressPackageStartupMessages(library(foreach)) suppressPackageStartupMessages(library(cluster)) suppressPackageStartupMessages(library(Summari...
dc9a0fa7c1a70edc28c4fe1764191fc75eae2dfc1af99038737553b8a3f98136
R
11,169
296
--- title: "RRHO2 Tutorial" author: "Caleb Huo" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: toc: true toc_depth: 2 number_sections: true vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{RRHO2} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::op...
c1a66e0c0a196512961aa6ac68b435e17c5f522ef0a80eb77e7d46ef5e227816
R
11,249
335
#' @name DEPRECATED-read.txt.Witec #' @concept moved to hySpc.read.txt #' #' @title (DEPRECATED) #' Import Raman spectra from Witec files #' #' @description #' #' These data input functions are **deprecated** and they will be removed in #' the next release of \pkg{hyperspec} package. #' Now functions in package ...
c79eec64ed1691b77aa60c0d028e080956f435562fb971ca913ee191b3364c33
R
11,262
529
--- title: "SEFL10e_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...
058ef8ba603e051c7ea77330f699f0cfcc28d0687a916968ce3f4af5b3533f3e
R
11,277
352
#Load libraries library(geodl) library(dplyr) library(torch) library(luz) library(ggplot2) setwd("Your Working Directory") #Set device to GPU device <- torch_device("cuda") #=================Data========================================================== #Create training chips Data Frame trainDF <- ma...
26df6f3675261a5094f00b64c29d31ae6dea0093dc480a71b2ea5100119345e6
R
11,282
323
## Collection of custom functions for working with flywire data. # vec_norm() function ----------------------------------------------------- ## Caluctates for a given vector (x) the vector magnitude and returns the ## the normalized vector / unit vector. vec_norm <- function(x){ vec_mag = apply(x, 1, function (x...
817d5105526f253d5c5b57ba3dce35e993d6dd5922858eb283364ab9fc6bfbc3
R
11,302
286
--- title: "KmeansClustering_AllData_25Clusters" author: "Lukas von Ziegler" date: '2022-05-31' output: html_document: toc: true --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r, message=FALSE, warning = FALSE} source("DLCAnalyzer_Functions_v4.R") source("Unsupervised...
df057f03eb369ca5c8b73484d7b53a8f3c9d691e44713cb5d193e12dc7e78f05
R
11,311
351
options(stringsAsFactors = F) library(RSQLite) library(LSD) #--------------------------------------- #---UTMOST---original---Whole_Blood tissue='Whole_Blood' model='ut_original' #gtex con <- dbConnect(RSQLite::SQLite(), dbname=paste0('~/../Dropbox/DansPaper/data/db/',model,'_',tissue,'.db')) #...
75f24fc6e4a67d7e4e4583c9a977fa9811605861b19fdf98ad52c0fcaaf54ae6
R
11,331
441
# naming scheme for the internal functions: # .<generic>_<x><y> with <x> and <y> the first and second parameter/operand: # h ... hyperSpec object # n ... numeric (scalar, vector, or matrix) # m ... matrix # _ ... missing # Function ------------------------------------------------------------------- #' @include expan...
dc5b4656de728e3e34ad4b62fbdc981d470573bcae9c9ff698a185069eaca1e1
R
11,333
343
# Multiclass example ------------------------------------------------------ # Preparation ------------------------------------------------------------- #Load libraries library(geodl) library(dplyr) library(torch) library(luz) library(ggplot2) setwd("Your Working Directory") #Get device device <- torch...
6359394a08c32368262d0793fca070c6ba5444114b05e5ba49e90cfc95966dd3
R
11,347
227
##' An improved version for RRHO, which aims to correct the intepretation for top left region (up in x and down in y) nad bottom right region. ##' ##' We improved the algorithm such that all four regions of RRHO plot are meaningful ##' @title RRHO2 ##' @param list1 data.frame. First column is the element (possibly gene...
606464b2b60c079bea52bfd50fdb8eef82721390cc59a985730e1b62f8a4b2fc
R
11,366
141
############################################################################# # # Temporal feature abnormality for Agitated MDD # # For this pipeline, we tested the temporal structure among agitated MDD, HC # and non-agitated MDD. # # The alternative features include: # 1. Peak duration (ETS) # 2. Time delay in ...
e0c44ab03d2c1a2b96bb4a4f8cb001d91583a5105e3facec145e08aafb835c2d
R
11,417
377
#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(...
88bda3342d3dc6ed1058de656e704acb8985ccb4f4213f4a6e0531b97eebf76a
R
11,439
319
####################################################### ### Deep Brain Stimulation: STN vs GPi. ### Functions ### 2022 Katrin Petermann ####################################################### create_variables <- function(data){ ## date variables data$date_dbs <- as.POSIXct(data$date_dbs, format = "%Y-%m-%d") dat...
432420e2a6fb0e144baed0e968557d22ded642fa868c08751bb91a1029565a09
R
11,443
230
#-------------------------------------------------------------------------------# # # Input parameters to set (n=6) # 1. hemisphereParameter: 'lh' (left hemisphere) or 'rh' (right hemisphere), # 2. ReferenceGeneListFile: Path to the file contatining Gene Symbols, correlation # between Brain...
e6ba8caa182be405b9496c7a589924cd67cb14fe558b7a69a7333b7139ea8324
R
11,449
328
--- title: "`r subdir_name`" author: "Kadi Vaher" date: "`r Sys.time()`" output: html_document --- ```{r setup, include=T, message=F} subdir_name <- "microbiota_mri_demo_paper" # load packages library(tidyverse) library(here) library(magrittr) library(glue) library(ggpubr) library(knitr) library(readxl) #library(MVN)...
408ae85c9321ebdd15ea97c90f0e44d5369fb99de8b89a567254e3aa52de0cd3
R
11,523
406
#' Polynomial baseline fitting #' #' These functions fit polynomial baselines. #' #' @details #' Both functions fit polynomials to be used as baselines. If `apply.to` #' is `NULL`, a `hyperSpec` object with the polynomial coefficients #' is returned, otherwise the polynomials are evaluated on the spectral range #' of `...
0f56a8b58a01a3cada7a15db1b4ccdc408ff0339e76b74ae17ea793b31605ba6
R
11,544
457
--- title: "20240408_synbot_puncta_processor" author: "Justin Savage" date: "`r Sys.Date()`" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r load libraries} #author Justin Savage #js664@duke.edu #Version 1.0 #8/16/21 #This script is for combining the data from the ...
f5459767ae37064f3820a001981ef1f5ea28d184ffc4bcd66f5946991c6b4374
R
11,552
432
# Function ------------------------------------------------------------------- #' Binding `hyperSpec` objects #' #' Functions to bind `hyperSpec` objects. #' #' #' The former difficulties with binding S4 objects are resolved since R version #' 3.2.0 and `cbind()` and `rbind()` now work as intended and expected for #' ...
69345c4138c854912325a7155853d5b2e364f49f349da283523c866a93651a0e
R
11,560
205
require("svMisc") require("ggplot2") require("dplyr") require("tidyr") require("reticulate") library("stringr") library("jsonlite") library("RColorBrewer") library("knitr") library("doParallel") library("foreach") library("gtsummary") library("labelled") options(warn=-1) # Only show code in HTML output, not in word do...
54e6a34db0800dbec62b8f9c19ebd95f2de73d652ff0cd88c0cd17771281a70b
R
11,576
182
source('./scripts/01_Setup.R') SampleInfo2= readRDS('./data/processed/rds/SampleInfo.rds') SampleInfo2$Amplification.Method= gsub("PicoPlex v2|PicoPlex v3", 'PicoPlex', SampleInfo2$Amplification.Method) delimiters = ".bowtie|.bt2" aa2= strsplit(SampleInfo2$File_name, delimiters, perl = TRUE) aa3= sappl...
5ba207380dd99ffb8dcea4cabcdad80a2d3bca71fed770c0b678fc0a0815c4c4
R
11,586
338
#-----MR-JTI----- cat('-----MR-JTI----- \n') options(digits = 4) library("optparse") library("glmnet") library('HDCI') option_list = list( make_option("--df_path", action="store", default=NA, type='character', help="Path to dataframe of gwas and eQTL summary statistics [required]"), ...
1c5fc2d0372d4bcce37708dab4dc2f2a11d925e11389eec5c9c0a45e029a4b28
R
11,601
212
library(dplyr) library(tidyr) library(stringr) library(ComplexHeatmap) library(ggplot2) library(tibble) library(reshape2) library(openxlsx) library(graphics) library(vcd) library(ggpubr) library(gridExtra) library(cowplot) library(ggprism) MD <- read.csv('Spots_metadata.csv', stringsAsFactors=FALSE) MD$Sample2 <- pas...
6083f6b075c6c667b48b1d7bf4e1d599940904653308030a25c11b578c75c3a0
R
11,648
241
#### MOUSE ###### a=read.delim("all_crossvalidated_predictions_mESC.txt") b=read.delim("all_crossvalidated_predictions_mouse.txt") colnames(a)[2:3]=c("mESCPred","mESCActual") a=merge(a,b,by=1) c=read.delim("ensembl2geneName_v90_mm10.txt") colnames(c)[2]="geneName" a=merge(a,c,by=1,all.x=T) a[a=='']="NA" summary(lm(mE...
f3a02e7d00df4164ed43d2c21d6f45cdd78c357163d6bb1ef4816c7334e83749
R
11,648
363
--- title: "Pupilla::EyeLink::Read_and_preprocess" author: "Elvio Blini" date: "January 2024" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Pupilla::EyeLink::Read_and_preprocess} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} resource_files: - images/trial_13-1.png - imag...
cd89064ba3aa680eea1ac4e1894b495884bf2f84c6a2412dc1cfdcd6ead38af5
R
11,670
304
#' Adjust for batch effects using an empirical Bayes framework #' #' ComBat allows users to adjust for batch effects in datasets where the batch covariate is known, using methodology #' described in Johnson et al. 2007. It uses either parametric or non-parametric empirical Bayes frameworks for adjusting data for #' bat...
b6713cb485254a25a8af31f3a8f0d308a0365226e7405d77445c963709344bce
R
11,676
323
library(psych) 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 ### #s...
8e9ae788013cafe67012aefaa9d5fedf95c41f7ede75fe48402f0dc1ca207d52
R
11,694
344
## ----------------------------------------------------------------------------- ## ## Somatic variant detection in lesional focal epilepsy ## Depmap functional analysis ## ref: Gatto et al. 2023; Shimada et al. 2021 ## ## Author: Dr. Christian Bosselmann ## ## Date Created: 2023-09-05 ## ## Copyright (c) Christian Bos...
bdd44f048847ca4db31330b4f4fbf05129770db409db9e09bd8d282733616c7d
R
11,699
252
############################################################################## # # Canonical correlation analysis # # This script is used to obtain the correlation between time delay using # canonical correlation analysis. # # We obtained the correlation value and the CCA loading of each region. # # Note. The CCA used ...
76a0f38b31e237157a379bc343658c40b94c2d427e3897a257c614d507b8563a
R
11,753
240
#' @title Get cell type name with annotation of major class, subclass and top 3 markers #' @description Get cell type name with annotation of major class, subclass and top 3 markers. #' @param input_data Data input, single cell expression matrix or pseudo cell matrix. #' @param cell_type_file Annotation of cell typ...
6b3a7a5a035800e608c9a217d01b6cb61cb987055cab2e6a4ad9db291493a53c
R
11,793
318
### --------------------------------------------------------------------------~ ### ### .extract - internal function doing the work for extracting with [] and [[]] ### ### --------------------------------------------------------------------------~ # Function ------------------------------------------------------------...
ac726f9bc0f1c089b49b24a940e9edf4b7d26bb98b6f5d8cae7e1b5583a67d65
R
11,833
254
###Script 8 #Plot cell composition library(dplyr) library(ggplot2) library(ComplexHeatmap) ###Make files for scCODA analysis (in python) #cca tmp <- unique(md[,c("orig.ident", "Region")]) readRDS("output/atlas/metadata_integrated_neuronal_atlas.rds") %>% select(orig.ident, Region, cca_clusters) %>% ...
b83be8d510a18cbeb0850294cd7901c01bdab09ce37a151d8fa04c93549671cf
R
11,853
286
# edit to your filepath containing csv-files from "refine_FI_analyses.Rmd" wd <- "" setwd(wd) library(dplyr) library(survival) library(ggplot2) library(ggsignif) library(survminer) library(coxphw) library(lubridate) library(ADNIMERGE) ##read the ADNI dataset with the FI-variables, the recent adverse events log and t...
18104d871a2140f98418abeb72dc533221102a8f6444769fb794d0a109746e0a
R
11,861
292
library(dplyr) library(babelgene) library(ComplexHeatmap) library(RColorBrewer) library(viridis) library(enrichR) library(ggplot2) ################ ###Grubman AD### ################ res <- read.csv("results/grubman_MAST_vulnerability_results.csv", row.names = 1) %>% filter(FDR < 0.05) tmp <- ortho...
f363cfa2e508824a0015153b071fd021ec826775e22852b218cd3519e74e256c
R
11,911
255
--- title: "Pairwise Detection Figure" output: html_document date: "2024-01-28" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} require(tidyverse) require(grid) require(dplyr) require(gridExtra) require(ggpubr) require(scales) ``` ```{r} select <- dplyr::select; mutate <- dplyr::mutate;...
1d2997b29aba05def2a8568a1b3f9283643e3f91e019c9a581ce05cc0c660475
R
11,919
275
--- title: "Optic Nerve: Oligos" author: "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 --- ```{r setup, include=FALS...
c4edf02abf529d89b5267ad47de1aea91726d4b730e6b388a10420e9459b50a9
R
11,926
373
#' @name DEPRECATED-read.jdx #' @concept moved to hySpc.read.jdx #' #' @title (DEPRECATED) #' JCAMP-DX import for Shimadzu library spectra #' #' @description #' This function is **deprecated** and will be removed in the next release #' of \pkg{hyperSpec} package. #' Please use function `hySpc.read.jdx::read_jd...
8001304b6975783f235cf196fc1b1c54cd3c89b03fb0ba0d0868b807dc1156cb
R
11,930
179
###Script 11 #Normalize and Integrate Libraries (neurons only) library(Seurat) library(SeuratWrappers) library(sctransform) library(dplyr) #load data neuM02 <- readRDS("raw_matrices/neuM02.rds") %>% CreateSeuratObject(project = "neuM02") neuM03 <- readRDS("raw_matrices/neuM03.rds") %>% CreateSeuratObject(...
b674a8ab45b15bf34bb0005250c6f2f0da22545664de6e71815627a0c15a009e
R
11,939
291
source(codes.makepath("autofocus/Frontend_Modules.R")) library(networkD3) library(htmlwidgets) suppressPackageStartupMessages(library(MetBrewer)) suppressPackageStartupMessages(library(plotly)) suppressPackageStartupMessages(library(shiny)) suppressPackageStartupMessages(library(igraph)) suppressPackageStartupMessages(...
fdec0a7ad0ba6338f359bdd5b40a11fa9cd63c44dd1239de7af3c12cf21ef74b
R
11,939
327
--- title: "R Notebook" output: html_document: self_contained: no params: seed: 42 nPerms: 10000 editor_options: chunk_output_type: console --- ```{r} library(tidyverse) library(ggbeeswarm) library(ptestr) library(ggpubr) library(rstatix) library(eegUtils) ``` # LOADING FILES ```{r eval=FALSE, include...
4f2d258828ecc5709c0d7bb88f90d886eaaa9e8b76996c1c91fdecab2439f251
R
11,941
529
--- title: "SEFL10e3_Retraining_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::op...
933cbd524a862494e42288ef4aa90ae3d046a3fa969c41fbd11ec4ff8c135797
R
12,000
347
#========================================================================================# # Author: James M Roe, Ph.D. # Center for Lifespan Changes in Brain and Cognition, University of Oslo # # Purpose: prepare individual-specific slopes in longitudinal AD-control data (ADNI) for ML # Script requires indivi...
63c6d47cb17a9babcc78828608a8d27def20b3482dbb4549d960488a4cd9800e
R
12,079
324
# Auteur : Rihab AZMANI # script Zhang data (R) rm(list=ls()) library(tidyverse) library(dplyr) library(stats) library(ggplot2) library(RColorBrewer) library(S4Vectors) setwd("/home/orlab/Desktop/Rihab/DatasetZhangEtal/") Mydata <- read.table("listOligo.csv" , header = T , sep <- "," , dec = ".") str...
5de549acb29b9811f8a402d500359749c6ed60ea9d0ad6bac8f2a2c195aab6f1
R
12,083
292
#' Generating_simulation_data #' #' A function that generates simulated data. This function is used to generate simulated experimental data and #' save the results to a file.And the directory path for the output result is the current folder #' #' @param spot_spatial_count A vector representing the UMI count of each cel...
bd9818bd564b9e415aadb8e411fe0f4856eec87ec805f4d1f7f93fe88b3d95d8
R
12,096
294
--- title: "TEBC pre-discharge faecal samples: ordination (PCoA of bray-curtis dissimilarity)" author: - "Kadi Vaher" - "Code to derive principal coordinates of microbiota community composition from 16S rRNA gene sequencing data" - "This tutorial was used as an example:" - "https://ourcodingclub.github.io/tuto...
7d235aae72b6bdaceb387c4c5350671aa7eb410c476dedb32151240dc0d65f51
R
12,158
380
#' @name DEPRECATED-wlconv #' @concept deprecated #' #' @title (DEPRECATED) #' Convert different wavelength units #' #' @description #' These \pkg{hyperSpec} functions are **deprecated** and not maintained any #' more. You should not use these. #' Currently they are present due to back-compatibility reasons and ...
a2dc9dfc5b71c012e4debf27c4efbc59d4cd6705c64150f7937d467491f52cb0
R
12,175
237
--- title: "Example analyses with VertexWiseR - Example 3" author: "Charly H. A. Billaud" date: "2026-10-19" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Example analyses with VertexWiseR - Example 3} %\VignetteEngine{rmarkdown::render} %\VignetteEncoding{UTF-8} bibliography: references.bib -...
53f04c344f90897dc2491f2c16b29e5535dc2539695e20df5e7bcd79adbfd91b
R
12,177
337
#' Read data from a directory of feather files. From library(scrattch.io) #' #' @param feather_dir Directory containing feather files. #' @param genes Genes to read #' @param group_by desc_bases to use for grouping samples #' @param group_ids ID values to use for filtering #' #' @export get_feather_data <- function(fea...
7eabc280bf9eb50bcc24ca6f68dd73fedc6a10ac3a0afb3d886f91b900b51740
R
12,184
329
library(clusterProfiler) library(tidyverse) library(assertthat) library(SeuratDisk) library(Seurat) library(tidyquant) library(extrafont) load(file.path("data", "v5_reference_mapped_all_filtered.RData")) all$group[all$group == "MF"] <- "BMDM" all$group <- factor(all$group, levels = c("PBS","T","NK","BMDM")) ##subset ...
0687f0408c133a1ec301aceb458b797a5db6c19ac87643c7626e07720f244480
R
12,221
352
# Optional generic preliminaries: graphics.off() # This closes all of R's graphics windows. rm(list=ls()) # Careful! This clears all of R's memory! #------------------------------------------------------------------------------- # Load rjags library and the wiener module library(runjags) library(rjags) library(loo) ...
8d8ed344533e7fad590c8aa120279b7092c54f243e071759fa0a85ad4f45b94e
R
12,234
240
boxQuants <- c(0.01,0.25,0.5,0.75,0.99) quantQuants <- c(0.01,0.1,0.2,0.3,0.4) plotModelComp <- function(sigDat, quantDat, boxDat, eventDat, baseDat, TitleDat, modelDat, altModelDat=NULL, numModelVals=20){ pseudoQuants <- seq(1/numModelVals,1-(1/numModelVals), ...
7e3ab5d33ea75a720188703fb6cd8fc6a30864d4fd0925593df2433ef44f73ba
R
12,257
206
#Convert h5ad object to a Seurat object Convert("/path/to/file/adata_merged_raw.h5ad", dest = "h5seurat", overwrite = TRUE) LongCovid_seu <- LoadH5Seurat("/path/to/file/adata_merged_raw.h5seurat", meta.data = FALSE, misc = FALSE) LongCovid_seu nCount = colSums(x = LongCovid_seu, slot = "counts") # nCount_RNA nFeature...
2a0a0ef1203bbbfec4180d260c24de0b0ef2b6a29f82aa05dda53d537784e5d9
R
12,273
248
#' @title Decode surface data #' #' @description Correlates the significant clusters of an earlier vertex-wise analysis with a database of task-based fMRI and voxel-based morphometric statistical maps and associate them with relevant key words. Decoding currently works with surfaces in fsaverage5 space only." #' #' @de...
534127a8696f25450f1a464e855f0838163dc7101d83c1c897c6599482e4bf25
R
12,275
403
--- # For vignette --------------------------------------------------------------- title: Unstable Laser Emission subtitle: "Example Workflow for Time-Series Spectra Dataset `laser`" description: "laser: Example workflow for time-series spectra dataset `laser`." # Authors --------------------------------------...
b1d258f8089f9002e55e7b7b8c845814114047c3b9ff0d6ec39658e42b7e3165
R
12,294
356
#' Get node label #' #' Gets the label of a node. The label is the molecule name if the node is a leaf. The label is #' the cluster number, BIC and p-value if the node is internal. #' #' @param R R struct object. #' @param i The index of the module to be labeled. #' #' @return Label of node i. #' #' @noRd get_node_labe...