sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b9d6cba3260d7cdbae9ccf2c6231f6fbb897b0766bfbecf6b351d497048089db | R | 7,712 | 180 | # Data Preprocessing Responses (run observer models)
library(tidyverse)
library(janitor)
library(stringr)
source("functions/CountEventMarkovNoJump.R") # TP
source("functions/CountEventBernoulliNoJump.R") # IF
source("functions/CountEventBernoulliAlternationNoJump.R") # AF
# Auditory | Vestibular | Visual
df_auditory... |
8998412a26b5f047187fac9169e971629e83df4362c5d8ea01f94fdc6e03d67d | R | 7,748 | 180 | #' @title
#' CBDA Consolidation function for Compressive Big Data Analytics - LONI pipeline
#'
#' @description
#' This CBDA function consolidates all the M workspaces generated in the
#' Learning/Training step into a single workspace. It also ranks all the predictive models and selects
#' the **top** ones to be sift... |
202d696f520de7c3e7dcc0f2102a54db0713f0351ab4a39accc6e7fe40407e21 | R | 7,771 | 267 | #' Convert xml PubMed bibliographic data into a dataframe
#'
#' It converts PubMed data, downloaded using Entrez API, into a dataframe
#'
#' @param P is a list following the xml PubMed structure, downloaded using the function \code{pmApiRequest}.
#' @param format is a character. If \code{format = "bibliometrix"} data w... |
b53570a52cd5e97cad07d5f3218a6736fec5cf74a4eab3393e75ba8df778ccc6 | R | 7,788 | 172 | library(here)
library(lme4) #glm
library(car) #Anova
library(jtools) #summ
library(dplyr)
library(ggplot2)
library(sjPlot)
library(emmeans)
#Prepare buzz and bray datasets: ----
cpodbrayti=read.table(here::here("AI-ARS_ToDryad","OFB_VarForARS_AI_CPOD_Encounter10Buzz5_PropForagingMinutes... |
a88999368f3e464472f32b03b9a0b18e61b1bcbfc017a281d841a7ec78df0521 | R | 7,800 | 234 | ---
title: "SiT - Supplementary Figure 04"
author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg'
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
abstract: 'The spatial landscape of gene expression i... |
9b479c97ab01f2c435c29b26582f704485ff639cfe36a42c0ac3716285b99d1c | R | 7,846 | 190 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(label)
print(worksp... |
33d78f5200b7530cfccb4f127835339702f7ee30ddd6cacb6c14300f5a470747 | R | 7,853 | 147 |
#' Plotting function for FR-Match cell2cluster results
#'
#' This function takes in the \code{\link[FRmatch]{FRmatch_cell2cluster}} output and generates plots for the matching results.
#'
#' @param rst.cell2cluster The \code{\link[FRmatch]{FRmatch_cell2cluster}} output.
#' @param type If \code{type="match"} (default),... |
6244b35094f1f7ba36fe5c4a454c33100cde9bbee21ff956f9678430fa204e05 | R | 7,870 | 312 | ---
title: "DEXSeq_2"
author: "Marika Oksanen"
date: "6/30/2021"
output: html_document
---
##DEXSeq
```{r}
library(DEXSeq)
library(biomaRt)
library(VennDiagram)
library(tidyverse)
```
Find the countfiles that are calculated using python scripts
```{r}
countFiles = list.files("/Users/k6-c02dm8d6ml7h/Desktop/CountFile... |
7480e682e30766be27ae549af50bf09dfee6849ee00300e4854aae227e9e165d | R | 7,882 | 235 | ---
title: "heteroplasmy_plotting_06182021_nkm"
author: "Nate Mullin"
date: "01/13/2023"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(Signac)
library(Seurat)
library(ggplot2)
library(patchwork)
library(tidyverse)
library(EnsDb.Hsapiens.v86)
library(Matrix)
library(Su... |
1168fcfafd59c28df60849f4ac20d2fdc5672b2665847829322373b723d72e77 | R | 8,029 | 185 | #' @title
#' CBDA Consolidation function for Compressive Big Data Analytics - LONI pipeline
#'
#' @description
#' This CBDA function consolidates all the M workspaces generated in the
#' Learning/Training step into a single workspace. It also ranks all the predictive models and selects
#' the **top** ones to be sift... |
52f12f9317bfefe91bfbf13bcefce6749db08a11abf35212063dbee570f741ee | R | 8,118 | 193 | ---
title: "melas_wnn_analysis"
author: "Nate Mullin"
date: "1/11/2023"
output: html_document
---
```{r}
library(Seurat)
library(Signac)
library(tidyverse)
library(ggpubr)
library(EnsDb.Hsapiens.v86)
library(BSgenome.Hsapiens.UCSC.hg38)
library(ggrepel)
library(RColorBrewer)
library(scCustomize)
```
################... |
fd948b11a824ebe7b6a8f9d712035718fbd2abca5c20921e6e5b643b381d71e4 | R | 8,126 | 191 | #' Making the plot for local enrichment
#'
#'
#' @param local_1 output of \code{clisi_information} on one Modality
#' @param local_2 output of \code{clisi_information} on the other Modality
#' @param col_vec vector of colors
#' @param l_bg \code{l} parameter (luminosity, i.e., brightness) for individual cells
#' @para... |
778e07aa2371dd8f932565904ae81a35058b10d62c6016499ec605b901f2313b | R | 8,144 | 179 | # Test significance between learning models and a model with repetition preference
# Comparison: - Pseudo R2 measure Nagelkerke
# Model specification: - Probit regression (stim + intensity * learningmodel)
# Purpose: For significance test (supplemental information)
# Script for plot preparation: data_prep... |
4d2399367df973083333474eb429d5f0cfa2f8456383d464b33862e4171e7ba1 | R | 8,214 | 185 | #' @title
#' CBDA Consolidation function for Compressive Big Data Analytics - LONI pipeline
#'
#' @description
#' This CBDA function consolidates all the M workspaces generated in the
#' Learning/Training step into a single workspace. It also ranks all the predictive models and selects
#' the **top** ones to b... |
7b1d8d1ff5239426b9f4dd4ecaeb55688e4b9562b61bb7bdb3086a140d23e8ad | R | 8,236 | 193 | #' @title
#' CBDA Consolidation function for Compressive Big Data Analytics
#'
#' @description
#' This CBDA function consolidates all the M workspaces generated in the
#' Learning/Training step into a single workspace. It also ranks all the predictive models and selects
#' the **top** ones to be sifted for top predi... |
0d22ee2278a92bed5464e6c11d565312d139f33881a0a84676e5fab64027db4d | R | 8,249 | 207 | # load libraries
library(dplyr)
library(ggplot2)
library(lawstat)
library(readxl)
library(lmPerm)
library(multcomp)
# set working directory
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
# import data
mitoVGP.All <- read_excel("../Supplementary Tables/Supplementary Tables.xlsx", sheet = "ST1")
names(mito... |
97e3a270f11ee1b207e44b38ce12b34ac4b05c221a35c0964a80fa20ee928f5a | R | 8,267 | 207 | ---
title: "SiT - Supplementary Figure 13"
author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg'
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
abstract: 'The spatial landscape of gene expression i... |
927e54628c757eac473d80b276ae0b6eac5deaeb9a707ef528a312bdd5ae0f98 | R | 8,283 | 236 | ---
title: "SiT - Figures"
author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg'
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
abstract: 'The spatial landscape of gene expression isoforms in tissu... |
b1328d9c43630a53abf98339b99d288c51ef44d3a07b2960a73d305bb3fe2a11 | R | 8,286 | 330 | ---
title: "GEeN_ASD17AII"
author: "Marika Oksanen"
date: "7/1/2021"
output: html_document
---
## DEXSeq
```{r}
library(DEXSeq)
library(biomaRt)
library(VennDiagram)
library(tidyverse)
```
Find the countfiles that are calculated using python scripts
```{r}
countFiles = list.files("/Users/k6-c02dm8d6ml7h/Desktop/Coun... |
b99865c99ff65eff9ef587fc0193f1fd3ac2fb9424c49e5716f3950967558122 | R | 8,292 | 125 | library(data.table)
library(dplyr)
library(ggrepel)
library(ggplot2)
library(RNOmni)
library(ggpubr)
library(ensembldb)
library(EnsDb.Hsapiens.v86)
library(cowplot)
load("/mnt/depts/dept04/compbio/human_genetics/users/yhuang5/muscle_targets/regenie/gencode.v38.annotation.exon.rda")
plot.gene.name <- "OBSCN"
chr <- un... |
71541ca9183ba8a0c48e9654ff2494d2270627b0e0dc899020f487eca9bfdd43 | R | 8,412 | 212 | #' Include SNN graphs to multiSVD
#'
#' Computing and including the shared nearest-neighbor (SNN) graphs
#' for each modality and the target common manifold
#' for an existing \code{multiSVD} object
#'
#' @param input_obj \code{multiSVD} class, after creation via \code{create_multiSVD()} or \code{form_metacells()}
#'... |
7cba257500889aad9730d12a239a9798d9d6aaa80effb45009744e2f51187344 | R | 8,429 | 193 | #' @title
#' CBDA Consolidation function for Compressive Big Data Analytics
#'
#' @description
#' This CBDA function consolidates all the M workspaces generated in the
#' Learning/Training step into a single workspace. It also ranks all the predictive models and selects
#' the **top** ones to be sifted for top... |
ecc5d241869a65a22c89c32ef275e337293da3aa1baa6c56f1b12880924cec76 | R | 8,451 | 178 | ## LOADS BASIC INFO TO RUN THE CONSOLIDATION
eval(parse(text=paste0("load(\"~/temp_data_info.RData\")")))
## OPENS A PDF FILE FOR RESULTS [OPTIONAL]
#eval(parse(text=paste0("pdf(\"",workspace_directory,"/CBDA-SL-TEST-output.pdf\")"))) # Windows
## This "top" parameter identifies the sets of features associated with t... |
1bd7054eb542584dc0cf23dbd2468147e0b7d51856300a82d98b6481ce1ae880 | R | 8,452 | 214 | ---
title: "DRAFT_retina_gex_cell_type_annotation"
author: "Drew Voigt, Nate Mullin"
date: "11/04/2022"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
library("Seurat")
library(stringr)
library(tidyverse)
```
This object was run with the following filters:
nFeature... |
3332c32d38e898fa631ce77b02d09893193b8646ce2c9d936a333f0e481fb742 | R | 8,506 | 255 | ---
title: "differential_motif"
author: "Nate Mullin"
date: "12/11/2022"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(Signac)
library(Seurat)
library(patchwork)
library(tidyverse)
library(EnsDb.Hsapiens.v86)
library(Matrix)
library(SummarizedExperiment)
library(ggpub... |
12d2b1e1865fa8dcd930f6d3ccf41dae7af3d797c1a96737b28e73b99ad1a39b | R | 8,599 | 220 | # Data preprocesing for LLhood vs. Stimulus-Only
# IMPORTANT: It is absolutely necessary to start a new R Session before
# running this script!
# .rs.restartR()
# Script to run before plot_significance_absoluteBIC.R
library(fs)
library(tidyverse)
### === LOAD DATA === ###
file_list <- dir_ls("processed_data/LLhoo... |
fc2a6f71f150aaeb0ebb8762890c0ed5645e31437bbd3e2fa559f90b5b5662a8 | R | 8,601 | 332 | ---
title: "DEXSeq_ASD17AII"
author: "Marika Oksanen"
date: "7/1/2021"
output: html_document
---
## DEXSeq
```{r}
library(DEXSeq)
library(biomaRt)
library(VennDiagram)
library(tidyverse)
```
Find the countfiles that are calculated using python scripts
```{r}
countFiles = list.files("/Users/k6-c02dm8d6ml7h/Desktop/Co... |
1f3475c79dca72bb2c5678284356875ff93910f9c4fdc77990012d2d278a6507 | R | 8,617 | 194 | ---
title: "RNAseq Analysis Pipeline: Fractional Factorial Design - Interaction Effects"
author: "Martin Becker"
date: "23/06/2022"
---
## Identify two-way interactions of two environmental factors in fractional factoral design experiment
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r libra... |
7ca023b6c2385d9fc2f7158e5339c4836e0934771f70c62b85b547dc8737a514 | R | 8,641 | 180 | ## LOADS BASIC INFO TO RUN THE CONSOLIDATION
eval(parse(text=paste0("load(\"~/temp_data_info.RData\")")))
#eval(parse(text=paste0("load(\"~/temp_data_info",label,".RData\")")))
eval(parse(text=paste0("save(arguments,label,workspace_directory,i_exp,file= \"~/temp_data_info_",label,".RData\")")))
## OPENS A PDF FILE FOR... |
086e3b8c697b620218f29c0f25f2ab7ac6d65d2ce144e4b7e386c611d760484f | R | 8,727 | 314 | #' @title SXTsvrNor
#' @description SXTsvrNor.
#' @author Xiaotao Shen
#' \email{shenxt@@sioc.ac.cn}
#' @param sample sample.
#' @param QC QC
#' @param tags tags
#' @param sample.order sample.order
#' @param QC.order QC.order
#' @param multiple multiple
#' @param rerun rerun
#' @param peakplot peakplot
#' @param path p... |
d3357e409fbdd82e05ba7ae9e92143351473d70f07804a6cfa08788568032206 | R | 8,860 | 209 | # Code developed to calculate fractions of selected PCBs and
# their metabolites (i.e., OH-PCBs and OH-PCB sulfates) in
# well experiments and create figures (Figure 7 A and B)
# Install packages and load libraries -------------------------------------
# Packages
{
install.packages("gridExtra")
install.packages("g... |
18374c075b7bce9e92bd6ea2a1e39f6a7ffc5c5f9b5e3ac42a89d70b6acb20e1 | R | 8,958 | 190 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
i_exp=as.numeric(args[2])
dataset_file = as.array(args[3])
workspace_directory=as.array(args[4])
#i_exp=as.numeric(args[5])
eval(parse(text=paste0("arguments = read.table(arg_file, header = TRUE)")))
la... |
200a96180906cb2007e26bf51059855468cc597966ac25eab7317d0ed3355980 | R | 8,971 | 199 | ---
title: "Test1 overview"
author: "Pierre Ekelmans & Ulzii Utas"
output:
pdf_document:
toc: no
html_document:
toc: no
toc_float: yes
theme: cerulean
word_document:
toc: no
---
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(dplyr)
library(tidyr)... |
f1c3de1f7ac7fb0ade3822bf3dfa1806ce5c2c7ead26bf86fe517f15065c132b | R | 9,017 | 187 | ## LOADS BASIC INFO TO RUN THE CONSOLIDATION
# This is from the Initialization script
# eval(parse(text=paste0("save(arguments,label,workspace_directory,Xpred,Ypred,q,
# Xtemp,Ytemp,cols_to_eliminate,original_names_Data,original_names_Xtemp,
# file= \"~/ABIDE_ValidationSets... |
91a73eafd1250dafe36b354c2b21ec06312a0faf7883af3e01163eed1eec6c47 | R | 9,082 | 207 | context("Test graph alignment")
## postprocess_graph_alignment is correct
test_that("postprocess_graph_alignment works", {
# load("tests/assets/test_data2.RData")
load("../assets/test_data2.RData")
mat_1 <- test_data$mat_1
mat_2 <- test_data$mat_2
n <- nrow(mat_1)
large_clustering_1 <- test_data$clusterin... |
62547b210abb2c25ff73e9129b266aa03614164b681de62acbd429ba661c7d91 | R | 9,100 | 312 | ---
title: "pubmedR"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{pubmedR: A brief example}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
## An R-package to gather bibliographic data from PubMed.
The goal of pubmedR is to gather metadata about publications, g... |
525d216a2166cf955ac71c1c62654cfc7f31a6a502d8703da1d9938104a68b73 | R | 9,128 | 129 | #All
library(DESeq2)
library(ggplot2)
library(ComplexHeatmap)
library("org.Mm.eg.db")
library(EnhancedVolcano)
library(clusterProfiler)
library(AnnotationDbi)
library(org.Mm.eg.db)
Counts <- read.delim("CountReads_csv.csv", header = TRUE, row.names = 1, sep = ",")
Counts <- Counts[,-1] #Reduce number of rep... |
7e155d84c3fbf1e62bf3ac4add9f72e6ec9fd6d33f37383ed4db8b4524ec91fa | R | 9,141 | 223 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
label=as.array(args[1])
workspace_directory=as.array(args[2])
# arg_file = as.array(args[1])
# print(arg_file)
# j_global=as.numeric(args[2])
# alpha=as.numeric(args[3])
# dataset_file = as.array(args[4])
# i_exp=as.numeric(args[7])
print(label)
... |
2498e63bd3a63e3a377cccf4db589f029cee223b33b2ddf2415c87fed96a0752 | R | 9,192 | 226 | context("Test metacell")
## .intersect_clustering is correct
test_that(".intersect_clustering works", {
set.seed(10)
vec <- rep(1:5, each = 50)
n <- length(vec)
large_clustering_1 <- factor(vec)
large_clustering_2 <- factor(sample(vec))
res <- .intersect_clustering(large_clustering_1 = large_clustering_1,... |
9ca8148dcf7abd2a8a4c2f98005c7960625ade00abe5b04bdfa85636bdf097f6 | R | 9,193 | 192 | context("Test postprocess_cell_enrichment")
## .enrichment is correct
test_that(".enrichment works", {
# load("tests/assets/test_data2.RData")
load("../assets/test_data2.RData")
mat_1 <- test_data$mat_1
mat_2 <- test_data$mat_2
n <- nrow(mat_1)
large_clustering_1 <- test_data$clustering_1
large_clusteri... |
9825b0cb353a6780941c481150a6ced65d11d4ce1df94b9e1ed6f970b6be00bf | R | 9,297 | 161 | #' Computing Consensus PCA
#'
#' @param mat_1 data matrix of \code{n} cells and \code{p1} features for Modality 1
#' @param mat_2 data matrix of \code{n} cells and \code{p2} features for Modality 2
#' @param dims_1 vector of latent dimensions for \code{mat_1} used for analysis
#' @param dims_2 vector of latent dimensio... |
6b513b57f7a065d52f9ef1afb3a3b83529c121c793dbe9677c3bbd82ea82df3f | R | 9,380 | 180 | # Data Preprocessing True Sequence of Stimuli (generative values)
library(tidyverse)
library(janitor)
library(stringr)
source("functions/CountEventMarkovNoJump.R")
source("functions/CountEventBernoulliNoJump.R")
source("functions/CountEventBernoulliAlternationNoJump.R")
# Auditory | Vestibular | Visual
df_auditory_g... |
aa5e4d7af1769c67d27e98e3cdce25e0979c69211ee0a833ebfad09d08bbb5c8 | R | 9,426 | 239 | # Plot orthogonal predicitions
# Plot A: Example sequence with difficult and easy trials
# Plot B: Plot to quantify the overall effect
library(fs)
library(tidyverse)
library(patchwork)
library(ggpubr)
### === LOAD DATA === ###
file_list <- dir_ls("processed_data/LLhood/") |>
path_filter(" |Stim_loglik.Rda", in... |
a0ce0cffb195cc1f9b8e7f5734376804842ae85cfb0d0af2c9f5dad1e87bcd13 | R | 9,432 | 231 | compute_tiltedCCA_ingredients <- function(setting = 1){
set.seed(10)
# setting 1 has modality 2 having no distinct information
if(setting == 1){
n_clust <- 100
high <- 0.9; low <- 0.05
B_mat1 <- matrix(c(0.9, 0.1, 0.1,
0.1, 0.9, 0.1,
0.1, 0.1, 0.9), 3, 3, ... |
66ac58fbb811a092fdeef4f9986f195172c52216415f56fbfaef499eeb83b1a8 | R | 9,479 | 348 |
library(tidyverse)
library(foreign)
library(kableExtra)
library(pROC) ## ROC
library(caret) ## ROC
library(rpart)
library(rpart.plot)
library(gtsummary)
library("scales")
hex_codes1 <- hue_pal()(6)
# Data Preparation
ad.raw = read.csv("../data/ad_full_data.csv")%>%
mutate(PET = as.factor(PET),
... |
d88d9e86df2e1ac797abeafe619c8691aae1edb4e63fc1a930f88f7fe778ba07 | R | 9,481 | 168 |
#' FR-Match for single cell RNA-seq data
#'
#' This is a user-end wrapper function that implements the steps of cell type matching between two single cell RNA-seq experiments
#' (namely, \code{query} and \code{reference}) using the cluster-to-cluster FR-Match approach.
#'
#' @param sce.query Data object of the \link[S... |
ad4eb5a5d940341f0b5891d5847f7bd883458d6bb44693b45da8582f0e4163ec | R | 9,485 | 225 | #' Tilted-CCA Factorization
#'
#' Computing the common-distinct decomposition via CCA, by setting
#' each latent dimension to the same common tilt.
#'
#' @param input_obj \code{multiSVD} class, after creation via \code{compute_snns()}
#' @param discretization_gridsize positive integer for how many values between 0 an... |
d504426c0d76ccb3c358bdf82d9dfaa2f08e711a4775fda3b90e379a95195661 | R | 9,527 | 230 | .generic_variable_selection <- function(bool_maximizing,
cor_threshold,
initial_mat, # can be NULL
mat_1,
mat_2, # can be NULL
... |
790290472efb27a39308b0c99562462f65e67d1d49ea892789893d99f9c0afbc | R | 9,547 | 225 | #' Fine tune the common tilts, one for each latent dimension
#'
#' Tune each latent dimension (representing a pair of canonical score vectors)
#' for an appropriate tilt of the common component
#'
#' @param input_obj \code{multiSVD} class, after creation via \code{tiltedCCA()}
#' @param max_iter maximum number of epo... |
c2febdfdd4cd76e92d295065cd7e1253b464a2503dcc61f04297a33a27be3d2b | R | 9,560 | 223 | #' Create Seurat dimension reduction objects of Tilted-CCA
#'
#' @param input_obj a \code{multiSVD} object that is the output of \code{tiltedCCA_decomposition}
#' @param what a character, either \code{"common"}, \code{"distinct_1"}, or \code{"distinct_2"} for
#' which embedding to construct the visualization for
#' @... |
ebe37aabf6968187429686d819a30ead016e8ef1e968f3a7ce0812436e8515a5 | R | 9,584 | 224 | # load environment
library(Seurat)
library(ggplot2)
library(ggpubr)
library(tidyverse)
library(plyr)
source('../functions/_global.R')
source('../functions/_visualize.R')
# load data
path = 'single_cell_projects/10X-Pak/integration/patient_derived_engineered/v2_filtered/trajectory/'
time_points = c('d22', 'd50', 'd101... |
2e1e67dd817bf3f2d5cb6cbb90aa0ab411a8c862a55608932c798ac454c43745 | R | 9,635 | 411 | ---
title: "GeEn_Splicing"
output: html_document
---
## Preparations
Flattened annotation file was created with python script dexseq_prepare_annotation.py
-r was set to no --> shared exons are excluded
genes.gtf was loaded from Rackham:
/sw/data/uppnex/igenomes/Homo_sapiens/NCBI/GRCh38/Annotation/Genes.gencode/genes... |
33d5065fbbe8fb8a4527b7459e115d054535b4d2daf0ffbfb88293905f60fbe9 | R | 9,671 | 337 | # setGeneric(
# name = "SXTloessNor",
# def = function(sample,
# QC,
# tags,
# sample.order,
# QC.order,
# #used data
# optimization = TRUE,
# begin = 0.5,
# end = 1,
# ... |
b291151a49dcdd06cac7cc04a84079f44af07b9c2b6331e57d5ef5d972dd5225 | R | 9,698 | 338 | ng_colour_list <-
c(
`night` = "#323D5A",
`warm red` = "#FF4A4F",
`electro` = "#00C0C0",
`violet` = "#8F87FF",
`pesto` = "#CCCF40",
`mid night` = "#508CC8",
`dark red` = "#A0192D",
`dark electro` = "#2D506E",
`dark violet` = "#5028C8",
`dark pesto` = "#006E00",
`light nig... |
8d089943de3258e73504ef7b0b7ac73deb3d69b69984d2bf14dea5170c9bc5aa | R | 9,733 | 214 | # This loads the experiments specs
# eval(parse(text=paste0("save(Xtemp,Xpred,label, q, Ypred, M, i_exp, Ytemp, SL_Pred_MSE",j_global,"SL_Pred_",j_global,
# ",nonzero,k",j_global,",MSE_",j_global,",Accuracy_",j_global,",KO_selected_",j_global,",
# file= \"",workspace_direct... |
780057b0e67b702bfd04e8caff1bf8abae962cdef354e49a1a2da6677441e47b | R | 9,844 | 275 | ---
title: "SiT - Supplementary Figure 11"
author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg'
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
abstract: 'The spatial landscape of gene expression i... |
abba6e534cb91fdc5df0b0d1555ef305ece07c0f254b281a5fc09321720d749c | R | 9,933 | 260 | # Log-Likelihood Analysis for TP, IF and AF when Omega is fixed
# Data preprocessing to plot LLhood, when Omega is fixed across learning models
library(tidyverse)
library(ggtext)
library(patchwork)
library(DescTools)
# Source functions
source("functions/function_LogLikelihood.R")
# Load data
load("processed_data/al... |
99418e28533cc43d1f5a3ccbefb5400de6befcf71c7a798f2362b2bd4d84431b | R | 10,014 | 251 | ---
title: "cluster_annotation_label_transfer"
author: "Nate Mullin"
date: "12/10/2022"
output: html_document
editor_options:
chunk_output_type: console
---
Load required packages
```{r}
knitr::opts_chunk$set(echo = TRUE)
library(Signac)
library(Seurat)
library(ggplot2)
library(patchwork)
library(tidyverse)
library(E... |
c4caa2c1b468f9b7eee43c941f04b6bff87fcede52b5a9b9eb21805ab0875352 | R | 10,016 | 258 | # Load a session
## STEP 1 - DATA CLEANING
setwd("~/Desktop/R")
ALS1 = read.csv("ALS_TrainingData_2223.csv", header = TRUE)
# Set the list of packages/libraries to install/include (done through the ipak.R function)
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
... |
e82fcb229fe6195bd62a60fcdde95bd62c731a5768c067d9400ce6e8cffaf5e0 | R | 10,099 | 314 | #' Exploratory Analysis
#'
#' Fit multiple regression models in one go.
#'
#' @param df_long a data frame in a long format that contains a \code{key}
#' column with the names of the variables for which to estimate the
#' measures of effect, e.g. Nightingale NMR biomarker names, a \code{value} column
#' with the numeric... |
f9087fcd4323874408bacd1be6ba14645a897ab6286931cb1f101505142577c1 | R | 10,103 | 311 |
library(Seurat)
library(hdf5r)
library(tidyverse)
library(qs)
library(future)
library(furrr)
library(cowplot)
source("~/data2/rstudio/birds/utils/db.R")
source("~/data2/rstudio/birds/utils/common_aesthetics.R")
source("~/data2/rstudio/birds/utils/stats.R")
# Directory setup -----------------------------------------... |
0339467124c4d0966ada52ece4b2129c5d4fb32d8baba3093dceb581e864daf5 | R | 10,123 | 392 | ---
title: "GeEn_risk_DEU2"
author: "Marika Oksanen"
date: "9/8/2021"
output: html_document
---
This RMarkdown contains the Rcode to find differentially used exons between treatments including risk group cell lines, ASD12 and ASD17. DEXSeq has to be run with two different models, full model and reduced model. The red... |
c7b1264e30315bfab87a45d68073a62b0efffe4d49baad40941b367d4bea8488 | R | 10,163 | 287 | ---
title: "SiT - Supplementary Figure 12"
author: '[Kevin Lebrigand](mailto:lebrigand@ipmc.cnrs.fr)§, Joseph Bergenstråhle §, Kim Thrane §, Annelie Mollbrink, Pascal Barbry, Rainer Waldmann and Joakim Lundeberg'
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
abstract: 'The spatial landscape of gene expression i... |
c5819ef853d097b8c1e371b59e9a2a3d9605a72421f1a0743fa91ffaa632eeed | R | 10,232 | 313 | #' @title checkData
#' @description Check data.
#' @author Xiaotao Shen
#' \email{shenxt@@sioc.ac.cn}
#' @param data The name of ms1 data.
#' @param sample.info The name of sample information.
#' @param path The work directory.
#' @return Check result.
#' @export
#'
setGeneric(
name = "checkData",
def = function(d... |
96807324d430eeacc441b046ab59d0408be5c32eabb06e216c3b0a7c5446fc0c | R | 10,266 | 261 | #' Include meta-cell information to multiSVD
#'
#' Include the hard clustering information and compute the meta-cells
#' for an existing \code{multiSVD} object.
#'
#' @param input_obj \code{multiSVD} class, after creation via \code{create_multiSVD()}
#' @param large_clustering_1 factor among the \code{n} cells or \c... |
580aae920c33f4706b1499e62036e14c0aa699780d37b9ebf6f97a20dc1e3227 | R | 10,305 | 246 | #!/usr/bin/env Rscript
options(digits=3)
Args <- commandArgs()
self<-Args[4]
self<-substring(self,8,nchar(as.character(self)))
getPckg <- function(pckg) install.packages(pckg, repos = "http://cran.r-project.org")
pckg = try(require(getopt))
if(!pckg) {
cat("Installing 'getopt' from CRAN\n")
getPckg("getopt")
require("g... |
0e45740fca8b3685854d0c09476d58ad025cb3b61cd11ce2fe466d7882e6940f | R | 10,334 | 278 | #' Heatmap of the data
#'
#' If \code{reserve_zero = T}, then reserve zero for white.
#' If \code{reserve_zero = F}, then all the greens are negative and all the reds are positive
#'
#' @param dat matrix
#' @param luminosity boolean
#' @param asp numeric
#' @param reserve_zero boolean
#' @param ... additional graphica... |
392fbb8bcc1ae3e4994dd748923c7439189c79b9b33356b92e1e1e32a04cadb9 | R | 10,464 | 248 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(args)
print(label)
... |
14e31b5554b9a428f80c5bc6894ba02f7eb0baf696abfb2707df088985f82aec | R | 10,482 | 274 | context("Test .common_decomposition")
test_compute_common_score <- function(score_1, score_2, obj_vec = NA){
stopifnot(nrow(score_1) == nrow(score_2), nrow(score_1) >= ncol(score_1),
nrow(score_2) >= ncol(score_2), is.matrix(score_1), is.matrix(score_2))
p <- min(c(ncol(score_1), ncol(score_2)))
i... |
58d032743b59989e196ff3a4542f3b073340a0a4a4267860f4f494ae888d382e | R | 10,539 | 407 | ---
title: "GeEn_nonrisk_DEU2"
author: "Marika Oksanen"
date: "9/8/2021"
output: html_document
---
```{r}
library(DEXSeq)
library(biomaRt)
library(VennDiagram)
library(tidyverse)
```
Find the countfiles that are calculated using python scripts
```{r}
countFiles = list.files("/Users/k6-c02dm8d6ml7h/Desktop/Splicing/C... |
56ffc1003d979efe02d64c26eba0c1269902782143d28c1f34d0cd3d28f0e208 | R | 10,606 | 257 | #' @title
#' CBDA Validation function for Compressive Big Data Analytics - LONI pipeline version
#'
#' @description
#' This CBDA function generates *max_covs - min_covs* nested models based on the ranking
#' returned by the *Consolidation* function. It also consolidates all the *max_covs - min_covs*
#' workspaces i... |
25898b966ff0f8d8f7c760e4e9d7b261b1cc2d35e8c1ba6b29b7721ce86e762a | R | 10,619 | 276 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(args)
print(label)
... |
b44d3a29be5ff9fae8d650c9fbe80621925f4eb7f7a4a46f0901399aef84e70c | R | 10,720 | 271 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(label)
print(worksp... |
029d1198b57df3f5947ebbd9fe8b5df4dd37d00e71789de8fc27f8470054d654 | R | 10,795 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
0e21348e0190d83a6e202701d2934d0d7ca5561f911c02f2651d677470573f7c | R | 10,795 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
6549a172d53647bc7bb0ecfd8e0e197f8d1bde16171e0812bd884469cee9fb40 | R | 10,795 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
a1823251bdcbbc4ec9c9442974b3b627d7976fd840f362de0c5f96ed1053d8f1 | R | 10,795 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
a4902901c09ffb40eec79cc85af0580457998a61eadaa4a4847f4c35498602dd | R | 10,795 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
bcf0e6c58f70d160f370a937d7d5cab596d898b2f8478c7e2a45d86c24ff6dca | R | 10,798 | 257 | setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
a0c59a63d08393613633bc207c43ff4589f410a7936909f66e6aa054a1a50a46 | R | 10,831 | 279 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(args)
print(label)
... |
d8b05afe58cbd3da51bcd553f059cbdda9df8d4a2b67f7a606a2310923b50fef | R | 10,833 | 279 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(args)
print(label)
... |
689977b3677968fd9ae547276e468c84bbfc2ef7ba058f344872c913c9b1c9d2 | R | 10,863 | 257 | #' @title
#' CBDA Validation function for Compressive Big Data Analytics - LONI pipeline version
#'
#' @description
#' This CBDA function generates *max_covs - min_covs* nested models based on the ranking
#' returned by the *Consolidation* function. It also consolidates all the *max_covs - min_covs*
#' worksp... |
c9621a9eb2354525ef30d35ebd3bd8af7ce8c5766be02933ad1e8c971a9e08f0 | R | 10,919 | 261 | #' Plot alignment of variables
#'
#' @param rsquare_vec output of \code{tiltedCCA::postprocess_modality_alignment}
#' @param logpval_vec output of \code{tiltedCCA::postprocess_depvalue}
#' @param bool_hide_points boolean (graphical parameter)
#' @param bool_mark_ymedian boolean (graphical parameter)
#' @param bool_poly... |
b16d1a2ae542363abbeadc38b48236a8119b78351663dfd108d76d19007c4b39 | R | 10,980 | 327 | postprocess_graph_alignment <- function(
input_obj,
bool_use_denoised,
bool_include_intercept = T,
bool_use_metacells = T,
cell_idx = NULL,
input_assay = 1,
return_everything_mat = F,
seurat_obj = NULL,
seurat_assay = NULL,
seurat_slot = "data",
tol = 1e-6,
variable_names... |
e57c3355a0f8328e5c5abca141267f72aa9b5c89e1bd0fbab8e742c756835800 | R | 10,981 | 238 | library(splitstackshape )
library(matrixStats)
Nova1_AS <- read.delim("Nova1_AS.csv", header = TRUE, row.names = 1, sep = ",")
selected = c ("Acsl3", " Nrbp2", "Trem2", "Nrxn1", "Nrxn3", "Nrxn2", "Syngap1", "Nova1", "Nova2", "Emx1", "Vip", "Pvr", "Prox1", "Prox2", "Sst")
EnhancedVolcano(Nova1_AS, x= "IncLevelDiff... |
a6cb1140d372f090124d7ec8f79d709e5f0545ae8d2c054c5252a3e964ac00df | R | 11,000 | 259 |
setwd("~/Documents/NIH-grant/SOCR/GITHUB/PilotTest")
packages <- c("ggplot2", "plyr","dplyr", "colorspace","grid","data.table","VIM","MASS","Matrix",
"lme4","arm","foreach","glmnet","class","nnet","mice","missForest",
"calibrate","nnls","SuperLearner","plotrix","TeachingDemos","plotmo",
... |
548b5dedc9f2120dcfce219e08693e8b147dde9a1e5320f13f8d37c6c6bede67 | R | 11,087 | 325 | #' Find articles that cite a given PubMed article
#'
#' It retrieves the PMIDs of articles that cite a given PubMed article,
#' using the NCBI E-Link service (PubMed Cited by).
#'
#' @param pmid is a character or numeric. A single PubMed identifier (PMID).
#' @param api_key is a character. It contains a valid API key f... |
a0a3b6661a8c7e2717450c8172ace67cf5e2927a3cc5440653fdb5a9df8aa150 | R | 11,105 | 334 | #' Print a Forestplot for All Nightingale Biomarkers
#'
#' Save a forestplot of all Nightingale biomarker associations in a 2-page,
#' predefined layout (utilizes \code{\link{forestplot}}).
#'
#' The function uses a custom grouping specified by
#' \code{\link{df_grouping_all_NG_biomarkers}}. The input \code{df} and
#' ... |
9a1246335e3189aa901b227a4ea3b2ac24fff4a1cbbf28c0eb9df7e033e0fb0e | R | 11,166 | 290 | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
print(args)
arg_file = as.array(args[1])
print(arg_file)
j_global=as.numeric(args[2])
alpha=as.numeric(args[3])
dataset_file = as.array(args[4])
workspace_directory=as.array(args[5])
label=as.array(args[6])
i_exp=as.numeric(args[7])
print(args)
print(label)
... |
90e077515ec08c988545953fa4ce1fe4c4ccb8f23e7da225ff4ac9c3b2f0f623 | R | 11,191 | 238 | # #!/usr/bin/env Rscript
# workspace_directory<-setwd("C:/Users/simeonem/Documents/CBDA-SL/ExperimentsNov2016/MRI/M1000/")
# arg_file = as.array('C:/Users/simeonem/Documents/CBDA-SL/Cranium/arg_Nov18_test.txt')
#
# ## Read the input arguments and the dataset from a file
# eval(parse(text=paste0("arguments <- read.table... |
e409a80a085f0cf8ddf116d88d0e8f244fd916be766860306eee2daa141bfafa | R | 11,233 | 246 | # Installation
install.packages("devtools")
library(devtools)
install_github("pcahan1/CellNet", ref="master")
install_github("pcahan1/cancerCellNet@v0.1.1", ref="master")
# Load libraries
library(CellNet)
library(cancerCellNet)
library(plyr)
library(ggplot2)
library(RColorBrewer)
library(pheatmap)
library(plotly)
libr... |
124b984531f00937f02b49e12366d95c071366a738ac65e83f239052db9c574c | R | 11,287 | 445 | library(tidyverse)
library(foreign)
library(kableExtra)
library(pROC) ## ROC
library(caret) ## ROC
library(rpart)
library(rpart.plot)
library(gtsummary)
library("scales")
hex_codes1 <- hue_pal()(6)
# Data Preparation
ad.raw = read.csv("../data/ad_full_data.csv")%>%
mutate(PET = as.factor(PET),
... |
f1f682bb82dbd595e09c9d75066812920191cf5eacc0d7154385c5271e54e8fb | R | 11,316 | 344 | #' Draw a Forestplot of Measures of Effects
#'
#' Visualize multiple measures of effect with their confidence intervals in a
#' vertical layout.
#'
#' @param df A data frame with the data to plot. It must contain at least three
#' variables, a character column with the names to be displayed on the y-axis
#' (see parame... |
3f18d7ba506dcd526ebf54f6c9718c794e6f3a2f6c9d423dffeb8c5ce121ebb3 | R | 11,562 | 385 | #' @export
.get_defaultAssay <- function(input_obj, ...) UseMethod(".get_defaultAssay")
#' @export
.get_defaultAssay.default <- function(input_obj, ...){
numeric(0)
}
#' @export
.get_defaultAssay.multiSVD <- function(input_obj, ...){
input_obj$default_assay
}
####################
#' @export
.set_defaultAssay <-... |
0286a527c190ea4d4dc2eff73ae2d1c1c3b8b7128776657b901edd62891efc32 | R | 11,646 | 281 | #!/usr/bin/env Rscript
library(ANTsR)
library(tools)
if(!usePkg('optparse') | !usePkg('ANTsR')){
stop("optparse and ANTsR packages required.")
}
optlist <- list(
make_option(c('-s', '--pCASL'), default='', help=' raw pCASL image'),
make_option(c('-o', '--outputpre'), default='CBF_',
help='output pr... |
b71fc9993926f3f50e0f994ee924b95507ff70d5055ab2793b030faefa903ae4 | R | 11,708 | 372 | #' @keywords internal
#' Flatten a nested list into a named character vector
#'
#' @param x A nested list (typically from XML parsing)
#' @param use.names Logical, whether to preserve names
#' @param classes Character vector of classes to include
#' @return A named character vector
#' @noRd
list2char <- function(x, use... |
586453a9294996de46a16684ec5bc1ca8ec8c1843f4c5b0c716c62cb1f3be437 | R | 11,722 | 326 | .compute_common_snn_softclustering <- function(snn_1, snn_2,
num_neigh,
verbose = 0){
stopifnot(all(dim(snn_1) == dim(snn_2)),
ncol(snn_1) == nrow(snn_1))
n <- nrow(snn_1)
if(verbose >= 1) print("Getting N... |
b39bfbf2b48ffe414805633a731f388ea5fcc5d155e5531390e23fc61ec3d153 | R | 11,867 | 315 | #' Create the object to initialize Tilted-CCA
#'
#' Initialize the \code{multiSVD} object by computing each modality's SVD.
#'
#' @param mat_1 data matrix of \code{n} cells and \code{p1} features for Modality 1
#' @param mat_2 data matrix of \code{n} cells and \code{p2} features for Modality 2
#' @param dims_1 vector ... |
1861b903a1a3499a7ee96a99a83a06a4544b74f5294ef2abe127e7f23177b48e | R | 11,897 | 308 |
setwd("~/Desktop/R")
## STEP 1 - DATA CLEANING
## This is just an example with the MRI dataset "NeuroIm1.txt"
NeuroIm1 = read.table("NeuroIm1.txt", header=TRUE,fill=TRUE)
# Delete the last 3 columns from the big matrix NeurIm1 ["ROI","Measure","Value"]
# and store the rest in a temp matrix, compressing unique values... |
c3d09a0835a431450254c31a56d41c4f2b75574c75f94308876072710587bd14 | R | 12,025 | 242 | context("Test tiltedCCA_decomposition")
## tiltedCCA_decomposition is correct
test_that("(Basic) tiltedCCA_decomposition works", {
# load("tests/assets/test_data1.RData")
load("../assets/test_data1.RData")
mat_1 <- test_data$mat_1
mat_2 <- test_data$mat_2
n <- nrow(mat_1)
large_clustering_1 <- test_data$c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.