sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a0daed89fd9cefce094609acf75aa298dfc3ba1f1c97759367cf5efe4fa780fc
R
12,192
225
#!/usr/bin/env Rscript # ============================================================================= # make_stereoseq_mini_mouse_eyeball.R # # Build a small, format-faithful Stereo-seq test fixture by SPATIALLY CROPPING # the full SAW 8.2.0 run for chip C04687E314 (mouse eyeball). # # SOURCE_DIR (a SAW `outs/`) -> ...
a4431cb725ef94a1b356f44f7faf65a976f409e36672ad8231c994f2a7292870
R
12,203
412
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarTaskVimpHyperparameters ---------------------------------------------- setClass( "familiarTaskVimpHyperparameters", contains = "familiarTask", slots = list( "vimp_method" = "character", "feature_info_file" = "character" )...
c7bd87c866ba766f4296ef23c6c1a127406341c45631d5c78cc14fe25a9d14a2
R
12,258
356
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # .file_exists (generic task) -------------------------------------------------- setMethod( ".file_exists", signature(object = "familiarTask"), function(object, ...) { if (is.na(object@file) || is.null(object@file)) return(FALSE) ...
8ce44b5b0128ff965153e03109deba42ab6970d567339c15f34425d82df6a9b4
R
12,317
374
# regression_test.R - Testing JAGS fits of HDDM models with participant-level regressors in JAGS using Rjags in R # # Copyright (C) 2022 Kianté Fernandez, <kiantefernan@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
06c77e5901dd06d911ec7220c6ed4d2b2732839866cd6de8b1183eb9bef64745
R
12,332
382
# Don't perform any further tests on CRAN due to time of running the complete # test. testthat::skip_on_cran() testthat::skip_on_ci() debug_flag <- FALSE # Generic test. familiar:::test_plots( plot_function = familiar:::plot_model_performance, data_element = "model_performance", not_available_all_prospective = ...
769c618ebf32341c447266770885a81d3d1cdcbddaa9b68ef69a9284d376dd04
R
12,403
352
#blocked_exp_conds.R - Code to fit a HDDM with fixed start point from a blocked condition experiment using R2JAGS in R # Copyright (C) 2022 Kianté Fernandez, <kiantefernan@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
19088a10c45061487877232a7f2e35edef2c78814b8ff3a406efe71f2e50a668
R
12,459
274
############################################## # Investigate DNAme disorder and gene expression levels. # Updated: 2021.05.13 # Author: Kevin J. ################################################## # Working directory for this analysis in the SCGP project. mybasedir = "/Users/johnsk/github/" setwd(mybasedir) #########...
f704dfd6a088349ca70ef955d99304fbb92a8dcf1ce754670361c8c84a1087c4
R
12,528
380
#' @name #' getAbundant #' #' @title #' Determine abundant and rare taxa. Rare taxa can be further classified #' to conditionally rare and permanently rare. #' #' @description #' These functions determine abundant and rare taxa based on the abundances #' of taxa. Compared to \code{\link[=getPrevalence]{getPrevalent}} a...
8c6f11a46b6fce4cdf43ca16dcc40ed5837bd4a975afd0132316ae1d5201860e
R
12,532
283
test_that("Estimate Alpha Diversity Indices with Rarefaction", { data(GlobalPatterns, package="mia") tse <- GlobalPatterns ## Testing diversity # Calculate the default Shannon index with no rarefaction with 3 different # ways: default, niter=NULL, niter=0 tse <- addAlpha(tse, assay.type = "count...
a26a9b12321d12f5c611b8fbe8edfb23571452234bddfb303829b1d32620219a
R
12,662
293
library(parallel) library(pheatmap) library(xlsx) basePath = "/data/bcu_projects/MelBrainSys_PostdocProject_Gruetzmann/publications/2022-my-MelBrainSys-paper/scripts-etc-for-publication/" myPath = paste0(basePath,"regNet/validation-cohort/") setwd(myPath) localRlibs = paste0(basePath,"conda/lib/R/library/") library(r...
f4b9844c25db6d26abdb7c0cc6b149c0d31c4a8b5ac254109fb176b97962ad68
R
12,727
307
################################################################# ###################### ABCD: code for figures ################### ################################################################# # These are the code for the figures used in the manuscript ########## load all the packages packages <- c('psych','doPa...
417337238917f66160c097aa104a30725d6080ade18cd1a1849a40860b3e87b8
R
12,732
379
############## ### Script ### ############## # Run BLESS (= Bayesian Lesion Estimation for a Structured Spike-and-Slab Prior) with MCAR prior over sparsity parameters. # (3D lesion masks with parameter estimation and inference for masked version of 3D scan) # (Code for UK Biobank application) ################# ### Li...
d6432f9d0b725f00fd9ed66515fbd480199eb3a549beb923d181bc966c2f59da
R
12,747
302
################################## # Visualize the DNAme disorder and DNAme values across promoters # Updated: 2020.04.30 # Author: Kevin J. ################################### # Working directory for this analysis in the SCGP project. mybasedir = "/Users/johnsk/github/" setwd(mybasedir) ############################...
e7ebe652a7a610dc9f46db5cec4cd17915372663d8d897902e0c988347db5a4e
R
12,787
485
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarDataElementFeatureExpression object ---------------------------------- setClass( "familiarDataElementFeatureExpression", contains = "familiarDataElement", slots = list( "feature_info" = "ANY", "evaluation_time" = "ANY" ), ...
f87d4837f52432113640e652c8ebe80cc52d1f1aa38c89eff9b2eb835e51aa3b
R
12,852
472
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # extract_predictions (generic) ------------------------------------------------ #'@title Internal function to extract predicted values from models. #' #'@description Collects predicted values from models in a `familiarEnsemble`. #' #'@inheritPar...
7d9d808ad7672137c004ddfeebc44988d5f3f9e0c9a8386b1ba1044f91a01783
R
12,920
204
analysis.ui = navbarMenu("Analysis", "Visualizations", tabPanel("dataset traces", fluidRow( column(5, pickerInput("heatmap2_dataset", NULL, c(), width = "100%", multiple = T, options = list(title="Select dataset(s)", `actions-box`=T))), column(4, pickerInput("heatmap2_se...
e3018b63eff0a529f682c844c46c0349117da85badeaceb7f3db20a41e43c5ae
R
12,991
293
################################## # Determine + visualize TFs that regulate cell states (IDHwt samples). # Updated: 2021.05.16 # Author: Kevin J. ################################### ## Working directory for this analysis. mybasedir = "/Users/johnsk/github/" setwd(mybasedir) ################################### # Nece...
296934e66b8046696c2f0e04f16fe9226fc6013a3997f2c16eb8a4d4d4d8aa5f
R
12,997
229
#' check_for_banked_samples(search_path = NULL, query_samples = NULL, mode = c("inventory", "query"), recursive = TRUE, flag_duplicates = TRUE) #' #' Scans a directory tree for banked JAMS samples and reports what is available. #' #' Unlike the previous version, which required the EXACT path to a single JAMSarchive #' ...
6481d5ef339d5f18f38536258cedb1035250e2b6b97292346e0369633a8a3668
R
13,020
297
################################## # Determine + visualize TFs that regulate cell states (IDHmut samples as example). # Updated: 2021.05.16 # Author: Kevin J. ################################### ## Working directory for this analysis. mybasedir = "/Users/johnsk/github/" setwd(mybasedir) #############################...
8a8c58ae16443df99bd47666d1e6c07477a6470db3ef7e0e962d7caad6ec28f4
R
13,036
316
########################### ## Retinol PGS tuning and association ## William Reay (2023) ########################### library(dplyr) library(data.table) library(ggplot2) library(lmvar) library(ComplexHeatmap) library(circlize) library(ggpubr) library(caret) setwd("~/Desktop/Retinol_GWAS/TwinsUK_app/E1205_20.01.2023...
6018827db1b4b285dd5b234e14aa044b6695388255fe769d4821f5a2a32b168b
R
13,387
404
--- title: "03_Setbp1_DiffTargeting_FEA" author: "Jordan Whitlock" date: '2023-05-24' output: html_document --- Goal: Perform Functional Enrichment Analysis (FEA) on heterozygous enriched, differentially targeted genes from the Setbp1 gene set using Gene Ontology and Human Phenotype from gprofiler. ```{r libraries-pr...
abccc286e1d78409eb22fe8e8b9a5635f984943ac04a6a2dc76515a00811d32c
R
13,408
365
#' @title createNearestNetwork #' @name createNearestNetwork #' @description create a nearest neighbour (NN) network #' @param gobject giotto object #' @param type sNN or kNN #' @param dim_reduction_to_use dimension reduction method to use #' @param dim_reduction_name name of dimension reduction set to use #' @param...
f559fcae1865621d133b2d03da6635a205b18c1647f86414fedc3b64a930e6ee
R
13,408
499
--- title: "Setbp1_CellTypesKidney_SoupX_06" author: "Jordan Whitlock" date: '2023-04-12' output: html_document --- # *Single-nuclei analysis: Identify Cell Types Kidney for SoupX* * Loading libraries * Selecting resolution * Investigating top markers for Kidney Cortex * ID cell types for SoupX ## Code: This analysi...
82f3a24d5b0e6be53ea84cc9168364eb1208661be8f5c4af260d6fc492036cab
R
13,482
274
#!/usr/bin/Rscript ################################################################################################################## ##### Limma analysis on expression data ################################################################################################################## library(data.table) library(s...
2b1a58f24dbc0008aafb787098e4ba38d54ece28e49038f5008eb843f9339586
R
13,485
377
# import tdt .tdt.temp = reactiveValues() shinyDirChoose(input, "data_import_tdt_dir", root=c(directories, `Working Directory`='.', getVolumes()()), filetypes=c("tsq","tev")) observeEvent(input$data_tdt, { .tdt.temp$headers = NULL output$data_import_tdt_path = renderText("select a folder that contain...
07c1304c11f3a3225ce07de5667fda56e5b055554e263afc3c292ba566cf7ca8
R
13,510
375
#' @title checkGiottoEnvironment #' @name checkGiottoEnvironment #' @param verbose be verbose #' @details Checks if a miniconda giotto environment can be found. #' Can be installed with \code{\link{installGiottoEnvironment}}. #' @export checkGiottoEnvironment = function(verbose = TRUE) { ## get operating system ...
3a0deb0b396eb99dc0de6685f8ab068f12e5bd7769f3ebd30027bcff735c4200
R
13,652
226
#################################################################################### ## Max Gold ## Code to generate figures from data #################################################################################### ############################################# ## Import packages ##################################...
6f788d5e273b9d47c2f3c6e4910c3d16bec6bed7748d171211d74161a90371e5
R
13,747
339
#quantWorkFlow preprocess############ # extract data input = "20210219_Maxquant_proteinGroups.txt" output = "PCx" blast_path = "ncbi-blast-2.7.1+/bin/" db1_name = "human-uniprot-20181022.fasta" db2_path = "mouse-all-20210202-APP added.fasta" source("proteomic_data_extract_R") #remove human APP expression rm...
d69b764e56855d4e48cd0fe9d066c01df71c542b627cda5138c5b0155f2f0acf
R
13,786
411
#' @title convert_mgImage_to_array_DT #' @name convert_mgImage_to_array_DT #' @description converts a magick image object to a data.table #' @param mg_object magick image or Giotto image object #' @return data.table with image pixel information #' @keywords internal convert_mgImage_to_array_DT = function(mg_object) {...
2d6a94c8ee1629cba967f531ae87bfc51d8a41fa7d7c44c18e0ecfbda6d72a37
R
13,854
498
# This file contains all the generics #' @rdname addAlpha #' @export setGeneric( "addAlpha", signature = c("x"), function(x, ...) standardGeneric("addAlpha")) #' @rdname addAlpha #' @export setGeneric( "getAlpha", signature = c("x"), function(x, ...) standardGeneric("getAlpha")) #' @rdname getDissimi...
c6fe67aed221deb054da7f0a96d7220de096a89e49db1492b692182816bf3bd4
R
13,877
346
#' @title write_giotto_viewer_annotation #' @description write out factor-like annotation data from a giotto object for the Viewer #' @param annotation annotation from the data.table from giotto object #' @param annot_name name of the annotation #' @param output_directory directory where to save the files #' @retur...
b406fa6838145f62d264e9fd739a0b3d10d33134e13c42762e138e66843a889b
R
13,892
274
#' tweak_ctable(ctable = NULL, pheno = NULL, outfile = NULL, ncol = 3, launch_browser = TRUE) #' #' Interactive Shiny colour editor for a JAMS colour table (ctable), e.g. the output of #' make_colour_dictionary(..., object_to_return = "ctable"). Presents one colour-wheel #' picker per class and returns the edited ctabl...
eedea79b69e63c52c708108fc5605b02baf0d64e30cfbd7f358a77b388391835
R
13,918
258
#' generate_JAMS16_methods(opt = NULL, rawfastqsdf = NULL, trunclen_used = NULL, #' samples_requested = NULL, samples_used = NULL, #' subsampling_triggered = FALSE, outfile = NULL) #' #' Synthesises a prose Methods paragraph describing the choices applied in a #' JAMS16 r...
ece7983eb6cb51276b481bb41c2d2af92802b65c64c0184f2a0b58bc59f7545a
R
13,939
498
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R # promote_learner (hyperparameter learner) ------------------------------------- setMethod( "promote_learner", signature(object = "familiarHyperparameterLearner"), function(object) { learner <- object@learner if (learner %in% .get_availa...
2cd15366ba48d0e1071239854561230bd45d5ef09740e14641bb0d5a6d46eb99
R
13,986
432
--- title: "Manuscript 1 from Fernanda Hansen P. de Moraes Thesis - Cortical folding alterations in humans due to aging and diseases" author: "Fernanda Hansen Pacheco de Moraes" date: "1 dec 2021" output: html_document: fig_caption: yes fig_width: 8 number_sections: yes theme: paper toc: yes ...
287e16131eba9a811a140e7a2ae5b58a6d18424952525259345ef67f1cdaa3cf
R
13,995
480
#' Internal checks on common plot input arguments #' #' @param x_range (*optional*) Value range for the x-axis. #' @param y_range (*optional*) Value range for the y-axis. #' @param x_n_breaks (*optional*) Number of breaks to show on the x-axis of the #' plot. `x_n_breaks` is used to determine the `x_breaks` argument ...
9b74883637b5ce7fe2eb7bb2fc52d96f5995415d8bac5b1e558357d97e555686
R
14,016
306
# process_RRBS.R - this script assesses quality of RRBS data generated using bismark methylation extractor require(methylKit) require(genomation) require(GenomicRanges) require(GenomicFeatures) ##### Input arguments ##### # Sample linker file #linker <- read.delim("~/sumner/verhaak-lab/scgp/data/RRBS/20-verhaak-006/...
e91cbb99020bec01bb61a8c3a0062f444189a240b9f563e939b61d9289f5c940
R
14,040
503
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL .parse_hyperparameters <- function( data, parameter_list, outcome_type, vimp_method = NULL, learner = NULL, detector = NULL ) { # Check if any hyperparameters have been set if (length(parameter_list) == 0L) return(para...
7435cbd0b9b055886f5c4455ee445883dd30b762da6243cdbfe15b52ca595336
R
14,060
326
#' Network inference module: Define sub-network inference problems #' #' This is an internal function that divides the total number of genes (nrResponses) in a data set into a fixed number (cores) of equal-sized intervals of genes. This is required to separate the global network inference problem into independent sub-...
f3f024bb4b52111c260daf9ea315e28f3f523c4e53af400a3d22036f85cc5bbe
R
14,087
261
#' calculate_matrix_stats(countmatrix = NULL, uselog = NULL, statsonlog = TRUE, stattype = NULL, classesdf = NULL, invertbinaryorder = FALSE, fun_for_l2fc = "geom_mean", threshPA = 0, numthreads = 1, nperm = 10000, paired = FALSE) #' #' Returns a data frame with the statistics for a feature count matrix ordered by high...
7be5c90df111b5d6239a3bbda2edec40ef9cb33180208f0933333ca69df5d69b
R
14,220
523
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL setClass( "featureInfoParametersTransformationPowerTransform", contains = "featureInfoParameters", slots = list( "method" = "character", "transformer" = "ANY", "fitting_parameters" = "ANY" ), prototype = list( "method" = "n...
3bc42477da35582110391b6aa25ade73578bf848bd3b3d31558e92aea1081e4b
R
14,260
339
#' plot_taxsplit_tree() #' #' Helper plotting function for use exclusively within plot_relabund_features (q.v.). Do not attempt to use this outside of this context, or you will find yourself in a frightful muddle. #' @export plot_taxsplit_tree <- function(taxsplit_df = NULL, strat_tt = N...
a5bd9d92ce4edae998afa5bf3da79b6d057125be5d2f9d9f51f86ff9206e2d80
R
14,352
303
#!/usr/bin/Rscript ################################################################################################################## ##### Limma analysis on expression data ################################################################################################################## library(data.table) library(s...
6f23f5a4ad5f04d159c547f90c8c4c9a201aa2a94beeb6f257da954953cac797
R
14,477
453
# Don't perform any further tests on CRAN due to time of running the test. testthat::skip_on_cran() testthat::skip_on_ci() verbose <- FALSE # Test acquisition functions for all hyperparameter learners ------------------- for (hyperparameter_learner in familiar:::.get_available_hyperparameter_learners()) { for (acqu...
ac596293920199cb5509c3d866e8b0d05c233d9cb8f7760b24418fbe4a5ff8ac
R
14,490
514
--- title: "Setbp1_Integration_02" author: "Jordan Whitlock" date: '2022-09-06' output: html_document: toc: true toc_depth: 2 toc_float: true --- This analysis follows 'Setbp1_QC_01.Rmd'. ### Loading in all required libraries ```{r} set.seed(2178) library(devtools) library(magrittr) library(...
dd020e5b03471cc7310dbdeb3d04dfade0a00c7a1ace13ba1e4b50cfe2a02b1d
R
14,540
242
#!/usr/bin/Rscript library(data.table) library(dplyr) library(limma) library(stringr) library(ggplot2) library(tidyr) library(EnhancedVolcano) library(biomaRt) library(edgeR) library(ggpubr) library(parallel) library(tidyverse) library(reshape2) library(purrr) setwd('/home/boris/Documents/PhD/single_sample/') #######...
40bfd9f48875d79c3c548947fadbb07bc284473adb5027d2c77b94b89750a083
R
14,554
526
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarSVM ------------------------------------------------------------------ setClass( "familiarSVM", contains = "familiarModel" ) setClass("familiarSVMC", contains = "familiarSVM") setClass("familiarSVMNu", contains = "familiarSVM") setCla...
aed40eda413302f83d564b3f6abe2900cc7cd6b925d8ff698c2ef5b8a5ec4b1f
R
14,576
373
testthat::skip_on_cran() # power.transform is also required for transformation_method = "none". if (!rlang::is_installed("power.transform")) testthat::skip() # Basic tests ------------------------------------------------------------------ data <- familiar:::test_create_synthetic_correlated_data( outcome_type = "co...
8047d144519687dce65732a43fe29c4c562d31fa525533342ac8984d77f6cdc6
R
14,684
285
--- title: "Preprocessing DepMap data" author: "Joke Deschildre" date: "17 maart 2021" output: html_document version: "R version 4.0.3 (2020-10-10) -- Bunny-Wunnies Freak Out" --- ```{r} library(data.table) library(limma) library(stringr) library(edgeR) library(ggplot2) ``` #Preprocessing of the neede...
222ca04cdd87347d8ccfa3093f77bff3fbf56ec9189177e621a44d58f5915b7d
R
14,746
435
#' Summarizing microbiome data #' #' To query a \code{SummarizedExperiment} for interesting features, several #' functions are available. #' #' @inheritParams getPrevalence #' #' @param top \code{Numeric scalar}. Determines how many top taxa to return. #' Default is to return top five taxa. (Default: \code{5}) #' #' @p...
da4bdbe657f24bb80d6656fb17eedfa1fa5500f0568cf1247f653ceb301ca47a
R
14,941
356
################################## # Generate ranked and annotated scatterploot # of subtype-averaged TFBS motif-specific DNAme disorder # Updated: 2021.05.15 # Author: Kevin A. ################################### ### Preprocessing #### Load data library(topGO) library(tidyverse) library(openxlsx)...
63bd1d31ac1468ec51f54ec5c985c4a1530006576754b5d3830f4867187b01b7
R
15,073
417
######################## ### Acknowledgements ### ######################## # Code for plotting 2D slices of MRI scans has kindly been provided by Petya Kindalova! Many thanks! ################################# ### Slice plots: MRI template ### ################################# #----------------- ## set constants #...
1d15545d02f41018e95f1d89a8fa365161edaa2901dec684295ccdf6afd6fe7a
R
15,106
565
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # .train ----------------------------------------------------------------------- setMethod( ".train", signature( object = "familiarNoveltyDetector", data = "dataObject" ), function( object, data, get_additional_info = FAL...
d5288d0b3b6a34f58b00dc9be30ca98dd2fa9379400ed1cb128757d33d77a3d6
R
15,161
408
--- title: "mini_visium" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{mini_visium} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ```{r setup, eval=FALSE} library(Giotto) ``` ### Inst...
5105f9e5dc50b4973c234b4f5bac3ec306193795e9de4ad9b7e19a756b03f8ed
R
15,230
518
familiar:::test_all_vimp_methods_available( familiar:::.get_available_ranger_vimp_methods(show_general = TRUE)) familiar:::test_all_vimp_methods_available( familiar:::.get_available_ranger_default_vimp_methods(show_general = TRUE)) # Don't perform any further tests on CRAN due to time of running the complete test....
e21b404781f0f94c8e37c362d5a1eae527d0d42d2bd5d417e9d169c1cef98c18
R
15,467
298
#!usr/bin/Rscript library(data.table) library(stringr) library(limma) library(EnhancedVolcano) library(plyr) library(edgeR) library(ggplot2) library(dplyr) library(viridis) library(jamba) library(data.table) library(ggplot2) library(ggfortify) library(ggpubr) library(biomaRt) library(clusterProfiler) library(enrichplo...
843e5d854c38e0071155a80d9c676d159fb217b940de399b0a29de6f2d6f1487
R
15,474
302
#!/usr/bin/Rscript ################################################################################################################ #### Top n connected genes as hubs + check enrichment for driver genes ################################################################################################################ l...
ba6f9f376c137b16ecd3688272be77a0b8f2261e2d175c030ba86a6df2baebc0
R
15,528
170
#Script to clean and categorize medication use data in ABCD baseline dataset. #Focusing on medication use in last 2 weeks (medsy01.txt) #Created by MEAB on 2021-10-29 #last edited 2022-01-31 #Libraries and set folders library(dplyr) library(psych) library(tidyr) library(stringr) origdatadir <- 'C:/path/to/A...
0ec1f20fc3ff7ec851953efde33834a0e7f58bf40a4d3e27c15e323e81323df3
R
15,567
399
#' Converting a #' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}} #' object into a long data.frame #' #' \code{meltSE} Converts a #' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}} #' object into a long data.frame which can be used for \code{tidyv...
564a401384fe8d55a3877b87a584a83ac052a4a051dc4ebdb289b34eefbbff27
R
15,655
315
#!/usr/bin/env Rscript ############################### ############################### #" ## Fingerprinting - CAMCAN Cohort ## Data Analysis - Polynomial (Quadratic) regression - Variability in FC and HCTSA #Script - Data Analysis - Quadratic regression - Variability #Author: Frederic St-Onge #Date created: 2020-12-...
93e3583e472398de6338677083953a03f119461335351295a0a35556915c50b7
R
15,695
296
# - Generate mutational signatures from vcf data require(VariantAnnotation) require(MutationalPatterns) ### Input arguments ### # Input directory for variant calls variantDir <- "~/Documents/scgp/mutect2/post_processing" # Reference genome ref_genome <- "BSgenome.Hsapiens.UCSC.hg19" library(ref_genome, character.o...
6f7d0b8f312ed55e3f61703976508e822022984e830ec2225effe54126b3bff5
R
15,705
461
library(shiny) library(ggplot2) library(ggpubr) library(RColorBrewer) library(Matrix) choice.gene <- readRDS('choice.gene.rds') meta.pdx <- readRDS('PDX.Meta.rds') Matrix.PDX <- readRDS('PDX.Counts.rds') meta.patient <- readRDS('Patient.Meta.rds') Matrix.Patient <- readRDS('Patient.Counts.rds') ind <-...
a1e55bc65b22776be72610567e8002d9b7c778bd49988a308ecc595d79f64b6f
R
15,732
533
--- title: "Manuscript 1 from Fernanda Hansen P. de Moraes Thesis - Cortical folding alterations in humans due to aging and diseases" author: "Fernanda Hansen Pacheco de Moraes" date: "1 dec 2021" output: html_document: fig_caption: yes fig_width: 8 number_sections: yes theme: paper toc: yes edit...
8ea77a91c1165de796bbeb4057ae75ba664665d26f43718ec2eef4a90b3ed4b7
R
15,780
625
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarTaskGenericFeatureInfo ----------------------------------------------- setClass( "familiarTaskGenericFeatureInfo", contains = "familiarTask", prototype = methods::prototype( task_name = "create_generic_feature_info", data_id...
18c7067f3bd0b73cdf6dc3a036e2625f3392c913480b3487b5b686502a88b786
R
15,822
401
#' EEGfMRIPav_5_StayBehavior_Neural #' #' Perform mixed-effects linear and logistic regression testing how #' trial-by-trial BOLD amplitude and EEG power predict stay behavior #' as reported behavioral results section and in Supplementary Material S15. #' Interactive script, run step-by-step, NOT in one Go. #' #' Re...
4c51c469480d03d8fc65ee3e73860ed5142fb2bbd9bd93e0ce6c425063aea90d
R
15,858
270
#' retrieve_features_by_taxa(FuncExpObj = NULL, glomby = NULL, only_allow_CSBs = FALSE, LKTsToKeep = NULL, assay_for_matrix = "BaseCounts", wantedfeatures = NULL, wantedsamples = NULL, asPPM = TRUE, PPM_normalize_to_bases_sequenced = TRUE, PPMthreshold = 0, append_metatada = TRUE, include_samples_with_zero = TRUE, retu...
02217185189537401ef6d895899137bda7aa26081b4b448a08e35524b792b6b4
R
15,911
282
--- title: "Setbp1_AmbientRNA_SoupX_02" author: "Jordan Whitlock" date: '2023-04-12' output: html_document --- # *Single-nuclei analysis: Run SoupX* * Loading libraries * Selecting resolution * Investigating top markers for Kidney Cortex * ID cell types for SoupX All resources for running SoupX were found in the foll...
a33918a2864b51320156c6ebdc5c62e0ef37fc25062ba85b519de103aee76b13
R
15,916
337
--- title: "03_alpaca_network_analysis" output: html_document date: "2023-06-20" --- Goal: Identify the overlap between all community and cell type pairings for each tissue as well as only between the Communities containing TF Setbp1. * Cerebral cortex: TF Setbp1 is in community 1 * Kidney: TF Setbp1 is in community ...
a2da8e967daf1d3380e3b0aef138105fcdf1b0925a4d30fd57c28a187b737710
R
15,942
429
#' Calculate dissimilarities #' #' These functions are designed to calculate dissimilarities on data stored #' within a #' \code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-class]{TreeSummarizedExperiment}} #' object. For overlap, Unifrac, and Jensen-Shannon Divergence (JSD) #' dissimilarities, the function...
af4b91540d69772abc9c61ba82fe2eff7e98f4f7b9d3822396acb64d0cb4d599
R
15,946
395
# creates # - connectivity table for paper - SupplTable-S5-connectivity-stats.xls # - DotPlot of connections - SupplFigure-S5-source-target-interactions.png # - known melanoma driver gene ranking in networks - SupplTable-S6-key-driver-ranks.xls library(ggplot2) library(gridExtra) library(parallel) library(xlsx) li...
954076c04e8bec805d72b00155dd6089573995fb8d1e79d62f9c961f97e1a5e3
R
15,988
338
rm(list = ls()) options(stringsAsFactors = F) options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/") # options(BioC_mirror="https://anaconda.org/bioconda/") options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")) getwd() setwd('C:/Users/LWH/Downloads/bioinfo/IPF&CHD&SSc') library(biomaRt) library(cl...
52b156cb63bfaf63a20990e1798e4e17a7a09dd07b8545f66b1f758df3490f83
R
16,010
630
# Don't perform any further tests on CRAN due to parallelisation issues. testthat::skip_on_cran() testthat::skip_on_ci() apply_vector_fun <- function(x) { Sys.sleep(x) return(x) } apply_vector_fun_2 <- function(x, y) { Sys.sleep(x) return(y) } apply_list_fun <- function(x) { Sys.sleep(x) return(list("...
58255d0c5738d958e5d4e959cbb00b828b76d6a16070d94ce6597c9e5e271b89
R
16,026
419
#' Convert a \code{TreeSummarizedExperiment} object to/from \sQuote{BIOM} #' results #' #' For convenience, a few functions are available to convert BIOM, DADA2 and #' phyloseq objects to #' \code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-class]{TreeSummarizedExperiment}} #' objects, and #' \code{\link[Tr...
97c291c4d5139295f00b353e1f3946c3030f3da4ba733cebc94c93501813541c
R
16,274
411
#' Import Metaphlan results to \code{TreeSummarizedExperiment} # #' @param file \code{NULL} or \code{DataFrame}-like object. Defines the file #' path of the Metaphlan file. The file must be in merged Metaphlan format. #' #' @param col.data a DataFrame-like object that includes sample names in #' rownames, or a sing...
f828bd83e1f03a27e9708aedd789fd693df76f1e5ddac059146d9ae1ef63c650
R
16,317
307
#' check_resources(opt = opt, application = "WGS") #' #' JAMSalpha function #' @export check_resources <- function(opt = opt, applications_to_check = c("base", "reads", "assembly", "kraken", "host", "annotation", "16S", "blast")){ opt$abort <- FALSE deplist <- list(base = c("pigz", "wget"), reads = c("sratool...
46533534c37c89ff5df03c57aeaae54a1dd7a27caae46033a2bd117d10ee1576
R
16,329
245
#' titrate_feature_counts(ExpObj = NULL, glomby = NULL, only_allow_CSBs = FALSE, samplesToKeep = NULL, PPM_thresholds = NULL, completeness_thresholds = NULL, n_ppm = 10, n_comp = 10, prevalence_pct = 5, PPM_normalize_to_bases_sequenced = FALSE, ignoreunclassified = TRUE, class_to_ignore = "N_A", return_plots = TRUE, ve...
cc9967d889b0869df3462aa4bdc70844e8f14592d631b7906ab35b2192525af2
R
16,477
296
--- title: "rev_plot_icc_measures" output: html_document date: "2022-10-10" --- ```{r} library(tidyverse) library(glue) library(ggnewscale) options(scipen = 999) ``` ```{r} icc_sub_meas <- read_csv("/PATH/TO/INPUT/icc_metrics_sub_100_40.csv") icc_task_meas <- read_csv("/PATH/TO/INPUT/icc_mertics_task_100_40.csv") icc...
45419634ccb906b50028c678992e487647eb7303085bf01615899554adba8e61
R
16,484
580
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarSurvRegr ------------------------------------------------------------- setClass( "familiarSurvRegr", contains = "familiarModel", slots = list("encoding_reference_table" = "ANY"), prototype = list("encoding_reference_table" = NULL) ...
5445de192adc1e58dc1c93fbddc2b270d6d9d12de84068f71ba79d5c3d72d607
R
16,522
466
############## ### Script ### ############## # Run Gibbs sampler for BLESS model (= Bayesian Lesion Estimation for a Structured Spike-and-Slab Prior) with MCAR prior over sparsity parameters. # (Code for Simulation Study) ################# ### Libraries ### ################# library(LaplacesDemon) library(brglm2) li...
5768e4d479d6d701c9da6f9c382dc5ce67fc3aec9ed7c43bfeb628ae15305e9a
R
16,599
571
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL setClass( "familiarRegressionVimp", contains = "familiarVimpMethod" ) setClass( "familiarUnivariateRegressionVimp", contains = "familiarRegressionVimp" ) setClass( "familiarMultivariateRegressionVimp", contains = "familiarRegressionVim...
d17ee2c50e62e6f8578a1b3e077ce01268d0e5bf3e45e12100c2eac7ba85b883
R
16,678
410
############################################## # Generate a heatmap with bulk and single-cell RNA data # Updated: 2020.05.31 # Author: Kevin J. ################################################## ## Project working directory mybasedir = "/Users/johnsk/github/" setwd(mybasedir) ######################################## ...
13f33f85a09ab8ab3b2c335fb5a502476ed77338811fcbf26c39695f3df6a55e
R
16,826
555
testthat::skip_on_cran() testthat::skip_on_ci() # Train a model to transfer settings. data <- familiar:::test_create_good_data("survival") # Train a simple linear GLM using the good dataset. fam_model <- familiar:::test_train( data = data, cluster_method = "none", imputation_method = "simple", hyperparameter_...
8f3c6d03cea852cbdeb205d19b85b19beac775b97c1f472a6e1062be82b055e0
R
16,829
309
# export.R shinyFileSave(input, "export_r", root=c(`Working Directory`='.', getVolumes()()), filetypes=c("rds")) shinyFileSave(input, "export_excel", root=c(`Working Directory`='.', getVolumes()()), filetypes=c("xlsx")) observeEvent(input$export_format, { shinyjs::hide("export_excel_opts") shinyjs::h...
bf760c70ee0a9f1f417e77cece7fdd85d0482aec332d05cec1b7705581e5c2ff
R
16,849
316
################################## # Investigate relationships between promoter DNAme and other variables (Klughammer et al. Nature Medicine). # Updated: 2021.05.12 # Author: Kevin J. ################################### # Working directory for this analysis. mybasedir = "/Users/johnsk/github/" setwd(mybasedir) ######...
40ba8adeca82987f8f736405d5ee0e5fe653776e6e7b6bb5d78dc365ee02758b
R
16,905
374
--- title: "Performance metrics" author: "Alex Zwanenburg" date: "2026-08-21" output: rmarkdown::html_vignette: includes: in_header: familiar_logo.html after_body: license.html toc: TRUE rmarkdown::github_document: html_preview: FALSE includes: in_header: familiar_logo.html a...
c1ba64e931210fbc2f48619ad4b18083b3aaa8a31f80f4103855bcd10e4b7df0
R
16,975
376
--- title: "Performance metrics" author: "Alex Zwanenburg" date: "`r Sys.Date()`" output: rmarkdown::html_vignette: includes: in_header: familiar_logo.html after_body: license.html toc: TRUE rmarkdown::github_document: html_preview: FALSE includes: in_header: familiar_logo.html ...
dd683e9be41a9eccf727690d0088ffb89a372ed4f8abc36f55f9af00e01640d1
R
17,009
398
--- title: "Setbp1_CellTypesCortex_05" author: "Jordan Whitlock" date: '2022-09-08' output: html_document: toc: true toc_depth: 2 toc_float: true --- # *Single-nuclei analysis: Identify Cell Types Cerebral Cortex* * Loading libraries * Selecting resolution * Investigating top markers for Cereb...
15fbf205e471f5ddd62525a4803567e68c83cbbb04a3c735c7ce281f307a55cb
R
17,011
454
#' Exporters to common formats for microbiome data outside of R #' #' @name export-methods #' @aliases exportRaw exportQIIME2 exportMothur #' #' @description #' There are a few very popular external tools for microbiome analysis, #' including QIIME2 and mothur. However, R does not currently provide any class #' to acco...
b0671c52c2f9bc6d1518466a52b31e93f171733e17dcb1fb32ab3a4741e53322
R
17,022
490
familiar:::test_all_metrics_available( metrics = familiar:::.get_available_confusion_matrix_metrics() ) # Don't perform any further tests on CRAN due to time of running the complete # test. testthat::skip_on_cran() testthat::skip_on_ci() # power.transform and other packages are required. if (!rlang::is_installed("p...
d03f7191c4162fef947a6ac8560cc2fa7532242fe3ee826c582504a4c692ddde
R
17,174
323
#' EEGfMRIPav_4_StayBehavior() #' #' Perform mixed-effects linear and logistic regression testing effects of #' outcome valence, outcome salience, and performed action on stay behavior. #' as reported in behavioral results section. #' Interactive script, run step-by-step, NOT in one Go. #' #' Requires that .csv file...
b031c34b9038bf3c14dd9adce19409f23cb20396a6273796fdad3cbcff51cc7e
R
17,341
300
#' filter_experiment(SEobj = NULL, samplesToKeep = NULL, featuresToKeep = NULL, featmaxatleastPPM = 0, featcutoff = c(0, 0), GenomeCompletenessCutoff = NULL, GenomeContaminationCutoff = NULL, applyfilters = NULL, discard_SDoverMean_below = NULL, normalization = NULL, PPM_normalize_to_bases_sequenced = TRUE, only_allow_...
d369965f2439f4d3d9553f866b9b019b720a72a36903f8a5aacbc74310d19875
R
17,350
694
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarMetricRegression ----------------------------------------------------- setClass( "familiarMetricRegression", contains = "familiarMetric", slots = list("robust" = "character"), prototype = list("robust" = "none") ) # initialize ...
8daf0252a386b763180694b838dbc82c7df8bf57a9818cebc8b4da137c0b3834
R
17,395
650
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarDataElementModelPerformance object ----------------------------------- setClass( "familiarDataElementModelPerformance", contains = "familiarDataElement", prototype = methods::prototype(value_column = "value") ) # extract_performanc...
4d3206be44d154e7fdeb1ca6af39b654b989f08277810b04e8a46ce61d1d30b0
R
17,416
340
################################## # Determine the DNAme differences between cell states (separately for IDHmut & IDHwt) # Updated: 2021.05.16 # Author: Kevin J. ################################### # Working directory for this analysis. mybasedir = "/Users/johnsk/github" setwd(mybasedir) #############################...
c94e03e6c44aa3d87c8b9f60b60576f5d47eaccf5187b0613d20311ccde57b27
R
17,489
387
# Save method for model saving. The save function appears in base and is always # explicity imported. setGeneric("save") setGeneric(".complete", function(object, ...) standardGeneric(".complete")) setGeneric(".copy", function(object, ...) standardGeneric(".copy")) setGeneric(".predict", function(object, data, ...) s...
f40590a2331144dd6c22558ed44e955ba9b2225eb26de236ed1e5d08cbf14255
R
17,537
396
context("mergeSEs") test_that("mergeSEs", { # Load data data(GlobalPatterns, package="mia") data(esophagus, package="mia") data(enterotype, package="mia") tse1 <- GlobalPatterns[1:50, ] tse2 <- esophagus[1:50, ] tse3 <- enterotype[1:50, ] # Expect errors expect_error( merge...
69ff0441aae1d007e7cd6fc4b0e75df6cc201999d692aa6d6803792d149770d9
R
17,640
467
#' Perform mediation analysis #' #' \code{getMediation} and \code{addMediation} provide a wrapper of #' \code{\link[mediation:mediate]{mediate}} for #' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}}. #' #' @param x a #' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{Su...
fb6ea2eb8bb4f70d51046edd398a757ad06173bb77fe18c58c16679c55aa5bc2
R
17,713
618
#' @include FamiliarS4Generics.R #' @include FamiliarS4Classes.R NULL # familiarTaskVimp ------------------------------------------------------------- setClass( "familiarTaskVimp", contains = "familiarTask", slots = list( "vimp_method" = "character", "hyperparameter_file" = "character", "feature_in...
c68a0a579aaaa1a1e626092de93a1be5848016857d460b160df091f1f4aa0f8e
R
17,789
434
#' \code{mia} Package. #' #' \code{mia} implements tools for microbiome analysis based on the #' \code{SummarizedExperiment}, \code{SingleCellExperiment} and #' \code{TreeSummarizedExperiment} infrastructure. Data wrangling and analysis #' in the context of taxonomic data is the main scope. Additional functions for #' ...
ee04fcf6e0756d426b1192444b68a3e779f3f4819136e4de09af05c7383b7d86
R
17,799
338
#!/usr/bin/env Rscript ############################### ############################### #" ## Fingerprinting - CAMCAN Cohort ## Data Analysis - Regression - FPC #Script - Data Analysis - Regression - Var ~ ICA #Author: Frederic St-Onge #Date created: 2021-12-21 #Date modified: #Version: 2.0 #-------- #Purpose: #--...