sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
91aec8b163bc800259b70983b40745c073053a71c019eca600b86de7d1f50f81 | R | 8,000 | 207 | #PCA
#http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#R_clustering
#http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#clustering_pca
#http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/My_R_Scripts/my.colorFct.R
args<-commandArgs(TRUE)
genome_species_list = sprintf("%s", args[1])
vir_taxa_file = sp... |
bbbbc7a02a95cbe3c49523ed509a15e62a63c833ee1a56c34d732bc240ab1af8 | R | 8,024 | 175 | ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
# Parameter settings
##### ##### ##### ##### ##### ##### ##### ##### ##### #####
setwd(file.path(getwd(), "R"))
source("00_directorySettings.R") # load baseDir <- "/WORKING_DIR"; xeniumDir <- "/XENIUM_DIR"
source("00_settings.R")
dataDir <- file.path(baseDir,... |
a065f8c13afc1df40361b9cd4b9fd07d91ab95a5de30bb3eb8be82f7429670a1 | R | 8,031 | 215 | suppressPackageStartupMessages({
library(dplyr)
library(purrr)
library(stringr)
library(tidyr)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Training")) &&
dir.exists(file.path(curren... |
0d516fd4725727f23d0ff147d311f00bdffb9df4a27f23a4794fcab792e454ca | R | 8,033 | 108 | tab_driver <- tabPanel("Driver search",icon = icon("search"),
useShinyFeedback(),
includeCSS("styles.css"),
sidebarLayout(
sidebarPanel(width = 3,
sp... |
e86a16f56b9a17d02393b796e1d4a873a5266fe6973e41657a8ef5612f032ccc | R | 8,037 | 288 |
# Validation of temporal mapping schemes for Dl-GAL4 dataset
rm(list=ls())
library(ape)
library(dplyr)
library(tidyr)
library(purrr)
library(stringr)
library(ggplot2)
library(readr)
library(phangorn)
load('~/.../data/Phylotime/Phylotime_PosteriorMidgut.RData')
# Collect trees from the workspace
... |
d95a24d78788ece57613d87129a40b5e5c1a6dd3ccc7f2dec0c3ea464daa84ba | R | 8,040 | 186 | # keep QTLs whose eGene match to Enhancer/promoter-linked Gene
library(data.table)
library(dplyr)
library(GenomicRanges)
source("pci_snATAC_peakSet_w_Enh.R")
colors.ct <- c(ArchR::ArchRPalettes$stallion[c(1,5,3,11)], "#b9a802","#308ac4")
names(colors.ct) <- c("ast","mg","IN","EX","odc","opc")
outp <- "/geschwindlabsha... |
672ae56640ab25a89a803531da6c4e59ee5459384fa16c42c51c5c03d90354b4 | R | 8,047 | 154 | library(dplyr)
library(pheatmap)
library(Cairo)
library(ComplexHeatmap)
library(ggplot2)
library(dplyr)
library(tidyr)
########### Correlation coefficient ##########
# MOUSE
input_file <- paste0("/home/joonho345/1_Epilepsy_RNA/RNA_Human/10.Correlation/04.CellType_Matrix/01.Correlation_Epileptogenesis_Allcelltype_1.txt... |
a333e4c30f2df117767c7321a4356eb011216ea2674ed20b32ee6d7c862373c7 | R | 8,058 | 223 | #' Read skeletons for segments by extracting from the corresponding zip file(s)
#'
#' @param x A vector of segment ids or any Neuroglancer scene specification that
#' includes segments ids (see examples and \code{\link{ngl_segments}} for
#' details).
#' @param voxdims The voxel dimensions in nm of the skeletonised ... |
b702e46329a0cef623305514ad2833da2c40bd5a728874751a9c147e5a30b6e4 | R | 8,059 | 255 | ---
title: "mlflow: R interface for MLflow"
output:
github_document:
fig_width: 9
fig_height: 5
---
[](https://cran.r-project.org/package=mlflow)
```{r setup, include=FALSE}
knitr::opts_chunk$set(fig.path = "tools/readme/", dev = "png")
```
-... |
895e2765fd413fd025812e1237d74cdb458589e63572ccd885eb49e9d33302da | R | 8,060 | 199 | #' Semi-automated annotation of query clusters
#'
#' This function provides a semi-automated approach for annotating query clusters.
#' Users are prompted to manually assign names to clusters based on visualizations
#' of marker-based or marker-free data.
#'
#' @param ann An object containing SAHA analysis results.
#' ... |
9533d04a012402afc77b07c28c6bede7848ae6074a9975d8473ba7fbc78319c9 | R | 8,073 | 167 | # function to calculate spatial signaling score (S3) and scaled spatial signaling score (scaled S3)
# input: mFISH seurat object, with cell identities columns, assay, slots, networks, shortlist cell identity pairs and ligand-receptor pairs
# output: mFISH seurat object with spatial signaling score (S3) and scaled spati... |
d23145ca70456cceb3a8b7631e23b4915d501aeeefc52556beaccf8c523ce6a6 | R | 8,076 | 240 | ---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "90%"
)
library("badger")
```
# ggVennDiagram
<!-- badges: start -->
`r badge_c... |
2d1ab2594241bb77d830751c48cfe69c5fdfba90d1be7045b9f1c055b02c4f6f | R | 8,079 | 267 | #' Query FlyWire level 2 cache attributes
#'
#' @param rootid One or more FlyWire root ids defining a segment. Supply either
#' \code{rootid} or \code{l2ids}.
#' @param l2ids Optional vector of level 2 ids to query directly. Supply either
#' \code{rootid} or \code{l2ids}.
#' @param attributes Optional character vec... |
c09222230582840880507aaace9a50d2192cde8bc47cf71bad4ac3e558d49543 | R | 8,083 | 205 |
###Filter to only keep lipids that are detected in at least half of the samples####=========================================================
##Convert 0 value to NA
##Count number of NAs, filter to only keep the number of NA < 1/2 of sample size
filter.func <- function(norm.df, smpl.size){
Norm_filter <- norm.df
N... |
29f7374af31dc041ee5a4fd992299c22ace0d30379e8dee7a7a9977716aa1874 | R | 8,089 | 192 | #####################################################################
# Brain Tissue cis-eQTL Analysis Pipeline
#####################################################################
# This script performs cis-eQTL analysis for brain tissue.
# It processes expression and genotype data to:
# 1. Perform cross-validat... |
fa2f0990f20195bcaca4321d624658c53da3b954e678ffc3871f05bbf0ecb026 | R | 8,095 | 169 | ##############################
### Run ArchR analyses on CARE IDH-mutant multiome data (48 samples)
### Author: Kevin Johnson
##############################
# ArchR creates several directories automatically when creating arrow files and ArchR projects.
workdir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut/results/ata... |
169df9b2c8aabb331615b529c41fe87c1a127a95b36bee838ce20abb88925cc5 | R | 8,097 | 202 | ### -------------------------------------------------------------------------------
rm(list = ls())
library(tidyverse)
library(ggthemes)
library("scales")
library(ggpubr)
library(ggbeeswarm)
library(stringi)
library(openxlsx)
library(eulerr)
## ------------------------------------------------------------------------... |
85203302bd317448186055d8cb4836f6518cef2f92f24a09b8fd97dc64a20849 | R | 8,105 | 256 |
## Organize brain cell type lipidomics data from Fitzner et al., 2020
### https://www.sciencedirect.com/science/article/pii/S2211124720311219#app2
```{r setup, echo=FALSE, warning=FALSE, message=FALSE}
rm(list=ls())
library(tidyverse)
library(ggpubr)
library(ggthemes)
library(RColorBrewer)
library(ggrepel)
library(st... |
51a8c652a4bef3879d024db0bc9c3be633fe913b68123575962a523cbccd71da | R | 8,107 | 233 | #' Visualize the correlation of layer modeling t-statistics with ComplexHeatmap
#'
#' This function makes a ComplexHeatmap from the correlation matrix
#' between a reference and query modeling statistics from [layer_stat_cor()].
#' For example, between the query statistics from a set of cell cluster/types
#' derived fr... |
eaf08e79dbff24cf0602532fb98bcfbd9d1686aa44085994a979b5304d2c7b7e | R | 8,109 | 212 | ###############################################################################
## GSEA Plot Regeneration ##
## Uses checkpointed GSEA results - NO recalculation needed ##
###############################################################################
... |
70936a718a948a74236de2ce94d540f1d6d36fc7e3579d1553ad6763dfc55cf0 | R | 8,114 | 221 | manc_last_modified <- function(ids, node='neutu', ...) {
ids <- manc_ids(ids, integer64 = T)
node=manc_nodespec(node)
u=manc_serverurl('api/node/%s/%s/lastmod/%s', node, "segmentation", ids)
l=pbapply::pbsapply(u, .manc_last_modified, simplify = F, ...)
df=list2df(l)
colnames(df)=gsub(" ", "_", colnames(df)... |
a6a9a273e0e9e73d57d530ac21f7e8d99dfe00f2c01e73cf0d91e408768b3281 | R | 8,124 | 272 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(lme4)
library(ggseg)
library(patchwork)
library(here)
library(glue)
library(patchwork)
library(tidymodels)
source(here("src", "R", "plot_ggseg_brain.R"))
source(here("src", "R", "run_lda_performance.R"))
source(... |
9039c1f4f9b91c0428fdd2bd717df9157455d697054ab51124c1e548cdd7fff6 | R | 8,139 | 214 | setwd("C:/Users/kaitl/OneDrive - The Pennsylvania State University/Scanner Heterogeneity Project/Atlas Parcellation")
library(RNifti)
library(modeest)
library(writexl)
#### Change Working Directory if Necessary ####
#setwd("~/FC-Network-Replicability-Effects")
# Set atlas parcellation directory path
base_directory <... |
7ac39321ad902ca95f9df545a0ef9b563d74ff7f4a68855c9041ea82b9d3804d | R | 8,142 | 164 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
07a6e7a7ff1bc4fe1a8a141042171ca704dbc0b513e8fab8020a1add0b6470a1 | R | 8,145 | 168 | ---
title: "Seurat_neural_annotations_final"
output: html_document
date: "2025-07-09"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load libraries
```{r}
library(ggplot2)
library(dplyr)
library(Seurat)
library(scCustomize)
# Make it so my computer can actually run this code
# options(future.... |
a370739320bcfedb008fcd3829d78b568369b8474a1cf37032ef9861d1f45819 | R | 8,152 | 230 | #!/usr/bin/env Rscript
# ======================== #
# Auto setup & parsing #
# ======================== #
req_cran <- c("optparse","data.table","dplyr","stringr","tibble","purrr","Biostrings","GenomicRanges","rtracklayer")
req_bioc <- c("gkmSVM","BSgenome","BSgenome.Hsapiens.UCSC.hg38","BSgenome.Hsapiens.UCSC.hg3... |
f8de358af0c3501c0bdb894774db27c87c85ab8e5db312d0bb397853e65b4086 | R | 8,156 | 271 | library(DESeq2)
library(data.table)
library(RColorBrewer)
library(stringr)
library(pheatmap)
library(apeglm)
library(ggsci)
library(dplyr)
library(xfun)
library(ComplexHeatmap)
library(circlize)
### SETUP ###
# Project name here:
project_name <- "ISB038"
# Set the output directory (to hold the files created by this ... |
6a72e1beecb6db39f4a15465bb8d63b88062ae3f28fc93b12fafa2d61bdcac43 | R | 8,159 | 108 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/070e363b-83b5-4e33-8705-734e5268b84f ####
##... |
c3ece085418c64d662b739f97a63d35d5225718fb9f705be159da38f848cfb07 | R | 8,174 | 181 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# Jacobs, Jonathan P., et al. "A disease-associated microbial
# and metabolomics state in relatives of pediatric inflammatory
# bowel disease patients." Cellular and molecular
# gastroentero... |
550797cab5b1847b0bf2c7796e1bf57292f4c281f15131a5d5eede222ca48037 | R | 8,177 | 215 | # ==============================================================================
# Load External Datasets
# ==============================================================================
# This script loads external datasets (TCGA, MSK, CCLE, etc.)
#
# Author: Osama Shiraz Shah
# =======================================... |
e50c063e4704f5314905c713ce59c0d0604d90fcd532c358ebf92689d0489239 | R | 8,180 | 193 | # Hai Wang
# Test the association between importance scores and TF binding sites
library(GenomicRanges)
library(BSgenome.Zmays.ENSEMBLPLANT.4.41.1)
library(data.table)
library(reshape2)
library(ggplot2)
library(dplyr)
# Define a function to load peak files
load_peaks <- function(temp_file){
print(temp_... |
fb44859c18b2220228c8425bed670c6a5c87a6178b8fe1110871204387bfef64 | R | 8,193 | 167 | ##################################
# Derive and annotate Myeloid MPs for CAREmut dataset
# Author: Kevin Johnson
# Date: 2026.03.30
##################################
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir <- file.path(proj_dir, "figures")
out_data_dir <- file.path(proj_dir, "processe... |
3d2b439287864ff9dd1d77f9fb3b85bb8cba89af713d0410ec5c4165ab5d8392 | R | 8,201 | 211 | #' banc-calculate-l2-metrics — Merge per-neuron L2 + split metrics into a single feather.
#'
#' Extracted columns: `l2_nodes`, `l2_cable_length_um`, `pd_width`, `segregation_index`.
#'
#' @section Reads:
#' - per-neuron L2 + split metric CSVs (from `banc-l2.R` / `banc-calculate-split.R`)
#'
#' @section Writes:
#' -... |
52819fa6bfef5c98e1c7fafcc34ecdc4c0badedc7ae95c505d1311ea52944e14 | R | 8,209 | 238 | #!/usr/bin/env Rscript
# Isoform switch and alternative splicing analysis pipeline
# Requirements:
# - R >= 4.x with BiocManager
# - IsoformSwitchAnalyzeR, matrixStats, Biostrings
# - Salmon isoform-level quantifications per sample in ./quants/
# - sampleInfo.csv with SampleID, condition/Comments, sex
# - Tr... |
62d3a2f3208c26bd40bd6b84b7120724b7a65dc207d8089d2f24e19747d92bd1 | R | 8,212 | 145 | #!/usr/bin/env -S pixi run --manifest-path /app/pixi.toml Rscript
options(stringsAsFactors=F)
## load R libraries
#library(SAIGE, lib.loc="../../install_dir/0.38")
#library(SAIGE, lib.loc="../../install_dir/0.36.6")
#library(SAIGE, lib.loc="/net/hunt/zhowei/project/imbalancedCaseCtrlMixedModel/Rpackage_SPAGMMAT/insta... |
263f3082e73c8e51cc21390245113923a94b4b41ced7986af372cb5ff7667e42 | R | 8,215 | 208 | # Load required libraries
library(ggplot2)
library(readr)
library(dplyr)
library(tidyr)
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# Load data
df <- read_tsv("Brain Extraction Data and Stats - Raw Data Updated Anonymized.tsv")
# Clean up column ... |
907a26075b4f1ef91b6fdc257f54138402769fe979bcbd2c35bb71e0d7f6f192 | R | 8,217 | 224 | library(Matrix)
#use epistasis modeling results to test for interactions on the residue
binding_interactions = function(){
usefolder = "output/binding_epistasis_epistasis_none_onefold_deltawuhan_fixscale/"
indf = read.csv(paste0(usefolder, "combined_binding.csv"))
residue = indf$preds - indf$actual
dists = ... |
e88a1e873d92cf4f6d926acc8b2855a2ddeed4d0a40e86327f386c3e65cce674 | R | 8,226 | 213 | # Utils for databricks authentication
new_mlflow_client.mlflow_databricks <- function(tracking_uri) {
profile <- tracking_uri$path
# make sure we can read the config
new_mlflow_client_impl(
get_host_creds = function() {
get_databricks_config(profile)
},
get_cli_env = function() {
databric... |
a858ee644655b7266470360b3d07087d84f69b9db89fbbdaf5f9d824078d9da9 | R | 8,231 | 155 | ##############################
### Assess chromatin gene activity (ATAC) across time points (init. vs recur.) controlled for RNA state
### Author: Kevin Johnson
##############################
## Longitudinal per-patient analysis of differential gene chromatin accessibility per cell state
workdir <- "/vast/palmer/pi/v... |
b6e79094eecb6e7102ed7134cc957f7e9bfd004dddf5596a60de260374a2225c | R | 8,234 | 240 | ## Trying a new method for neighbourhood analysis
library(igraph)
library(Seurat)
library(patchwork)
library(FNN)
library(ggplot2)
library(pheatmap)
library(MetBrewer)
## load data
data_dir <- '/cephfs/scratch/bruening_scratch/gdowsett/data/nodomap/'
spatial<-readRDS(paste0(data_dir, 'nodose_st_RCTD_paramrelax_251025... |
71024939e1ab53843d5fb6d31baf8b9e81eedbb5488a5b4cbbb72340eb4b9465 | R | 8,237 | 367 | ---
title: "Add probes to comb-p results"
author:
- David lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: pygments
theme: lumen
toc: true
number_sections: true
df_print: paged
code_download: false
... |
e69def1e9b11cb4b05b6aa0d3a916e3f8f14211f29952dbc84235083c96fc05f | R | 8,241 | 170 | #!/usr/bin/env Rscript
################################################
################################################
## LOAD LIBRARIES ##
################################################
################################################
library(optparse)
library(ggplot2)
library(reshape... |
fbb930c68c9f0f25223268292590f0853377a901cf3954e05db2b600980f938c | R | 8,252 | 248 | library(survival)
library(rlang)
library(tidyverse)
library(qs)
library(prettyunits)
library(GseaVis)
library(decoupleR)
library(impute)
library(limma)
library(clusterProfiler)
library(org.Hs.eg.db)
library(BSgenome.Hsapiens.UCSC.hg19)
library(tidyverse)
library(ReactomePA)
library(viridis)
surv_df = qread('data/CPTAC... |
4e3cbc0d2f90eadc0cb65539eb71cbb8d36fcd47b411116f2b04a9e94229f5ce | R | 8,261 | 263 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(lme4)
library(ggseg)
library(patchwork)
library(here)
library(glue)
library(ggsegJHU)
source(here("src", "R", "plot_ggseg_brain.R"))
source(here("src", "R", "run_lda_workflow.R"))
# Data I/O ------------------... |
b95ca7158730fd5d0d47849b1f46e641b354f5d141ee9194b2bda128384006ac | R | 8,270 | 205 | # =============================================================================
# Figure 3 — Model 1: NFB Self-Regulation Learning
# =============================================================================
#
# Paper: ReFOFA (NCOMMS-24-11279)
# DV: diffPSC (FFA − OFA percent signal change during regulation), s... |
412fdb91b9cf634b1a0f6be7b8f24ca7cf6dd832635f221afae182b19b7547cf | R | 8,271 | 138 | #' Summarize jackknife statistics
#'
#' Calculates the estimate and confidence interval of a module-level statistic based on all values obtained by jackknifing the module.
#'
#' To gain information about the confidence of various statistics, jackknifing can be used: each member gene of a module is removed and the stati... |
e121731f24056d24adfd7cf232031a922065cd5dca74966eccf97b7e9b2f0521 | R | 8,271 | 183 | volcanoPlot = function( dat,
key_columns = c(pvalue="dropout_rate_diff_pvalue", fdr="dropout_rate_diff_fdr", effect_size="dropout_rate_diff_estimate"),
fdr_cutoff=0.1,
relative_effect_size = TRUE,
key_targets_minus = NA,
key_targets_plus = NA,
show_key_target_symbols = TRUE,
... |
94a04bc2fa5ce41b68b05773260cffa1f5c3fed62ff151d8d9c63792b85d855e | R | 8,295 | 184 | library(dplyr)
## ortholog ##
Target_set <- Target_genes
Target_set <- Target_genes_recurrent
ortholog_file <- "/home/joonho345/resources/GeneSet/Orthologs/One2one_hs_mm_17128.txt"
ortholog_file <- "/home/joonho345/resources/GeneSet/Orthologs/One2one_hs_rn_16211.txt"
ortholog_file <- "/home/joonho345/resources/GeneSe... |
b13520b4aa0867693eef22487593157b38ef09ebe4646e760d339209cd731aa4 | R | 8,298 | 188 | ##
##Load regNet package
##
#- See https://github.com/seifemi/regNet for details how to install regNet.
library( regNet )
##
##Set the following paths according to your system
##
#- Must be modified to fit to your own system
#- Central project path prefix for regNet to store outputs of regNet
centralProjectPathPrefix... |
4b9a54f6e4018e1135fa749642542b51ef233172bcd8f9447b7b8425f7a72a96 | R | 8,309 | 225 | test_that("R implementation loads and initialises correctly with SQLite", {
db_path <- system.file("tests", "testthat", "toy_network_example.sqlite",
package = "influencer")
if (!file.exists(db_path)) {
db_path <- "toy_network_example.sqlite"
}
skip_if_not(file.exists(db_path), ... |
5725ce33699dc77b6d4772328960bfac6f69e335b12656679d82d821bc5a0559 | R | 8,310 | 217 | ---
title: "Analysis of Smart-Seq2 data"
output: html_notebook
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
```{r, message=FALSE, warning=FALSE}
library(pagoda2)
library(conos)
library(magrittr)
library(ggplot2)
library(pbapply)
library(tidyverse)
library(cowplot)
library(readr)
library(scrattch.io)
library(ggalluv... |
05574423ccc08c6d04fa64575216124d32cb6a4f39d70c963d419a80dbdfeffc | R | 8,311 | 180 | #' @export
#' @title Optimization of SCCAN sparseness
#'
#' @description
#' Function used to optimize SCCAN sparseness for
#' lesion to symptom mapping.
#'
#' @param lesmat lesion matrix
#' @param behavior behavior vector
#' @param mask antsImage mask
#' @param nFolds how many folds to use
#' @param sparsenessPenalty p... |
4f7b38149eb211eee0268babb78eec8978e1fc30d9fa3f8749d23d037a5ad60a | R | 8,316 | 143 | # Moderate effect size genes project
# Author: Madison Caballero
# Desription: Simulates inheritence of genes for null MES in all individuals
args = commandArgs(trailingOnly=TRUE)
# This is the simulation ID:
iteration = args[1]
# Mutation rate probabilities by gene
PROB = read.delim(file = "../infiles/gene_mut_stat... |
45aa12d9bacb877d67a3afb8a61511953985172b9bab49fc2f44362e185baa6f | R | 8,325 | 221 | #!/usr/bin/env Rscript
# ============================================================================ #
## 05_mgngtus_params_visualisations.R
## MGNGTUS Nomiki's data: visualize exemplary data for high/low parameter values.
## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025.
rm(list = l... |
69d2f853018f48831a0fdf760d387bc9c8e50746604dcf345063a0f180485baf | R | 8,328 | 160 | library(readr)
library(tidyverse)
library(dplyr)
#### import TPM Count matrix with gene id ####
adjusted_TPM_id_df_M <- read.table("/home/joonho345/1_Epilepsy_RNA/RNA_Animal/08.Enrichment/GSEA_01.Matrix_GTF/adjusted_merged_matrix_id_TPM_M.txt",
sep = "\t", header = TRUE, row.names = 1... |
b161aa34d44f1987c2f3ce9020d0e3626b9c3453f6ec79635cceedb0cb4811b1 | R | 8,336 | 353 | ---
title: "Create Miami Plot comparing CN vs MCI"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
theme: lumen
toc: true
number_sections: true
df_print: paged... |
75d290ed08f07ee49ef199d548e6bbba84e875927912b4490094bae3031a4713 | R | 8,342 | 196 | library(Seurat)
library(BPCells)
library(tibble)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(patchwork)
library(scater)
library(RColorBrewer)
library(emmeans)
library(forcats)
source("custom_function.R")
# convert to bpcells
SSE1_filtered <- readRDS("SSE1_5_seurat_final_sse7.rds")
write_matrix_dir(mat = ... |
fd49c6f7a1e4f3fa75f0e889a606662c1062b21f9d035ce7383ee73600cec0fd | R | 8,360 | 220 | # # Step.00 ----------------------------------------------------------------------
rm(list = ls())
gc(reset = T)
source('script/Functions/Functions.R')
# unload packages
pkgs[which(load.packages == F)]
rpid = Sys.getpid()
options(future.globals.maxSize = 1000 * 1024^3)
##################################################... |
5e30dd86b52a39127992a6ecdad65a688edf5b4842a6309813a6c0342abc6e03 | R | 8,363 | 208 | library(tidyverse)
library(ggpubr)
col = c("#40B0A6", "#E1BE6A")
col.grp = c("#FFC107", "#004D40", "#1E88E5")
sz = 3
df.sim = read_csv(file.path("HGF_results", "main", "ppc_data_eHGF-L21.csv")) %>%
mutate(
simulated = exp(yhat)
)
load("../data/PAL-ADHD_data.RData")
df = merge(df.tsk, df.sim) %>%
mutate(... |
98615ed9dd6ef54406ea238a76b15d21482655a493db34f243967759c3253550 | R | 8,370 | 193 | ## ============================================================================
## Stochasticity ratio comparison between two groups (NST / MST / ST)
##
## This script visualises a stochasticity-ratio metric — the Normalized
## Stochasticity Ratio (NST), Modified Stochasticity Ratio (MST), or any
## comparable index — ... |
bd8c4e69866aa4c9b3b4210e93db5379bd12972c45cd96af45d3fd1c78c6e5e2 | R | 8,371 | 163 | # wd <- '/net//mraid20//export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
library(metacell)
db_path <- file.path(wd, 'scdb')
scdb_init(db_path, force_reinit = T)
source(file.path(wd, 'scripts/util.r'))
# load(file = file.path(wd, 'output/methylation/avg_meth_all.rda'))
load(file = file.path(wd... |
c66f38f2f7ae05b2f06255f28df7cbbdf092cbb2769f20d2a109c4e0d5f06926 | R | 8,382 | 183 | # ## Has been added to AUCell, update to just wrapper
# setwd("SCENIC_mouseBrain")
# aucMat <- readRDS("int/3.4_regulonAUC.Rds")
# aucMat <- aucMat[SCENIC::onlyNonDuplicatedExtended(rownames(aucMat)),,drop=FALSE]
# emb <- readRDS("int/tSNE_AUC_05pcs_05perpl.Rds")$Y
#
# par(mfrow=c(1,2))
# tfs <- c("Dlx5", "Sox8")
# g... |
68bd907bc442dd271f76e0fa4a64d0df925f44445b8b6905bf65dcb78f02230e | R | 8,386 | 231 | library(prospect)
prospect_inversion <- function(Ref_df, sp_name , start, end, re=FALSE) {
# ==============================================================================
# Parameters:
# Ref_df : Data frame containing reflectance spectra (must include 'ID' and wavelengths as column names)
# sp_name : Specie... |
234f594185e9ce0381d65a8358da0c265c9927e3dc16b82201c68222d234fa70 | R | 8,390 | 181 | # Copied from https://github.com/cran/MendelianRandomization/blob/master/R/mr_conmix-methods.R
# HASH 1718030
#' @docType methods
#' @rdname mr_conmix
# object=mr_object
# psi=0
# CIMin=NA
# CIMax=NA
# CIStep=0.01
# alpha=0.05
mr_conmix <- function(object,
psi = 0,
CIMin = NA... |
01cc242d53a8c1676ca1f024d822439674dc373048d11d12f0b33531ae617274 | R | 8,396 | 241 | #############################
# TPM-PCA Common Outlier Selection Script
# Finds outliers common to both TPM-based and PCA-based methods
#############################
library(dplyr)
###############################################################
##################### Define Helper Functions ####################
######... |
e4aed4cc6984f6be7f34628aafa3257ceaa28f58efe1999e96e9aa77ac149eec | R | 8,396 | 247 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# Cluster DNs, using selected distance of 1.9 and... |
c0650d66fd190bc062cdcaabb9fd22578b7a70b8df26db6d080493abe06cd35c | R | 8,405 | 203 | # This script created dds object using DESeq2 library and count matrices. It also filters out genes with low expression levels.
# Upload count matrices
vcar_matrix <- read.csv("~/2023-species_comparisons/tables/star_counts/vcar_star_featureCounts.csv")
obic_matrix <- read.csv("~/2023-species_comparisons/tables/star_... |
c34f99ede6dac9a8c86d69482c936c502e1f6aaca5431941af7295f142cae0b5 | R | 8,405 | 144 | #!/usr/bin/env -S pixi run --manifest-path /app/pixi.toml Rscript
#options(stringsAsFactors=F, scipen = 999)
options(stringsAsFactors=F)
library(SAIGE)
BLASctl_installed <- require(RhpcBLASctl)
library(optparse)
library(data.table)
library(methods)
print(sessionInfo())
option_list <- list(
make_option("--vcfFile",... |
7d908b2e5b15b475874d12eafbc8fb86c31b096b10239107032b56999f57c940 | R | 8,411 | 253 | #!/usr/bin/env Rscript
suppressPackageStartupMessages({
library(Seurat)
library(MAST)
library(presto)
library(dplyr)
library(tidyr)
library(stringr)
})
# ============================================================
# Purpose
# ============================================================
# This script does... |
205709dc56ac318dd05afa01c45e99683c644ead4b16a11b72ccd47eeeff8694 | R | 8,412 | 374 | ---
title: "Download DNA methylation data, and pre-filter to normal, prefrontal data"
subtitle: "Download and pre-filter BDR data"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezed... |
434816e35211ff4511535afc6f4f50f9f3322fcada658e4151d5ce48182fd334 | R | 8,425 | 213 | # 1-20-10 Qunhua Li
#
# This program first plots correspondence curve and IDR threshold plot
# (i.e. number of selected peaks vs IDR) for each pair of sample
#
# It then performs consistency analysis on merged data
# It takes the parameters estimated from pairwise consistency analysis, and
# use the same parameters to ... |
523643f637f75d971c01d116057094b9ecd3aacacd294190380319d48b55729a | R | 8,425 | 218 | # Phase 2: 网络药理学 - 靶点KEGG通路分类
# 将538个靶点按GO/KEGG自动归属为凝血相关 vs 纤溶相关
library(clusterProfiler)
library(org.Hs.eg.db)
library(DOSE)
data_dir <- "c:/Users/huizh/Desktop/拟发表论文/活血止血/data"
results_dir <- "c:/Users/huizh/Desktop/拟发表论文/活血止血/results"
cat("============================================================\n")
cat("Phas... |
9c3ffed518ba755a02d5593f92e3ba3aadfec5fd167b88f8966c1c1a668d1c2f | R | 8,429 | 228 | # library(liquidSVM)
library(xgboost)
library(keras)
library(ranger)
#if filename is not null, model will be saved using appropriate method and return NULL
modeler = function(xin = NULL, yin = NULL, xout = NULL, filename = NULL, predict.folder = NULL, ...){
#unpack ellipses
inlist = list(...)
ml = inlist[["ml... |
48ca6f32bd8654a9fef702676f8c0fe38e9671a5ce053671d93381e81cc93725 | R | 8,431 | 147 | #' Run EGRET in R
#'
#' Description:
#' NOTE: Beta version. EGRET infers individual-specific gene regulatory networks using inidividual level data -
#' a genotype vcf file (v) and QBiC binding predictions (q) - as well as population/reference level data -
#' eQTLs (b), a m... |
17f165401e88c8107ce2216f19d2dad3a5de1c713034791e646cea1e1be9001f | R | 8,439 | 168 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
c9dfb8ca4f4f3b089ac518ed1edd0b882074c586bab35dcab86164b13028b429 | R | 8,439 | 189 | ###hotspots-----------
library(Seurat)
###海马体-----------
Excitatory <- readRDS(file = "./hippo/Excitatory_sub.rds")
names(table(Excitatory$Anno_Idents))
Inhibitory <- readRDS(file = "./hippo/Inhibitory_sub.rds")
Hippo_scRNA <- merge(x=Excitatory,y=Inhibitory)
#devtools::install_github("cellgeni/sceasy")
# library(sceas... |
84346c047013504c3fd4388a1cb3a769d800e7c627323a2e7e53a51ae3025c52 | R | 8,448 | 354 | ---
title: "Get ROSMAP data RNA and Residuals"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
theme: lumen
toc: true
number_sections: true
df_print: paged
... |
29002236731f86522471869e3c72c84343758e7c2da0201b4ff9f0dc417ab9b2 | R | 8,456 | 154 | suppressMessages(suppressWarnings({
library(Seurat)
library(dplyr)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(igraph)
require(VennDiagram)
}))
parser = argparse::ArgumentParser(description="Test paralog importance on cell marker genes")
parser$add_argument('-I','--input', hel... |
1ca11181a76e15374f503e8382ab775b3b1c31932a80bdeee5899e139ab64e88 | R | 8,462 | 248 | #####################################################################
# INGENE testing data Prediction Pipeline - Network Averaging
#####################################################################
# This script implements the final step of the INGENE pipeline where
# predictions from multiple networks are comb... |
0069b73806c378f2658a24e1fb550a4c79b73fdada5dc274d05ef69efd0cb723 | R | 8,468 | 259 | #' Adjustment to wateRmelon's BMIQ function. There is an error in taking the
#' mean of 2 values, that causes the function to sometimes crash. This fixes
#' that error.
BMIQ_adjust <- function(
beta.v,
design.v,
nL = 3,
doH = TRUE,
nfit = 50000,
th1.v = c(0.2,0.75),
th2.v = NULL,
niter ... |
c9b3d89aa0cf0d8f28dad08d9232e87db00aa53d8b7b66cc86b04f40ff3bcb73 | R | 8,489 | 338 | ---
title: "Generate bar plots for pathway analysis results"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
theme: lumen
toc: true
number_sections: true
df_pr... |
4b479329759023211f9209a319461a489df5cc9386e76199e5ce899ed8fa2569 | R | 8,503 | 124 | #' Fit (weighted) linear model between tree-based statistics
#'
#' Fits a (weighted) linear model between the total tree length and within-species diversity (in case the focus of interest is conservation and overall divergence) or between the subtree length and the diversity of a species (in case the focus of interest ... |
c3555f3d70168da74af966d2343ef8d3867c3e9ae80cce4d50c97d7b8928f25b | R | 8,525 | 180 | # Load required libraries
library(ggplot2)
library(dplyr)
# Define GO terms and colors
GO_to_analyze <- c("NI_GO0006954_882", "NI_GO0150076_87", "NI_GO0050729_153", "NI_GO0050728_173",
"NI_GO0048143_20", "NI_GO0001774_49")
GO_colors <- c(
"NI_GO0048143_20" = "#1a9850", # Deep green
"NI_GO0001... |
3b7ab0e8ef38733eb278e67b6e7c7285f607b5427c6a94eaf176628648324ed5 | R | 8,528 | 250 | #' Mirror points or other 3D objects along the MANC midline
#'
#' @details These registration functions depend on an installation of the CMTK
#' registration toolkit. See \code{\link[nat]{cmtk.bindir}} for details.
#' @param x 3D vertices (or object containing them) in MANC space with
#' \bold{units of microns}. Co... |
efcf31cf7de80d241969f14e11eedaaadbdb9259c673c2c2219b9e2769ce0cb1 | R | 8,538 | 209 | ###############################################################################
## Test Script: Pooled Dotplot with Correct Colors, Gene Ratio, and Outlines##
## ##
## Tests: ... |
a677802ed153fe2109d12e6480db513f008b63767d5e8039b5f0b4b5dc5768ec | R | 8,545 | 212 | #' @title Brunner-Munzel tests for symptom mapping (fast)
#'
#' @description
#' Lesion to symptom mapping performed on a prepared matrix.
#' Brunner-Munzel tests are performed using each column
#' of the matrix to split the behavioral scores in two
#' groups. This function relies on a compiled version for
#' fast proce... |
21e3106978fa55f2b5493c6035a01ad144b7c895d78de998f3d5c8fa37e92c30 | R | 8,551 | 227 | # ===============================================================
# Proteomics — CHCHD10 Forest Plot (AD vs NC)
# - Reads Supplementary Table S2 (PMID 40660303)
# - Red→Blue color scale (all values ≤ 0)
# - Bottom caption with Fisher meta p and missing datasets
# - Adds a "Summary (median)" row to the forest
# ==... |
19f9bd83372bd350939ce6edd16f0cabc07270742adee44aaf0f514633954d0c | R | 8,570 | 313 | # packages
setwd(Sys.getenv("HOME"))
suppressPackageStartupMessages(library(argparse))
suppressPackageStartupMessages(library(Seurat))
suppressPackageStartupMessages(library(qs))
source("R_func/mutate_load.R")
source("R_func/future_load.R")
suppressPackageStartupMessages(library(data.table))
# parameter
parser <- A... |
c902f58cf9cef517ef9868ac235f4f2a8afa3b88826154ced51379d8bf689baa | R | 8,575 | 296 | # ===============================================================
# 🧪 Table Analyzer — Analysis Coordinator
# ===============================================================
analysis_ui <- function(id) {
ns <- NS(id)
sidebarLayout(
sidebarPanel(
class = "ta-sidebar",
width = 4,
h4(class = "t... |
422a3bf9add50d61f5e5e98580df1a6d9fc77537abceff8f3f3de668f185e484 | R | 8,596 | 260 | # generate a flat table for codex
library(arrow)
source("banc/curation/banc_curation_init.R")
# get banc_meta
banc_meta <- banctable_query()
banc_meta_newIDs_filt <- banc_meta %>%
filter(is_not_empty_na(cell_ids_tag))
# load in from CSVs
crp_filepath <- "cell_representative_point_nm_wSV.csv"
cell_rep_pt <- read_... |
252706ef813c5e7bfa4116d9173ee8303d9d9f695adedea96df751ffbf0117c1 | R | 8,605 | 225 |
#' ggVennDiagram main parser
#'
#' @details
#' From version 1.4.4, `ggVennDiagram` will plot a upset plot when the number of sets
#' is more than 7. Besides, user can switch to a upset plot with `upset_plot()` function.
#' Please check the document of this function.
#'
#'
#' @param x list of items
#' @param category.... |
0599f92111c1340947a4971abbfe415bdb897a73eded29560de9348c50bcc141 | R | 8,609 | 231 | #' Save Model for MLflow
#'
#' Saves model in MLflow format that can later be used for prediction and serving. This method is
#' generic to allow package authors to save custom model types.
#'
#' @param model The model that will perform a prediction.
#' @param path Destination path where this MLflow compatible model
#'... |
64b2b0b82b3b955087ba41dad1c2095fe5a57b7bcdc81dcf0f51dc8b2e9e7c55 | R | 8,611 | 191 | ##
##Load regNet package
##
#- See https://github.com/seifemi/regNet for details how to install regNet.
library( regNet )
##
##Set the following paths according to your system
##
#- Must be modified to fit to your own system
#- Central project path prefix for regNet to store outputs of regNet
centralProjectPathPrefix... |
4331b3bdbdfd9d986c3eb7023d60932459dd6a98835d249c131741c055d46179 | R | 8,619 | 243 | # PCA plot and loadings plots
# Load libraries
library(tidyverse)
library(plotly)
library(scales)
# Set working directory
setwd("C:/Users/Owner/Desktop/ML")
# -------------------------------
# Load and combine datasets
# Time spent performing grouped behavior
behavior_data <- read.csv("behavior_time... |
6273fe9e2c0f0cc9c448b8ac53affdfa36253a93dbaa236bb5f736aecc640300 | R | 8,619 | 229 | #' Weighted Non-negative Sparse Error Recovery
#'
#' Y_\{G x J\} ~= X_\{G x K\} alpha_\{K x J\} + R_\{G x J\}
#'
#' @param Y Gene x Grid (or Spot) cpm-normalized count matrix
#' @param X Gene x Feature matrix: either (1) average expression matrix or (2) NMF feature matrix
#' @param Y.nUMI vector of UMI counts of unnorm... |
1601cad4c3f4519349a3f385d514ecb0b24073e54a93d13aabd60bd422e01503 | R | 8,629 | 190 | ##
##Load regNet package
##
#- See https://github.com/seifemi/regNet for details how to install regNet.
library( regNet )
##
##Set the following paths according to your system
##
#- Must be modified to fit to your own system
#- Central project path prefix for regNet to store outputs of regNet
centralProjectPathPrefix... |
b0b3d145eaa8b456f5b729ce13d91ff710a62eb52ad8455d7a1eeb419d4f1335 | R | 8,638 | 187 | # Load required libraries
library(ggplot2)
library(ggrepel)
library(dplyr)
# Define gene sets to analyze
gene_sets <- list(
DEG_NT = list(
genes = c("KCNE5", "KCNQ1", "KCNH8", "KCNK5", "PTGS2"),
colors = c("KCNE5" = "#e5c494", "KCNQ1" = "#66c2a5", "KCNH8" = "#8da0cb", "KCNK5" = "#fc8d62", "PTGS2" = "#4daf4a"... |
2509e1d95fc6300bc44cc232241aa25826e52d60a600e41371563e8bb9e470c5 | R | 8,642 | 151 | #' Remove gene pairs with overlapping annotations
#'
#' Removes the gene pairs (edges) that have overlapping annotations in the genomes of at least 1 species from all networks.
#'
#' Mapping and counting is problematic for overlapping genomic features: it is difficult to tell apart which read belongs to which gene. Oft... |
be42eff6567fa341a591d224c165dccb9a85837c0cd58df6b4afcbaee5138ead | R | 8,661 | 199 | library(ggplot2)
library(ggforce)
rm(list=ls())
options(digits = 4) # by default, print results to four decimal digits
set.seed(1823) #for replication - the year Trinity College was founded!
#replace the empty quotes with the file path to the location where you downloaded the files from Zenodo below
path = ''
screen... |
56da6573869eeda0ff0c779b3f7deecd5d0ea992938b21997cdebd2a05e9a6e1 | R | 8,667 | 179 | ##########################################################################################
# Plot Aesthetics Objects and Methods
##########################################################################################
#' List of color palettes that can be used in plots
#'
#' A collection of some original and some b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.