sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
701c4ea6c3381452d50530488bedcfed895586bf53519d245dd775fc1584fa86 | R | 10,838 | 380 | library(uwot)
library(RSpectra)
context("load/save model")
test_that("can save and load simple model", {
set.seed(1337)
model <- umap(iris10,
n_neighbors = 4, n_epochs = 2, init = "spca",
metric = "euclidean", verbose = FALSE, n_threads = 0,
ret_model = TRUE
)
mod_fname <- tempfile(tmpdir = tempdi... |
72757a767a943a87afd1a4474558fa733a6087b14aa0898a674f19e7fa6783ec | R | 10,852 | 239 |
##################################################################################################
# Created by D.M.T. on AUGUST 2021
##################################################################################################
# ... |
c9e2543e0508ebbfb4b0bd20eb44b0a6c62d332df6c893d4c3acb984acfee479 | R | 11,033 | 190 | library(uwot)
context("perplexity")
# Full neighbor values based on comparison with smallvis results
iris10_nn10 <- dist_nn(stats::dist(iris10), k = 10)
P_symm <- matrix(c(
0.000000e+00, 0.0022956859, 0.0022079944, 0.0004763074, 4.338953e-02, 1.822079e-02, 0.002913239, 0.0413498285, 5.184416e-05, 0.004134502,
2.2... |
03294087be1fab76fbcc4b6b42338ebabd39b5366d47b1bf3229f9e1d0ffcfb6 | R | 11,058 | 234 | log <- file(snakemake@log[[1]], open = "wt")
sink(log)
sink(log, type = "message")
message("CONFIGURATION STEP")
# A. Parameters:
# 1. Load libraries.
suppressMessages(library("Seurat"))
suppressMessages(library("dplyr"))
suppressMessages(library("data.table"))
suppressMessages(library("reticulate"))
suppressMessage... |
69246460d1cade79624d906dee75b63ad30a9789935b928bb0430808bc6a39d4 | R | 11,087 | 408 | ---
title: "Initial RNAseq analysis"
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
#Load the edgeR and statmod libraries
library("edgeR")
library("statmod")
#import data matrix
# tidyverse core packages
library(tibble)
library(dplyr)
library(tidyr)
library(readr)
library(st... |
f33a822a31b31ad11d7dcb0d9c1c4547537276a47a1d28bdf8aedd5c25560adc | R | 11,202 | 233 | #' Iteratively reweighted least squares (IRLS) procedure in CS-CORE (Rcpp)
#'
#' Estimate and test cell-type-specific co-expression using the IRLS procedure with optional covariate adjustment.
#'
#' Let \eqn{x_{ij}} denote the UMI count of gene \eqn{j} in cell \eqn{i};
#' \eqn{s_i} denote the sequencing depth;
#' \eqn{... |
d3ec168660395aa9b94e9b8570ed37a9524ff21a9a875d37504adb98275730cb | R | 11,284 | 341 | library(tidyverse)
library(yardstick)
library(ggpubr)
library(cowplot)
library(sqldf)
library(sinaplot)
library(dplyr)
library(ggforce)
# code for figure 2
#=======================================================================
# Comparing n-eff predicted to n-eff natural (scatter plots)
#===========================... |
8675990a47a87290be80b959d382a73181b0f1b8974d97d91edf1664ca5f424f | R | 11,471 | 202 |
# Load libraries
library(reshape)
library(Seurat)
library(monocle)
library(viridis)
# Use arguments:
args<-commandArgs(TRUE)
D <- as.integer(args[1])
# Load data from Seurat object:
Seurat.object <- readRDS(file = "seurat.object_clustered.rds")
# Separate into components:
counts.data <- as(as.matrix(Seurat.object... |
1f4f80f948bdfed845d6f9f68c330b613b150017c9bfb17c4ac8a106c6b28198 | R | 11,651 | 358 | ---
title: "Sub-cortical Cortical Stats Split by Hemisphere"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
keep_md: yes
---
# Sub-cortical Cortical Stats Left and Right
This analysis tries to combine timeseries data from PINT outputs with subcortical timeseries to ask two questions
1. "Ext... |
a1447f83ffe0efed25fba60e2446f5869302df1e0872a4a300bbec6107a0eff3 | R | 11,674 | 356 | library(uwot)
context("Smooth kNN distances")
flatmat <- function(x, nr) {
as.vector(t(matrix(x, nrow = nr)))
}
### C++ tests
nn_8 <- find_nn(iris10, k = 8)
nbrs8 <- ncol(nn_8$dist)
target8 <- log2(nbrs8)
res <-
smooth_knn_distances_parallel(
as.vector(t(nn_8$dist)),
nn_ptr = nbrs8,
skip_first = TRUE,... |
77bbe1dab4e4468f6e6f7f4f77d41309b95bdef77b65b11a5be64e748b3f7b0e | R | 11,735 | 165 | ---
title: "Supplementary Information 1: SingleR overview"
output:
html_document:
toc: true
toc_depth: 3
fig_caption: yes
code_folding: hide
bibliography: Citations.bib
---
```{r setup, include=FALSE,warning=F}
knitr::opts_chunk$set(echo = TRUE)
library(knitr)
library(reshape2)
l... |
124fe3ac201d63f545c7458ae36f7fe0110666b232035a8c968580e7890a2fb9 | R | 11,835 | 164 | #!/usr/bin/env Rscript
###
# The MIT License
#
# Copyright (C) 2017-2025 Giulio Genovese
#
# Author: Giulio Genovese <giulio.genovese@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the... |
33e3c0d0d9852756a15ebfbedf20dc29a82187da8a6f4edbfd028a23bc780812 | R | 11,888 | 310 | # VTK ops
library(Morpho)
# read mesh
# need to make it adaptive to read both tupples & single point per line
read_VTK<-function(VTK_path) {
VTK_file<-read.csv(VTK_path,header=F,sep=" ",stringsAsFactors=FALSE) #read in the block of points
VTK_points<-as.numeric(VTK_file[which(VTK_file[1]=="POINTS"),2])
V... |
721c5ec557deeb93c812f759f0bacf27813497c3247d07ac75cde5147540eab2 | R | 12,043 | 273 | #Figure 4 Plots
#4A - Western blots
#4B - Western blot quantification
library(ggplot2)
library(scales)
library(tidyverse)
library(ggpubr)
#Define colors
hex <- hue_pal()(5)
#Load data
oxphos <- read.csv("~/Desktop/Purcell 2023 dataset/Fig. 4/mouse_oxphos_blots.csv")
oxphos$Complex <- factor(oxphos$Complex, levels ... |
33fe8565cde25b57dfd573b00ba215edf92aa766960c9978e857b2439cea3da4 | R | 12,061 | 274 | ---
title: "Sulcal Depth stats"
output:
html_document:
keep_md: TRUE
---
### Loading in Subject Lists and Demographics
```{r}
demographics <- read.csv("/projects/dmiranda/NEWallSubjects_completeData3_DM_not_sexmatched.csv",header = T)
ASDD_sub <- read.csv("/projects/dmiranda/sulc/subjects/subjects_ASDD.csv",... |
520ef8d76811a0ec39d8f2451170fd7fa8610a4ff8f453e80b5ef2ca4afe1f10 | R | 12,137 | 238 | ---
title: "Patch-seq QC assessment for manuscript"
output: html_notebook
---
Use the package patchSeqQC to assign QC scores (and in particular a contamination score) for each cell. To do this, we load the patchSeqQC library and then follow the relevant aspects of the tutorial here: https://github.com/PavlidisLa... |
2f3a0df1639610c7892aa9630a696689a5e04167dc7e256331a51f5489e5064e | R | 12,147 | 384 | ---
title: "Mangle the phenotypic data"
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
# Mangle participant demographics
#### Note: this chapter uses the resticted (unshared) phenotypic data. So can only be run on a CAMH computer..
We output the file `data/processed/pheno/simple_pheno_20200221.csv` which is carrier... |
55799aca813e679c78e91a65603bbdd5168594b9d875165e551d83ef9dffb861 | R | 12,191 | 347 | #' Build locus zoom plots using Gviz for top 10
#' significant peaks
# req'd pkgs
x <- c("Gviz", "GenomicRanges", "rtracklayer",
"Rsamtools", "GenomicAlignments",
"dplyr", "data.table", "Cairo",
"splitstackshape", "tidyr", "biomaRt",
"ggplot2")
sapply(x, library, character.only = TRUE)
C... |
b218920d08aa97cb6e67622814830afa09138457765d8156ffdc6cf6e3939744 | R | 12,221 | 454 | .bundled_registry <- .new_registry(
release = "1.4.0",
index_sha256 = "ef83679266af9fcbb9ea194acdfb9bb6c380b440a574fc2ee7292899c5102909",
index_url = paste0(
"https://github.com/jolars/datamonger/releases/download/",
"registry-v1.4.0/index.json"
)
)
.default_catalog_url <- paste0(
"https://raw.githubu... |
adb237cff9b9b31e74b594b32ea69e0817612cc5c911bbfd04aeea5477ad648b | R | 12,540 | 304 | ---
title: "Metric Learning with UMAP"
subtitle: "Supervised UMAP"
---
Among other things, UMAP provides two interesting extensions to its basic
dimensionality reduction. First, it can do a supervised embedding, where
labels (or numeric values) are leveraged so that similar points are closer
together than they would ... |
646862c14197129fc1490620d271175b01b809b66b7bdaf576de5e86c6ab8e0a | R | 12,617 | 385 | ---
title: "Cortial-cortical Stats with Schafer Atlas"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
keep_md: yes
---
# Cortical-cortical results
Checking how the cortical-cortical stats change with adding surfaced based analyses and PINT
```{r}
library(tidyverse)
library(broom)
library(kn... |
333fdaf9bfdb1ce43473200e724e32917cce5c44927847f69192dd3b369af58d | R | 12,680 | 341 | library(shiny)
library(SingleR)
library(dendextend)
library(Matrix)
library(canvasXpress)
library(corrplot)
library(ggplot2)
library(matrixStats)
library(plyr)
library(reshape)
library(dplyr)
library(htmlwidgets)
library(pheatmap)
library(Seurat)
#library(psych)
#library(gplots)
library(RColorBrewer)
#library(shinysk... |
03bbfad0402170c4cc8a54c43c609e1f54851de9a5dd8006812810817e2fff1c | R | 12,893 | 249 | categorizer <- function(curr.data, no.cuts) {
for (i in 1:ncol(curr.data)){
if (length(unique(curr.data[[i]])) <= no.cuts){
curr.data[[i]] <- as.character(curr.data[[i]])
} else {
next
}
}
return(curr.data)
}
categorical_tokenizer <- function(curr.data, startColIdx = 2, prefix = ''){
fo... |
ae65b8435ed1d16368ac9839bbf8e38fce8f5e0cc2fe99d863fba0899ee3530e | R | 12,962 | 466 | ---
title: "Hub_Analysis"
author: "Brett Hale"
date: "10/10/2022"
output: html_document
---
```{r}
library(dbplyr)
library(devtools)
library(dplyr)
library(ggplot2)
library(ggridges)
library(ggdensity)
library(ggpubr)
```
```{r}
##Final prediction
hub_equation <- read.csv("/Volumes/USB20FD/PhD Research/Chapter_2/h... |
126db6922620dd242690ec2950f665dad1f2172682e010c11b678b81d767cfee | R | 13,077 | 415 | # comparing neff predicted vs. neff natural across different box sizes for similarity group (60-80%)
library(tidyverse)
library(cowplot)
library(broom)
library(ggforce)
# useful function for getting mean and standard of deviation (for violin plots):
data_summary <- function(x) {
m <- mean(x)
ymin <- m-sd(x)
ymax... |
d38ea66deeacc08fee43c8220436e1944b5d687e914852f8b5d1c8f06edab68a | R | 13,180 | 299 | ---
title: "Differential co-expression with CS-CORE"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Differential co-expression with CS-CORE}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```... |
d141cd862b6f6d17bcdc1ae2b71a335166d6f53d86bdf1983889d72c6c1f985e | R | 13,240 | 438 | library(uwot)
library(RSpectra)
context("Transform")
diagonal1s <- as(Matrix::drop0(diag(1, nrow(V_asymm), ncol(V_asymm))), "generalMatrix")
graph <- V_asymm + diagonal1s
dV <- as.matrix(graph)
vdV <- as.vector(t(dV))
dgraph <- matrix(vdV[vdV > 0], byrow = TRUE, nrow = 10)
dgraph <- apply(dgraph, 1, function(x) {
so... |
7728aa12b010291edfe59f288d52f5db0144bc523d56f84aa46b3df6a2908cac | R | 13,351 | 225 | #!/usr/bin/env Rscript
suppressMessages(library(plyr))
suppressMessages(library(dplyr))
suppressMessages(library(data.table))
suppressMessages(library(ggplot2))
suppressMessages(library(ggrepel))
annotate <- function(expression, annotated_expression){
# annotate circRNAs if possible
if("circBaseID" %in% colnam... |
ee3c7049740011453e36a25451cc593eaec38128298c52dfbcf52eb0ef15eb40 | R | 13,670 | 333 | #' Plot a scatter plot of a single cell vs. a reference sample
#'
#' @param sc_data the single-cell RNA-seq data set as a matrix with genes as rownames.
#' @param cell_id a number of the single cell to use
#' @param ref the reference dataset with genes as rownames. Gene names must be in the same format as the single ce... |
90e2ed8be4bb77c64b4285386baf78c415e58a87dccff84d406b894cd6d0c283 | R | 13,747 | 312 | # helpers for reading files
#' read a meants file generated by PINT of ciftify_meants
#'
#' @param filepath the full path to the file
#'
#' @return a dataframe where rows are rois and colums are timepoints
read_meants_csv <- function(filepath) {
meants <-read_csv(filepath,
col_names = FALSE,
... |
3cd74e9501314b69359f0ba8d8b5bf9b4e01e72a175b18558cf7f0e2f8f5dab5 | R | 13,839 | 390 | library(biomaRt)
library(ComplexHeatmap)
library(corrr)
library(data.table)
library(dendextend)
library(DESeq2)
library(doParallel)
library(foreach)
library(ggplot2)
library(ggrepel)
library(gplots)
library(gtools)
library(Hmisc)
library(MASS)
library(RColorBrewer)
library(readxl)
library(RUVSeq)
library(scales)
librar... |
d6fc342f7e4d4fb34041abd25ae5ff99aa59c6873a762c225cfdc2c6d95d0c50 | R | 13,906 | 334 | ---
title: "Locally Scaled Neighbors"
date: "December 26 2024"
---
## Introduction
In their paper on
[Self-Tuning Spectral Clustering](https://papers.nips.cc/paper_files/paper/2004/hash/40173ea48d9567f1f393b20c855bb40b-Abstract.html),
Zelnik-Manor and Perona describe a method of local scaling to determining the
aff... |
42231b50fad2c6e70593c0a34b10d8f75a1ef585c66763a1b54838532cc923a4 | R | 13,929 | 445 | library(tidyverse)
library(cowplot)
library(ggforce)
# misprediction analysis (what amino acids are more likely to be mispredicted)
# set working directory to: "Desktop/Natural_var_project/"
# loading data
cnn_data <- read.csv(file = "./data/PSICOV_box_20/output/cnn_wt_max_freq.csv", header=TRUE, sep=",")
natural_dat... |
8066d4f3c874d4f9c3173dd02b3459a3b156a14ecd4347be202bf7242c8932e1 | R | 13,990 | 223 | #!/usr/bin/env Rscript
###
# The MIT License
#
# Copyright (C) 2017-2025 Giulio Genovese
#
# Author: Giulio Genovese <giulio.genovese@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the... |
9a5bbaa3500f61d68fdd5751df04634206202b392da5963fe693e1c9616a8fb0 | R | 14,164 | 317 | ---
title: "Fine-tuning UMAP Visualizations"
---
If you look at the UMAP
[examples](https://jlmelville.github.io/uwot/articles/umap-examples.html), it's clear
that the default settings aren't always appropriate for some datasets: it's
easy to get results where the clusters are very spaced out relative to their
sizes,... |
6095c55c95cc99b7446fa542d1dfa036e5d7dd70cb6fa9d6cb56b470430c15f9 | R | 14,306 | 364 | ---
title: "KEGG"
author: "Asela Wijeratne"
date: '2022-06-25'
output: html_document
---
```{r setup, include=FALSE}
library(clusterProfiler)
library(dplyr)
library(tidyverse)
library(ggvenn)
library(pathview)
```
###getting data
```{r}
##all genes with differentially expressed genes labelled
DEseq_norm_all <- read... |
7ad3503b0ab4e841f25a547c3d35d409df6aa7cad698d4c0b5de23669aaa22dc | R | 14,507 | 398 | library(biomaRt)
library(ComplexHeatmap)
library(corrr)
library(data.table)
library(dendextend)
library(DESeq2)
library(doParallel)
library(foreach)
library(ggplot2)
library(ggrepel)
library(gplots)
library(gtools)
library(Hmisc)
library(MASS)
library(RColorBrewer)
library(readxl)
library(RUVSeq)
library(scales)
librar... |
13068afaa35214dbc253ff2f267453d62c64bc282ebd97a948661a73fc32baa6 | R | 14,529 | 346 | #############################################
##### Load packages, set theme
#############################################
packages <- c("readxl", "ggplot2", "reshape2", "landscapemetrics", "dplyr", "rstatix")
for(i in 1:NROW(packages)){
if(!require(packages[i], character.only = TRUE)){
install.packages(pac... |
d6d43d9f565970e08857dba439200162d9952b81ea8e0b0b4c90e654d5338421 | R | 14,574 | 445 | library(tidyverse)
library(cowplot)
# figure 3.
box_size <- "20"
# heat maps.
# set working directory to: "Desktop/Natural_var_project/"
# loading data
cnn_data <- read.csv(file = paste0("./data/PSICOV_box_",box_size,"/output/cnn_wt_max_freq.csv"), header=TRUE, sep=",")
natural_data <- read.csv(file = paste0("./d... |
f5591369288112065c96b4c7f2f03b04f7ac88612eb9bea2a6318b3ca52f040c | R | 14,584 | 360 | #!/usr/bin/env Rscript
if(!require(pacman)) install.packages("pacman", repos = "http://cran.us.r-project.org")
pacman::p_load(SPONGE, argparser, data.table, dplyr, ggplot2, reshape2, stringr, VennDiagram, Biostrings, MetBrewer)
args = commandArgs(trailingOnly = T)
parser <- arg_parser("Argument parser for SPONGE ana... |
03518e39ad7b4be14b3770c0d5d9bce6e8e0fc92ebd0b281808d132bcf4a29a3 | R | 14,639 | 473 | library(tidyverse)
library(cowplot)
library(broom)
#===============================================================================================
# Looking how predicted amino acid distributions relate to CNN confidence
#===============================================================================================... |
628b30c34b7f5cbfd4c55f940fe4f5ebef0bf8d0df7d31b397a87284aada9780 | R | 15,185 | 367 | ---
#==========================================================================================================================
title: "Neuronal Differentiation Paracet scATACSeq p2Glinksd20.p200 "
author: "Ankush Sharma"
date: "`r Sys.Date()`"
output: html_document
Description: This script analyzes the peak2genelinks ... |
2ce47aa70fe2c0e444316c1db2a50e853a752e9a6ebd90bb074f628b4032449c | R | 15,244 | 453 | library(tidyverse)
library(cowplot)
# figure 3.
# heat maps.
font_size <- 10
# set working directory to: "Desktop/Natural_var_project/"
# loading data
cnn_data <- read.csv(file = "./data/PSICOV_box_20/output/cnn_wt_max_freq.csv", header=TRUE, sep=",")
natural_data <- read.csv(file = "./data/PSICOV_box_20/output/n... |
fb39e355339f531bb8191e15b6a3f5bcf187f9af43cfd42f9b6a04909d934e87 | R | 15,454 | 455 |
# title: "Análisis ICr 482N1"
# author: "Carolina Hernández Oliver"
# date: "4/25/2023"
# Loading libraries
library("Seurat")
library("dplyr")
library("data.table")
library("reticulate")
library("ggplot2")
library("stringr")
library("Matrix")
library("patchwork")
library("clustree")
library("scCATCH")
library("harmo... |
c8ffd1323a0c6b505b080b7e4fc19eaefaba8b2f0f771c8c84b326132a49171f | R | 15,463 | 351 | library(data.table)
library(readxl)
library(stringr)
setwd('/Volumes/ncatssctl/NGS_related/BulkRNA/ISB025/')
files <- as.data.table(readxl::read_xlsx('ISB025_lane_concatenating.xlsx', sheet=1))
samples <- unique(files$Sample)
# ~~~~~~~PC_siRNA~~~~~~~~-------------------
setwd('/Volumes/ncatssctl/NGS_related/BulkRNA/... |
eb49cf573f848139ecf2001974e74c7352a1029cbd6788ce94d0a410414b0a6d | R | 15,569 | 389 | ---
title: "uwot"
output:
rmarkdown::html_vignette:
fig_width: 4
fig_height: 4
vignette: >
%\VignetteIndexEntry{uwot}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r setup}
library(uwot)
li... |
c9dcb4183c03b07272c31689cf30fa96ffb3bb6f318b9ffa3d7c820214f2235f | R | 15,638 | 563 | find_nn <- function(X, k, include_self = TRUE, method = "fnn",
metric = "euclidean",
n_trees = 50, search_k = 2 * k * n_trees,
nn_args = nn_args,
tmpdir = tempdir(),
n_threads = NULL,
n_build_threads ... |
5aa7583eff2e524bcf6e626dad501fe7ddaf83d0a9840fcb5da705d73a0b184a | R | 16,008 | 106 | ### This script creates a dataset containing cortical thickness values of all subjects of interest (CamCAN data)
### and concatenates with frequency-specific global MEG connectivity
### Written and modified by Christina Stier, 2021/2022
### R Studio 3.6.3 (2020-02-29)
### RStudio 2021.09.0+351 "Ghost Orchid" Release ... |
0acff385f54f7aafab2422479b5d2edb41ad492f8e46573419517bd0b6586db1 | R | 16,019 | 106 | ### This script creates a dataset containing cortical thickness values of all subjects of interest (CamCAN data)
### and concatenates with frequency-specific global MEG power
### Written and modified by Christina Stier, 2021/2022
### R Studio 3.6.3 (2020-02-29)
### RStudio 2021.09.0+351 "Ghost Orchid" Release (077589... |
e745368dfd4324d7b8fd733c4acffee945bb483a2afd3f80952e0cf71e3ab9c8 | R | 16,038 | 445 | library(tidyverse)
library(cowplot)
library(ggforce)
#===============================================================================
# Analysis for protein engineering applications.
#===============================================================================
# Looking at sites where WT has low prob and max_prob i... |
9f2a49948eb43098c92038bd51b3c33b32c4906b19f24d6a3567f620dc75467e | R | 16,542 | 542 | ---
title: "checking completion"
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
# Check completion and add MR QA
This section of the code checks to make sure that we have preprocessed data available for all expected partcipants.
Then, for participants with more than one run/session of bold data it picks the best ru... |
583baffe28f9256c5c5956ae748510980ea015626a09aa7a1dd9128fdddb7b4a | R | 16,576 | 448 | library(tidyverse)
library(cowplot)
library(ggforce)
# I will make a figure of accuracy as a function of box size.
cnn_data_12 <- read.csv(file = "./data/PSICOV_box_12/output/cnn_wt_max_freq.csv", header=TRUE, sep=",")
cnn_data_20 <- read.csv(file = "./data/PSICOV_box_20/output/cnn_wt_max_freq.csv", header=TRUE, sep=... |
eefd125194b27752c84fc9502047e1cefea09d7d23ad2708f2c719370ae343b8 | R | 16,600 | 436 | library(data.table)
library(readxl)
library(stringr)
library(DESeq2)
library(RUVSeq)
library(Hmisc)
library(RColorBrewer)
library(scales)
library(ComplexHeatmap)
library(MASS)
library(corrr)
load('/Volumes/ncatssctl/NGS_related/BulkRNA/ISB003_HV2FJBBXX/ISB003.LAday0-7.DDS.RData')
#View(as.data.frame(dds@colData))
LA... |
0237832a3441370ccec4906059eef69c8c13745ce95c24c69fb9254dffd28c31 | R | 16,873 | 398 | ---
#==========================================================================================================================
title: "Neuronal Differentiation Paracet scATACSeq p2Glinksd20.p100 "
author: "Ankush Sharma"
date: "`r Sys.Date()`"
output: html_document
Description: This script analyzes the peak2genelinks ... |
9c231617c059aa1a9d4c0ed654473e00fa0a9cf248009aeb1535a31e26b5a7e0 | R | 16,912 | 452 | ---
title: "ABIDEI PINT FC mat stats"
author: "Erin W Dickie, Saba Shahab"
date: "January 15, 2018"
output:
pdf_document: default
html_document: default
---
This is an analysis of the FC Mats - 8mm
```{r, message = F, error=FALSE}
library(dplyr)
library(tidyr)
library(broom)
library(igraph)
library(knitr)
library... |
71cda8b84a973aa84dcb526ed8dfd513d61fa24df5b8cfbd6c85aba56e59af46 | R | 17,047 | 452 | ---
title: "Sub-cortical Cortical Stats Split by Hemisphere"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
keep_md: yes
---
# Sub-cortical Cortical Stats Left and Right
This analysis tries to combine timeseries data from PINT outputs with subcortical timeseries to ask two questions
1. "Ext... |
1dc2a2ea5c48db6b854629a6f4ea369348846dbf8c0b4f8957038c08a65d207e | R | 17,207 | 388 | ---
title: "Introduction to CellBench"
author: "Shian Su"
date: "`r Sys.Date()`"
output: BiocStyle::html_document
vignette: >
%\VignetteIndexEntry{Introduction}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
library(CellBench)
library(limma)
library(dplyr)
library(purrr)... |
416faa071f0adfc396a03a782be2f13ffa3180c1c3092eda15396666fc527d5b | R | 17,317 | 374 | ---
title: "lvish"
---
## A LargeVis-ish method
The [LargeVis](https://arxiv.org/abs/1602.00370) method (see also its
[github](https://github.com/lferry007/LargeVis)), is in many respects a bridge
between t-SNE and UMAP. It's sufficiently close to UMAP that `uwot`
also offers a LargeVis-like method, `lvish`:
```R
#... |
995791fd84392a5b66c731291f1bfbd363292b18b582820904b3406fdbda5745 | R | 17,342 | 535 | ---
title: "Run clinical against FC scores"
output:
html_document:
keep_md: true
---
```{r}
knitr::opts_chunk$set(dev = "png", dev.args = list(type = "cairo-png"))
```
```{r}
library(tidyverse)
library(here)
library(broom)
```
```{r}
knitr::opts_chunk$set(dev = "png", dev.args = list(type = "cairo-png"))
```
No... |
5364336d6b2008b61f1574f36233947dc565a487d46752e2e45351ba1cbabcf0 | R | 17,378 | 534 | ---
title: "Using HNSW for nearest neighbors"
subtitle: "It's a (Hierarchical Navigable) Small World After All"
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```
# HNSW for nearest neighbors
The Hierachical Navigable Small World (HNSW) method for finding app... |
2b011491aa2250129c00a864e95c49135740904729026f5fb10a3a30911f65da | R | 17,465 | 498 | ---
title: "Cortial-cortical Stats"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
keep_md: yes
---
# Cortical-cortical results
Checking how the cortical-cortical stats change with adding surfaced based analyses and PINT
```{r}
library(tidyverse)
library(broom)
library(knitr)
library(cowplo... |
2a75e919625b3ee3a6b9dc023f9245f08de558efbaf301479e43c6336067cebd | R | 17,614 | 404 |
library(Morpho)
library(Rvcg)
library(rgl)
library(caret)
library(mixOmics)
library(fsbrain)
library(RVAideMemoire)
library(doParallel)
source("VTK_ops.R")
########## set values and load data ##########
# freesurfer DIR
subjects_dir = "~/data4/FTD_Lund/ftd_subjects_FS6/"
# folder which corres... |
7f8ed6ba707e329e1d4a52946d62b46234d2e0be8f12ea4381559d7a7371741b | R | 17,882 | 274 | ---
title: "User Guide"
author: "Kenneth Condon"
date: "`r Sys.Date()`"
output:
html_document:
number_sections: true
theme: cerulean
highlight: default
toc: TRUE
toc_depth: 3
toc_float:
collapsed: TRUE
smooth_scroll: FALSE
vignette: >
%\Vi... |
7f13c51564ba97d979be0101ff081503e7370d9846cbbfeff0808200f2d9f1f9 | R | 17,898 | 416 | ---
title: "UMAP for t-SNE"
---
*January 1 2020:* I used to say that "the
[UMAP paper](https://arxiv.org/abs/1802.03426v1) does not go into much
implementation detail." That was true of the first version of the paper, but
the [second version](https://arxiv.org/abs/1802.03426v2) adds an appendix that
covers most of t... |
ddd50897da4e25cfa84b5bca4d2fb96dc315984a1633163118652d86d3f5e9ec | R | 18,126 | 493 | ---
title: "ABIDEI PINT FC mat stats"
author: "Erin W Dickie, Saba Shahab"
date: "January 15, 2018"
output:
html_document:
toc: true
keep_md : true
---
This is an analysis of the FC Mats - 8mm
```{r, message = F, error=FALSE}
library(dplyr)
library(tidyr)
library(broom)
library(igraph)
library(knitr)
librar... |
f225b5de592f9899d7a450dd8ccd4e872512f57db0fec9fc0745ea9869898434 | R | 18,285 | 564 | ---
title: "Run clinical against FC scores"
output:
html_document:
keep_md: true
---
```{r}
knitr::opts_chunk$set(dev = "png", dev.args = list(type = "cairo-png"))
```
```{r}
library(tidyverse)
library(here)
library(broom)
```
```{r}
knitr::opts_chunk$set(dev = "png", dev.args = list(type = "cairo-png"))
```
No... |
590bb411f7e7333b8c9c21af38e255d10579e41d0356e2faac269f23cc960c23 | R | 18,585 | 645 | .selected_registry <- function(registry) registry %||% active_registry()
.selected_cache_dir <- function(cache_dir) datamonger_cache_dir(cache_dir)
.dataset_artifacts <- function(dataset) {
artifacts <- .require_array(dataset$artifacts, "dataset artifacts")
lapply(artifacts, .require_object, field = "artifact")
}... |
21943838e83a28231d52579d1e469a237f56f2c9fd15089a0df685e5a7f36b04 | R | 19,337 | 292 | ---
title: "PaCMAP Comparison"
subtitle: Making UMAP behave (more) like PaCMAP
---
## Introduction
PaCMAP ([paper](https://jmlr.org/papers/v22/20-1061.html),
[repo](https://github.com/YingfanWang/PaCMAP)) is a highly-regarded
dimensionality method, firmly in the LargeVis/UMAP family. It's main point of
differentiati... |
cdd2ece602c4e318cea8cf123af1e92159ea021f60d5f48fae1aef2cf6f109b7 | R | 19,404 | 545 | ---
title: "Using rnndescent for nearest neighbors"
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```
This is a companion article to the [HNSW article](https://jlmelville.github.io/uwot/articles/hnsw-umap.html)
about how to use nearest neighbor data from othe... |
bdca097fa57176f59b2803bf759afb5d2d2196b26f1bc4f708aa73d23374deb4 | R | 19,942 | 379 | ---
title: "Python Comparison"
subtitle: "and some nearest neighbor comparisons"
---
This page is a gallery of images comparing the output of `uwot` version 0.1.3
to the [Python `UMAP` package](https://github.com/lmcinnes/umap) version 0.3.8.
In an ideal world, this wouldn't be a very exciting document, as it would e... |
f4097548d6556ee0771e386e2a2fefde5fd8b25d847d4d3c39a4bf4f16b110cc | R | 19,951 | 562 | ---
title: "Striatum Cortical Stats"
output:
html_document:
keep_md: TRUE
---
Going to Start Loading saba's PINT data
```{r message=FALSE, warning=FALSE}
library(dplyr)
library(tidyr)
library(readr)
library(broom)
library(igraph)
library(stringr)
library(tibble)
library(purrr)
library(ggplot2)
library(knitr)
`... |
4692a9c5519db00819a359762a7544c3a97a67eab74c382fc4562dd2f3acbf90 | R | 20,729 | 620 | # this program bins by solvent accessibility and calculates amino acid distributions for each bin
library(tidyverse)
library(cowplot)
library(broom)
library(ggplot2)
library(colorspace)
fills <- c("#990008", "#0a2575", "#b35900", "#1a6600", "#5c0679", "#9e9e2e")
calc_class <- function(x) {
aliphatic = c("M", "L", ... |
b92cb944aa9f04bb8ae2bc3d83d8b9587a05a6f8aa32ad2d16a7bc5a4e0ddf74 | R | 21,081 | 650 | # continuation of figure 2.
# comparing neff predicted vs. neff natural across different alignments similarities.
library(tidyverse)
library(cowplot)
library(broom)
library(stats)
box_size = "20"
# useful function for getting mean and standard of deviation (for violin plots):
data_summary <- function(x) {
m <- me... |
a7fa5cc51d89d769c72dde32c401173c2263fba6c85aa6784aab7a1e1d0040a2 | R | 21,176 | 567 | ---
#==========================================================================================================================
title: "Neuronal Differentiation Paracet scATACSeq p2Glinksd0Ctrls "
author: "Ankush Sharma"
date: "`r Sys.Date()`"
output: html_document
Description: This script analyzes the peak2genelinks a... |
5ed1103e472d4cdfeb5c0b3481b5857c85dbfed21b968244bfbb5b40c597fd70 | R | 21,179 | 594 | ---
title: "Sub-cortical Cortical Stats"
output:
html_document:
keep_md: TRUE
---
# Sub-cortical Cortical Stats
This analysis tries to combine timeseries data from PINT outputs with subcortical timeseries to ask two questions
1. "External" validation of PINT. If PINT is indeed helping us better target meaningf... |
f022b2356af9b9ec9ce66d9e8a20f2053ea4a3c4d30dde4f2198539b361bcb44 | R | 21,321 | 606 | library(tidyverse)
library(yardstick)
library(dplyr)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(tidyr)
library(sqldf)
library(sinaplot)
library(ggforce)
cnn_data <- read.csv(file="./cnn_wt_max_freq.csv", header=TRUE, sep=",")
natural_data <- read.csv(file = "./natural_max_freq.csv", header=TRUE, sep=","... |
db0ff9720ae87b3b02fd5206dad1e71b5eb51f70bdff00392da14014d710ab8b | R | 21,980 | 511 | ---
title: "Initialization"
---
*December 27 2024*: Updated to use `umap2` and with better images.
## Introduction
The default initialization for UMAP uses the eigenvectors of a normalized graph
Laplacian of the sparse affinity matrix. This normally works well except when:
* The graph has disconnected components, i... |
625660436290dd520917fbdc7ae71f46ce9d522f6d3b04ca599cc32c0b4bbdde | R | 22,084 | 388 | library(Seurat)
library(ggplot2)
#latest human organoid object
sub_obj2 <- readRDS(file = "~/Desktop/Purcell 2023 dataset/scRNA-seq Seurat Objects/sub_obj2.rds")
sub_obj2@meta.data$genotype <- factor(x = sub_obj2@meta.data$genotype, levels = c("Control", "3q29Del"))
sub_obj2@meta.data$timepoint <- factor(x = sub_obj2@... |
c802c31f01806a05f15d4cc89c41c31720352c0e773634b4ee8b575a084b3ca7 | R | 22,090 | 474 | ###################################################################################################################
## Filename: modT.R
## Created: June 16, 2016
## Authors: Karsten Krug, DR Mani
##
## Purpose: Make functions written by D. R. Mani accessible via Shiny.
##
## The file contains function to perform modera... |
29cc7e4b89211d4949c324f12ce20394929cc47149411db79eb0042f13128d21 | R | 22,255 | 419 | # file: ichorCNA.R
# authors: Gavin Ha, Ph.D.
# Fred Hutch
# contact: <gha@fredhutch.org>
#
# Justin Rhoades
# Broad Institute
# contact: <rhoades@broadinstitute.org>
# ichorCNA: https://github.com/broadinstitute/ichorCNA
# date: July 24, 2019
# description: Hidden Markov model (HMM) to a... |
50f605d3113313812edf739d7fe4bd41e12f71e1fb5f02431ce2cefae07f0a3a | R | 22,369 | 355 | #!/usr/bin/env Rscript
###
# The MIT License
#
# Copyright (C) 2017-2025 Giulio Genovese
#
# Author: Giulio Genovese <giulio.genovese@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the... |
a4d0df8c3104ad37aad84f9a24ef5287406c32026fb6493e8818881db52ea6b0 | R | 22,412 | 730 | # Laplacian Eigenmap (Belkin & Niyogi, 2002)
# Original formulation solves the generalized eigenvalue problem of the
# unnormalized graph Laplacian: L v = lambda D v, where L = D - A
# and uses the bottom eigenvectors v that result
# (ignoring the constant eigenvector associated with the smallest eigenvalue).
#
# This ... |
68c53f728fbe45fc4a07963bf225fb4b16ba0bbfa00d335d4c3940e6574b26a0 | R | 22,428 | 779 | library(uwot)
library(RSpectra)
context("neighbors")
i10nn4dist <- matrix(c(
0, 0.1414214, 0.1732051, 0.4690416,
0, 0.1732051, 0.3000000, 0.3316625,
0, 0.2449490, 0.2645751, 0.3000000,
0, 0.2449490, 0.3000000, 0.3162278,
0, 0.1414214, 0.2236068, 0.4582576,
0, 0.6164414, 0.6164414, 0.7000000,
0, 0.2645751... |
46acc231a51ba344358c6ba3a09bb10923a5bdb40858cf168a96921ba8ff2c48 | R | 22,557 | 454 | ---
title: "UMAP Examples"
---
# Introduction
*December 26 2024*: Images have been (mainly) reworked so that they make better
use of the space in the tables and are aligned more consistently allowing an
easier comparison of how UMAP and t-SNE differ. The t-SNE output is also
improved. I also use more default setting... |
0d80024e8fe48a5128a8fd0fda1fd4ef1020f988e90258c59239f0f41e7dcc68 | R | 23,406 | 500 | ---
title: "UMAP with Mutual Nearest Neighbors"
subtitle: "The Balanced Mutual Nearest Neighbors Graph"
date: "December 25 2024"
---
## Introduction
Traditionally, dimensionality reduction methods make use of the k-nearest
neighbors graph but there are some exceptions:
[Trimap](https://github.com/eamid/trimap) and
[... |
12f324fd6416447809045a6b6977a850214c0d8ae4d897bdca7d685965bddc95 | R | 23,435 | 538 | ##Figure 3 Code
library(Seurat)
library(ggplot2)
library(VennDiagram)
library(GeneOverlap)
#latest human organoid object
sub_obj2 <- readRDS(file = "~/Desktop/Purcell 2023 dataset/scRNA-seq Seurat Objects/sub_obj2.rds")
sub_obj2@meta.data$genotype <- factor(x = sub_obj2@meta.data$genotype, levels = c("Control", "3q29... |
e631db0e7f03e66cf4369787715bc789876dad67bad62fadd7bb5cb123edcebf | R | 24,175 | 596 | #### Julia and Michael Code for gray space paper ######
#SES and green spaces and resting state for seeds from the default mode network
#and specific ROI (amygdala). Using covariates like
#ADI, walkability, air pollution, and basic demographics.
#percentage of impenetrable surface areas such as rooftops, roads, or pa... |
6b570cf5767e120e6e7c59290ab4e576a8bcb8965bbd74d9fffdf6312d2f690a | R | 24,437 | 544 | #' SingleR fine-tuning function. Takes top scores per cell type, finds variable genes in the
#' reference dataset for those cell types and recalculates the scores. This is performed until
#' only one cell type is left.
#'
#' @param sc_data the single-cell RNA-seq data set as a matrix with genes as rownames. If the dat... |
d9eb6e12622b433242c27b08bb2445bcbe0750dd8cfa219bd2f51bfc1ecbb480 | R | 25,069 | 387 | ---
title: "SingleR 1.0 - Method overview and examples"
output:
#html_document:
# code_folding: hide
pdf_document:
toc: true
toc_depth: 3
bibliography: Citations.bib
---
```{r setup, include=FALSE,warning=F}
knitr::opts_chunk$set(echo = TRUE)
library(knitr)
library(reshape2)
library(ggplot2)
li... |
8ce2994da7d2e6ea20395647694bd8c1a7ae5c1414830cd126b47f2edde7b0fd | R | 25,121 | 666 |
#' ggplot theme in scAI
#'
#' @return
#' @export
#'
#' @examples
#' @importFrom ggplot2 theme_classic element_rect theme element_blank element_line element_text
scAI_theme_opts <- function() {
theme(strip.background = element_rect(colour = "white", fill = "white")) +
theme_classic() +
theme(panel.border = el... |
91b702c8975ea34a11ef40903be7f9be591ff8586959f97a65efbcdfbd4d58b9 | R | 27,123 | 518 | ---
title: "Supplementary Information 2: Benchmarking *SingleR*"
output:
html_document:
toc: true
toc_depth: 3
fig_caption: yes
code_folding: hide
bibliography: Citations.bib
---
```{r setup, include=FALSE,warning=F}
knitr::opts_chunk$set(echo = TRUE)
library(knitr)
library(reshape2)... |
4cc01953f2b9da338f03019d52e157dbbfbfa5eedd7db86f8fb6b1b3d24ddd45 | R | 29,702 | 1,031 | options(shiny.maxRequestSize=30*1024^2)
source("pairwise_intersect.R")
#sever code
shinyServer(function(input, output, session) {
library(RColorBrewer)
library(htmlwidgets)
library(gplots)
library(dendextend)
#====================================================#
## Venn module ####
#============... |
d21550953c2ec105aa0c4450996d28427f7a947152d3e6d0e0d9fdb45806580d | R | 30,126 | 823 | ---
title: "Sub-cortical Cortical Stats Split by Hemisphere"
output:
html_document:
keep_md: TRUE
---
# Sub-cortical Cortical Stats Left and Right
This analysis tries to combine timeseries data from PINT outputs with subcortical timeseries to ask two questions
1. "External" validation of PINT. If PINT is indee... |
71b11af74b76266f0fd7733dd067d7472d088ebd660a62d6590772b0643ec8dd | R | 31,164 | 673 | library(DESeq2)
library(data.table)
library(RUVSeq) # http://bioconductor.org/packages/release/bioc/vignettes/RUVSeq/inst/doc/RUVSeq.pdf
library(EDASeq)
library(readxl)
library(Hmisc)
library(parallel)
library(foreach)
library(doParallel)
library(stringr)
# ~~~~~~~~~~~~~~PC siRNA~~~~~~~~~~~~~~--------------
setwd("/Vol... |
ef4b5df18f94e7023819c4bee1e8fc412f95a7b3feea4500b9de1edd9b92426c | R | 31,455 | 702 | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
# http://shiny.rstudio.com/
#
#library(DT)
source("helpers.R")
# Define UI for application that draws a histogram
ui <- fluidPage(
tags$head(HT... |
38391ec4b6ee16f41b43116e1d14f7629d1c878b278c5e53f1c856bf0a3a3e90 | R | 33,390 | 770 | library(RColorBrewer)
library(reshape2)
library(SingleR)
library(pheatmap)
library(ggplot2)
library(ggpubr)
library(grid)
library(Seurat)
library(corrplot)
library(DeconRNASeq)
library(RColorBrewer)
path.data = '~/Documents/SingleR/package/SingleR/manuscript_figures/FiguresData/'
path.out = '~/Documents/SingleR/packa... |
f989f5a73b57e6de1231ac58232119f6fa81cdc2668663b8b24e02389329f7d1 | R | 33,509 | 975 | ---
title: "Working with Sparse Data"
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```
## Text Analysis of the 20 Newsgroups Dataset
A great use case for working with sparse data is TF-IDF text analysis. Despite
the prevalence of deep-learning-based text em... |
14908acad8b1a5354b3b28dd2d09e1a4ba911a3950524b0cde308a4b11b9fb24 | R | 34,366 | 607 | #!/usr/bin/env Rscript
if(!require(pacman)) install.packages("pacman", repos = "http://cran.us.r-project.org")
pacman::p_load(SPONGE, doParallel, foreach, dplyr,
argparser, visNetwork, MetBrewer,
pheatmap, ggplot2, reshape2, ggpubr)
########################
## GENERAL FUNCTIONS ###
#####... |
36cf979229d21d5a02281a0512755ad211ca2074d0dc481ef0147b5654a1333d | R | 35,678 | 971 | #' Add New Points to an Existing Embedding
#'
#' Carry out an embedding of new data using an existing embedding. Requires
#' using the result of calling \code{\link{umap}} or \code{\link{tumap}} with
#' \code{ret_model = TRUE}.
#'
#' Note that some settings are incompatible with the production of a UMAP model
#' via \c... |
176575cfd875d679406950cdc21ce0cf5775646964de31e9c6f3ca9eefc0485f | R | 35,777 | 1,131 | library(uwot)
library(RSpectra)
context("API output")
set.seed(1337)
# No way to compare with the Python implementation due to differences in
# random number implementations as well as floating point comparison
# and various architecture differences. So we'll just check that the output
# is ok
res <- umap(iris10,
n_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.