sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
0f249c3f8d7109983063114567bf188b67e25525c997d07980fa104d399d75ac
R
13,875
555
# Note - doesn't plot by treatment # use for baseline plot to show the median for each slice # ROI medians, colored by slice # slice medians, larger circle # median of slice medians for the group +/- IQR # mean of slice medians for group +/- SEM mmm_plot <- function( df , res , y_title , groups , colorBy = "m...
1986f25dcfa28d6d5dd49f2b653e66d05b0ca0fe3239f52edb585d59eb98f264
R
13,926
397
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(Seurat) library(scales) library(scico) library(tictoc) library(shades) library(ComplexHeatmap) library(circlize) library(viridis) # read in annotated data # da...
6435a9b74fd7918f68dd7586b4048f4db31685d3fefef5c947d48bf570f83b85
R
14,021
565
writeToWorkbook = function(sheetName, df, wb, tableStyle = "TableStyleMedium2"){ addWorksheet(wb, sheetName) writeDataTable(wb, sheetName, df, tableStyle = tableStyle) } saveDFsToExcel <- function( fileBaseName, prefix = filePrefix, addDate = Sys.Date(), saveFolder = dataOutputFolder, ... # use sheetName...
ef0a02f48479b124e81506978a9f99445577d63e05954baea20bbc1e60e469bd
R
14,487
394
library(shiny) library(dplyr) library(ggplot2) library(DT) library(leafcutter) library(reshape2) library(gridExtra) library(intervals) # needed for pretty strand arrow placement library(foreach) library(shinycssloaders) library(grid) library(gtable) library(ggrepel) #data.table is required # library(shinyjs) #### optio...
59ba86fc24830299fbd11148dbc4070932df74f66bfb45af499b03d8d1b7374a
R
14,669
415
#' @import dplyr tibble NULL #' Fit (regularized) generalized linear model #' #' @param formula An object of class \code{formula} with a symbolic description #' of the model to be fitted. #' @param data A \code{data.frame} containing the variables in the model. #' @param method A character string indicating the metho...
40d9360a0a4b54a08606e0d8af1eeabc9610209bebc3123955b6064fb3a14c1a
R
14,912
279
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(Seurat) library(sctransform) library(scales) library(harmony) ## read the sctransform-normalized seurat object selected_celltype <- "Exc" data_obj_sub <- read...
4696dd5015398c6e04c0c6aff9d65deb58cfff64ac44958487b036c7f3d4ed62
R
15,045
361
#!/usr/bin/env Rscript library(optparse) option_list = list( make_option(c("-i", "--input"), type = "character", default = NULL, help = "Input VCF file"), make_option(c("-s", "--style"), type = "character", default = "ncbi", help = "[nbci] for 1,2,...X, or [ucsc] for chr1, chr2, ...chrX"), make_option(c("-g"...
c4397aac45190f6d16766c1efadd19985b4d75fcbd37316d3b3302de75a663d1
R
15,105
380
library(tidyverse) library(lme4) library(lmerTest) install.packages("remotes") remotes::install_github("stan-dev/cmdstanr") library(cmdstanr) install_cmdstan() library(brms) library(ggplot2) #Read data, convert and rename factor variables dat<-read.delim("Data_Neuroanatomy.txt") brains <- dat %>% mutate_at(vars(c('...
8a76bee1d9d7167ef691a37d8e325e998819cb2c2af14847bdd0a0a8c4d916c4
R
15,142
466
# This is the SCEBE algorithm that we downloaded from -> https://github.com/Myuan2019/SCEBE ####functions # 计算时间差 timediff <- function(End_time, Start_time){ return(difftime(End_time, Start_time, units = 'secs')) } ##SPR for NEBE slmm <- function(y1,y2, X){ n1 <- length(y1) n<-n2<-n1 y1bar <- mean(y1)...
713253a4caca095e3c1867f31b099b84d8de3213eb97536cacd6ce1d56d7ac8a
R
15,262
438
#### Thank you for using our code, wish you all the best! #### # Note: In this script, our code comments are not very detailed, # please see the simulation code of Homo-Area for detailed comments. # The main difference between Compo-Area code and Homo-Area code is to assign- # different properties to each sub-regi...
f4bcd0988fec6eb6fba2905c031b1c7ff79070f6412bc44dc38b6442b2dde9cb
R
15,405
367
library(testthat) library(gUtils) setDTthreads(1) gg.jabba = gG(jabba = system.file('extdata/hcc1954', 'jabba.rds', package="gGnome")) test_that('gtf2json', { # download light weight gtf system('wget http://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_19/gencode.v19.long_noncoding_RNAs.gtf.gz') gtf...
bd15af2dfb69cc710e712e0d91f0809543e279caa15edae0351ec4d08dd656e1
R
16,046
428
library(tidyverse) library(ggrepel) library(patchwork) auc_df <- bind_rows( "ALS_vs_Control_MCX" = read_tsv("augur_out_obj_ALS_vs_Control_MCX_level2_nSubsamples_50_subsampleSize_200_folds_3.tsv"), "ALS_vs_Control_mFCX" = read_tsv("augur_out_obj_ALS_vs_Control_mFCX_level2_nSubsamples_50_subsampleSize_200_folds_3.ts...
6ee39042a0326b8fef9a0582ced722907c8f9516d8a5060d6e98302156362bbd
R
16,465
417
library(JaBbA) library(gUtils) library(testthat) context('JaBbA') jj = system.file("extdata", "junctions.rds", package = "JaBbA") empty.jj = system.file("extdata", "empty.junctions.rds", package = "JaBbA") tier.jj = system.file("extdata", "tier.juncs.rds", package = "JaBbA") sg = system.file("extdata", "segs.rds", pac...
0b4967dae16aff9b68e127c27090ad49cfc46ac5351886e9f88d712d980c4955
R
16,481
425
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(Seurat) library(sctransform) library(scales) library(ggrastr) library(shades) library(ggbeeswarm) library(ggpubr) library(scico) ## read the sctransform-normal...
d00c119a423605703b75a75bd13066fdfc4475b2aae9d6d6d3ced298eb3c59df
R
17,654
420
#' Encode signal into Poisson spikes #' #' The 'code' is just a Poisson spike train for a given group of neurons #' This function will return a data frame with (group_index,spike_time) columns #' #' Some other stuff here. #' #' @param codebook constructed using construct_codebook function #' @param symbol symbol to ...
6f540d1cc90ad352f5dc8644c2361636d7a98329b96230a3f1b4be818b53a8cf
R
17,858
363
#' @title Bayesian Guided Sparse Factor Analysis on Perturbed Gene Expression Matrix #' @description Performs GSFA on given gene expression matrix and matching perturbation #' information using Gibbs sampling. #' @details Uses functions implemented in Rcpp from \code{GSFA_gibbs_inference.cpp}. #' For details about the ...
7a87a0138a88ce9807f9a625ac1ae286bab04e5ab7a912ae5553d15bb1a87334
R
18,337
555
##Using StringTie with DESeq2 analyzing Nasonia RNAseq data rm(list=ls()) #clear all objects gc() #dataset: #Nasonia RNAseq data #experimental light treatment and dark control #4 different time point: 0.5h 1h 2h 4h #8 sample groups #3 replicates per experimental sample group, 2 replicates per control sample ...
efb44fb53dc383f9cb48cb088a5cde9278c31c2d06ccd09eac9c9a66f9f03827
R
18,689
544
#' Print diagnostic message #' #' @param ... Text to print #' @param verbose Display messages log_message <- function(..., verbose=T){ if (verbose){ message(paste0(...)) } } #' Find peaks or regions near gene body or TSS #' #' @param peaks A \code{GRanges} object with peak regions. #' @param gene A \...
208afc4e7d58348ca38fdad1180a2c35d56cfca215aaa4e4768ab4746effdd0c
R
18,885
431
#' Make cluster level plot #' #' @import ggplot2 #' @importFrom gridExtra grid.arrange #' @import intervals #' @export make_cluster_plot <- function( cluster_to_plot, main_title = NA, exons_table = NULL, meta = NULL, cluster_ids = NULL, counts = NULL, introns = NULL, snp_pos=NA){ if( is.null(cluster...
5975fe41db894b70dbaefb101a39397f0283748d696b6d1ba2ed1ca216840204
R
20,217
651
#' @import dplyr tibble ggplot2 ggraph tidygraph pals NULL #' Removes legend from plot. #' #' @export no_legend <- function(){ theme( legend.position = 'none' ) } #' Removes margins from plot. #' #' @export no_margin <- function(){ theme( plot.margin = margin(0,0,0,0,unit='lines') ) } ...
39a0fd577c26583eca2ee3d121861bc179790ce1fe06684ab9adc8b0f08f50ea
R
20,249
730
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(Seurat) library(scales) library(scico) library(tictoc) library(shades) # read in annotated data # data_obj_sub <- readRDS("./seurat_objects/snRNA_cellBneder_co...
84de971411cb1e18de6f7a3f6a45b365c998494ce38a99fd14c89d62ac5d7234
R
20,393
542
#!/usr/bin/env Rscript #options(echo=TRUE) #### Jack Humphrey 2017 ### annotate the output of differential splicing ## and prepare for visualisation library(optparse) option_parser=OptionParser( usage="%prog [options] <name>_perind_numers.counts.gz <name>_cluster_significance.txt <name>_effect_sizes.txt annotation_...
591173f406ac32c89a6993f086c4c69629e3f2333961b44b81f78dd9b066464a
R
21,198
430
--- title: 'Imputation of splitted UPDRS measures' author: - name: "Alejandro M.Carrasco" affiliation: UCL output: html_document: css: ./font/missingexploration_fontsize.css code_folding: hide theme: paper highlight: kate df_print: paged fontsize: 20pt toc: true toc_float: true ...
57675eba1b56a73e00dbccd5c21c02ef5ca8e7a3a30574a9392dc405340c7d9c
R
21,202
481
#!/usr/bin/env Rscript #### # load the libraries ### .nozzleLibraries <- function() { print('...loading libraries') RLIBDIR = '/xchip/gistic/Jeremiah/R/x86_64-unknown-linux-gnu-library/3.1/' GIT.HOME = '/xchip/gistic/Jeremiah/GIT/' ISVA.HOME = paste(Sys.getenv('GIT_HOME'), '/isva/', sep = ""); .libPaths(c(...
31d93d2e49aca877b0de27aa3654dc4bcf3f405f3fa88b5be470ecdb1c4f2bc5
R
21,964
445
--- title: 'Sensitivity analysis' author: - name: "Alejandro M.Carrasco" affiliation: UCL output: html_document: css: ./font/missingexploration_fontsize.css code_folding: hide theme: paper highlight: kate df_print: paged fontsize: 20pt toc: true toc_float: true number_sections:...
691113c5a407766d68bf90d321d84cda9bc255824f4b7ee9cb5c4fa56c187fd2
R
22,877
621
require(tidyverse) require(entropy) setwd('~/git/dissertation/thesis/Chapter 04 - A variable-length code/src/simulations/') source(file='~/Dropbox/Apps/ShareLaTeX/CogSci 2019 (Camera Ready)/code/transmit/R/transmit.R') hyman_transmit <- function( codebook, signal_power, noise_power, timesteps, time_interval,...
549bc302a3842a2b2878b563dec7dcebc4e3e69bc1ea974e16ecaf187c5a8612
R
23,086
799
library(tidyverse) library(ggrastr) library(ggrepel) library(shades) library(plotly) library(htmlwidgets) library(writexl) DE_level_2 <- read_tsv("MAST_res_level2_splitControls_summary.txt") # write_xlsx(DE_level_2, "MAST_res_level2_splitControls_summary.xlsx") full_DE_level_2 <- read_tsv("./MAST_res_level2_summary.t...
daa64572d0a6528d463c128492a565adb69964bcec6e7c9f91adb7fede747727
R
24,016
594
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(ArchR) metadata <- read_tsv("metadata_merged.txt") # full dataset p <- metadata %>% ggplot(aes(predictedScore_from_snRNA_full_level2)) p + geom_histogram() + ...
527ab3d5287cdd88179b2b63bc139eac8ec2c6429fcef3e7425ed76d33d5eb69
R
24,232
831
library(tidyverse) library(viridis) library(scico) library(pheatmap) library(plotly) library(htmlwidgets) library(ggrastr) # read full DEG list full_DE <- read_tsv("./MAST_res_level2_summary.txt", col_types = "cccciicdddddllddd") # read DEG list generated by separating male and female samples separate_sex_DE <- read_t...
527a13566e882700e1d1d9bf4f42df9e3bf8ff5891a77e8c18d63bcac4341dfa
R
24,630
530
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(Seurat) library(sctransform) library(scales) library(ggrastr) library(scattermore) library(cowplot) # read in clean dataset with 2nd round annotation (V2, remo...
3dd3413ff112893973a64bb0d73179c9643c4d95066939263a3ea72a02468229
R
25,092
734
library(Matrix) test_that("Predictor's finalizer should not fail", { X <- as.matrix(as.integer(iris[, "Species"]), ncol = 1L) y <- iris[["Sepal.Length"]] dtrain <- lgb.Dataset(X, label = y) bst <- lgb.train( data = dtrain , params = list( objective = "regression" ...
ba115ac3f3d63b0b0d0ff5e781c4b745acb28c900b3607cac4b8db1aced42e74
R
26,476
614
--- title: 'Model generation' author: - name: "Alejandro M.Carrasco" affiliation: UCL output: html_document: code_folding: hide theme: paper highlight: kate df_print: paged toc: true toc_float: true number_sections: true --- ```{r setup, include=FALSE} library(tidyverse) # For t...
af6ea8715d35186741ca60d20851c46a5e4420991f3772150f400c24d604652f
R
27,316
576
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
14e38e8bb77a5bb62901ff8e017de24b8b4d9d4ab7c2b0a1aeda97f16265af9d
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
303a310479e46f8b46737ba6847f0cb428148a4a1537ec25e83d9e1ef209d32f
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
399a7a15d620c6b6d0f17076f0ea9603b3133466a0ce471719d72a3d585d72ec
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
43c3918189adc1165ab2ebe7382f0615052a887698da9dc888c12eedd06c8a28
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
55829bafb53f1a1b045bd286b0fe4564b4d20d73695d596163399104dc6e3ccb
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
9ef63bd5f04bdf89736ce81793869c2f7646a089be49edaffbaa0b9784b3e8f5
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
f347b41491d7f5762f9934d0b2982017177bd2686d43b2efb1926d67880fc06b
R
27,317
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
ce8fe734ec56a858ddd5fea06abb3a1f7f9704ee4c3c3bfe865dabfaae5ac4cb
R
27,319
577
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
8dee478266a738735548c38e4d3c2aef3bfc2b9d39328e5c52324bff22e24563
R
27,387
579
# Run before app.R # Clear workspace rm(list = ls()) library(shiny) library(shinyBS) library(shinyWidgets) library(tidyverse) library(stringr) library(Matrix) library(Seurat) library(metacell) library(scater) library(Biostrings) library(igraph) library(plotly) library(data.tree) library(collapsibleTree) library(phyl...
4947d54b77b03362cc886b868a2f070bcc90e5976f059f0f3bf1a4496ef15efe
R
27,523
554
#In this preprocess part, we cite RCTD's preprocess code(Dylan M. Cable, et al. Nature Biotechnology.) #Citation in our Methods parts. setClass("Reference", slots = c( cell_types = "factor", counts = "dgCMatrix", nUMI = "numeric" ), prototype = list(...
a998d5fb7e9406858581379761ca528ff9ddfdcd4e5005ed9069ac792610d8e6
R
27,547
773
--- title: "coloc_metaBrain" author: "AMCalejandro" date: "18/4/2022" output: html_document: df_print: paged highlight: kate code_folding: hide number_sections: yes theme: spacelab toc: yes toc_float: yes --- ```{r results="hide", warning=FALSE, message=FALSE} .libPaths("/data/kronos/kron...
1e9fce46e02576c16c67f88729bfa3dd21a5a3025cc4b0587fb1d6a75ab10480
R
27,678
669
--- title: 'Data wrangling' author: - name: "Alejandro M.Carrasco" affiliation: UCL output: html_document: code_folding: hide theme: paper highlight: kate df_print: paged toc: true toc_float: true number_sections: true --- ```{r setup, hide = TRUE} library(tidyverse) # For tidy ...
6fbddb746b65f59386353151c61189b1e56a053ba5f98cbe4619ba9ded51b58c
R
29,010
687
#' Make gene level plot #' #' Take a gene name or ID, search the counts matrix for all clusters that fall within that gene's boundaries (found from the exon table). #' @import ggplot2 #' @export # # # gene_name <- "ADIPOR2" # clusterID <- NULL # min_exon_length <- 0.5 # cluster_list <- clusters # # for testing - crea...
afa05c512b847d999548d7e3d6be2462122affd10889cd58b321f9c9dff1f3b8
R
29,546
774
#' @import dplyr tibble NULL #' Infer a Gene Regulatory Network with \code{Pando} #' #' @import Matrix #' @import sparseMatrixStats #' @importFrom purrr map_dfr map_lgl map_dbl map #' @importFrom stringr str_replace_all #' #' @param genes A character vector with the target genes to consider for GRN inference. #' Take...
86a5bcdc0828e4a5716f8eb2fd8965936a5308a0242a2909eedb0e2a40550d67
R
30,070
816
########## ########## KH additional functions ########## ## #' @name eclusters2 ## #' @title gGraph R6 public method eclusters2 ## #' ## #' @description ## #' Marks ALT edges belonging (quasi) reciprocal cycles ## #' ## #' ## #' @param juncs GRangesList of junctions ## #' @param mc.cores parallel ## #' @param only_c...
d0bd13ecef92087306d1d8a3d3f12b44980db76c9a36cee9edc3c4f78dba739f
R
30,478
957
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(DESeq2) library(Hmisc) library(ggpubr) library(patchwork) # read in pseudobulk grouping metadata sample_info <- read_tsv("./pseudobulk_group_metadata.tsv") # ...
0dc9cbf004814f2e8ef4cb5db904f8ed80b4b645d1c1b1d739c44d90feed1a59
R
31,819
774
#!/usr/bin/env Rscript ## set the right library paths .libPaths = c("/xchip/gistic/Jeremiah/R", "/broad/software/free/Linux/redhat_6_x86_64/pkgs/r_3.1.1-bioconductor-3.0/lib64/R/library") require(data.table) ra_breaks <- function(rafile, keep.features = T, seqlengths = hg_seqlengths(), chr.convert = T, snowman = FALS...
967a27143eb3cd39d74b1b961ac41f6bd295ddddbefea2de19af03144ea0610d
R
33,036
775
# one create PGV instance # inside we have the add function to initialize the PGV datafile.json and get pointers to where all the files are # also set up datafiles.json and get pointers to where the data folder and datafiles.json are being stored # will need to set up datafiles.json and data folder along with backups ...
8c31d3a436f2e3fcd38d4083f2d446c8e9a7a6f86fda0d41bf697ce9fda1249b
R
35,953
864
#!/usr/bin/env Rscript ## set the right library paths .libPaths = c("/xchip/gistic/Jeremiah/R", "/broad/software/free/Linux/redhat_6_x86_64/pkgs/r_3.1.1-bioconductor-3.0/lib64/R/library") file.dir <- function(paths) { return(gsub('(^|(.*\\/))?([^\\/]*)$', '\\2', paths)) } require(data.table) suppressMessages...
fee05364b2e42e12cd08ac436309ceee2f796a3568a81280fb23bb495b36548d
R
37,068
1,570
getAD_Pval <- function(result, version = 1, fromPaired = FALSE){ if(fromPaired){ result <- result$test_result } tbl <- result$ad tbl_tibble <- tbl %>% as.tibble() p_val <- tbl_tibble$` asympt. P-value`[[version]] return(p_val) } getAD_vals <- function(result, version = 1, fromPaired = FALSE){ if(from...
8f1caacb6bc72f58dbfb0300e6f2dc46123c96bc12fcfd8bf561f9e139977a4b
R
38,029
703
#setwd("~/LampreyBrainApps/Apps/ad_brain/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "AdultEncephalon", id = "lb", position = "fixed-top", theme = "bootstrap_ad_brain.css", # Taxonomy tab ...
eb1a41bcbfd57d75665575c1e765c91eb4fef204389e530d71ba8402b56fa1c0
R
38,031
703
#setwd("~/LampreyBrainApps/Apps/am_brain/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "LarvalEncephalon", id = "lb", position = "fixed-top", theme = "bootstrap_am_brain.css", # Taxonomy tab ...
7730fb775643b6c51dda41ddec7e880d067657cfef64a8b6a91054f8c659022f
R
38,034
703
#setwd("~/LampreyBrainApps/Apps/ad_midb/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "AdultMesencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_ad_midb.css", # Taxonomy tab ...
c4ddbd5f81879a3ba6f720288020c9aaad7c7f134f7b1aa7db1adbcb9d0594fa
R
38,035
703
#setwd("~/LampreyBrainApps/Apps/am_midb/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "LarvalMesencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_am_midb.css", # Taxonomy tab ...
5e5f6f180e8364c0c3c6d083d2c37abdfd9da52485077a71e77651897e9a2400
R
38,037
703
#setwd("~/LampreyBrainApps/Apps/ad_hind/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "AdultRhombencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_ad_hind.css", # Taxonomy tab ...
6642363898cf3bd905065cb9104a1a0ffef82f067e5baf9ec50bcc8c3f110179
R
38,038
703
#setwd("~/LampreyBrainApps/Apps/am_hind/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "LarvalRhombencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_am_hind.css", # Taxonomy tab...
ef8056746d1a2c6b50480ac0b7766b957f7645444d337766ffad381773af5324
R
38,179
703
#setwd("~/LampreyBrainApps/Apps/ad_tele/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "AdultTelencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_ad_tele.css", # Taxonomy tab ...
960d0a53a1c7c8f6acc2bc6a376ce834beec327d5a051a180f77e309ccec07f1
R
38,180
703
#setwd("~/LampreyBrainApps/Apps/am_tele/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "LarvalTelencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_am_tele.css", # Taxonomy tab ...
7a9a7aa809ca7de9f03d5965d90d887a83da7bb08b9c6069cf1c72d539531656
R
38,395
707
#setwd("~/LampreyBrainApps/Apps/ad_dien/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "AdultDiencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_ad_dien.css", # Taxonomy tab ...
3d31311ad071d678688177ceff52e9586d84116f6c98c73ea44883da638673e5
R
38,396
707
#setwd("~/LampreyBrainApps/Apps/am_dien/") source(file = "prepare_env.R") # User interface (client) ui <- navbarPage(title = "LarvalDiencephalon", id = "lb", position = "fixed-top", theme = "bootstrap_am_dien.css", # Taxonomy tab ...
f011009fe01e86d3f5a623df3b251ebadce14d72acba8289d115636936c94683
R
38,910
987
--- title: "COLOC against PsychEncode and eQTLGen" author: "AMCalejandro" date: "18/4/2022" output: html_document: df_print: paged highlight: kate code_folding: hide number_sections: yes theme: spacelab toc: yes toc_float: yes --- ```{r results="hide", warning=FALSE, message=FALSE} .libPa...
6646ca2f54c6406e936ec3f14b48edfbebf6b7578cbf00a5cabee3cf7aef2588
R
40,596
1,183
#RNA seq analysis #Written by Rebecca MacPherson as part of MacPherson et al 2022 (Listed in BioRxiv at the time of submission of this work) - Pleiotropic effects of the lncRNA Uhg4 in Drosophila melanogaster #Last Edited by Rebecca MacPherson 2022-05-21 #####Filtering and normalization of counts data prior to s...
4ed76de17ed1e5b9f7c792fbe5798ebfe66d1a630a4b9077d5e0d06e04731fee
R
41,803
972
####Code used to generate graphs for MacPherson, R.A. et al., "Genetic and Genomic Analyses of Drosophila melanogaster Models of Rare Human Diseases" ####Relevant GEO Accession number: GSE213763 ### Fly Models of CSS/NCBRS/CdLS ################## Sleep / Activity Plots ####################### setwd("path\\to\...
e0a4005a7c84c20611e9e93a7d9d2ef0f17865bc89116fe726ea1f16abf700d1
R
45,635
898
##Using StringTie with DESeq2 for Nasonia RNAseq data rm(list=ls()) #clear all objects gc() #dataset: #Nasonia RNAseq data #experimental light treatment and dark control #4 different time point: 0.5h 1h 2h 4h #8 sample groups #3 replicates per experimental sample group, 2 replicates per control sample group ...
41e9185d48a6079e48ba73af49624d7880f039dcd0c5a9facdbb7ecc06e7e2ff
R
46,143
1,036
# ST.FLAG = "-f 0x02 -F 0x10" # former default - DOES NOT EXCLUDE DUPS #' Samtools flags #' #' Samtools flags for fragCounter bam query #' -F exclude ANY bits set #' 3868 sets bits #' 4 - Read unmapped #' 8 - Mate unmapped #' 16 - Read reverse strand #' 256 - Not primary alignment (secondary alignment) #' 512 - Re...
24e84c4217db9645f9bd316f31b3d802d0e03ffed3745c11c641b6e380c9f483
R
52,761
1,556
library(tidyverse) library(viridis) library(scico) library(pheatmap) library(plotly) library(htmlwidgets) library(ggrepel) library(ggrastr) # read DEG list our_DE <- read_tsv("../MAST_res_level2_summary.txt", col_types = "cccciicdddddllddd") Manolis_DE <- read_tsv("Manolis_ALS_single_cell_DE_genes_June2021_submission...
a32f740ca9bc0cf37809579c727d0b7108691f526e7872ee4e6527ab0d4b0a5f
R
53,230
1,166
#!/nfs/sw/R/R-3.6.1/bin/Rscript library(dplyr) require(NanoStringQCPro) require(ggplot2) require(EnvStats) library('pheatmap') library(RUVSeq) library(DESeq2) library(limma) library(matrixStats) library(survival) library(stringr) library(survminer) library(limma) library(lsa) library(tidyr) library(biomaRt) library(...
d1c7ce28c178ca49c4f4bc01eecda8c90a64a9f886d6e5c68d139fe9199aa633
R
53,682
1,428
# Load library library(ggbiplot) library(tidyverse) library(edgeR) library(magrittr) library(viridis) library(gridExtra) library(ggrepel) # Read in data and tidy up # remove subject 908 exp_data <- read_tsv("allSamples_rsem_genes_results_counts_annotated.txt") %>% select(-starts_with("908")) tpm_data <- read_tsv("a...
02c609a67d799c3a4e6f121063f004cdfc11b2b0f6efb2405290ba0e4730e7aa
R
59,522
1,660
# logging which server was used to run this script system("echo \"Running this on ### $(hostname) ### \\(* w *)/\"") # load library library(tidyverse) library(ArchR) library(Seurat) library(BSgenome.Hsapiens.UCSC.hg38) library(viridis) library(scico) library(ggrepel) library(broom) library(future.apply) library(ggridg...
c7355d154acd13ccb981260eeab925ac7379b5676d0a2599267b220348329a01
R
65,839
1,743
library(testthat) library(gUtils) library(gTrack) setDTthreads(1) svaba = system.file('extdata', "HCC1143.svaba.somatic.sv.vcf", package = "gGnome") delly = system.file('extdata', "delly.final.vcf.gz", package = "gGnome") novobreak = system.file('extdata', "novoBreak.pass.flt.vcf", package = "gGnome") HGSL = c("1"=24...
63935c30da4c7265ec46761638668d7bb8b102318b0a7198206beb6cab64d02e
R
77,304
2,154
## appease R CMD check vs data.table sid=side1=side2=side_1=side_2=silent=snid=splice.variant=splicevar=str1=str2=strand_1=strand_2=subject.id=suffix=tag=threep.cc=threep.coord=threep.exon=threep.frame=threep.pc=threep.sc=threep.sc.frame=to=transcript.id.x=transcript.id.y=transcript_associated=transcript_id=twidth=tx.c...
6cad598e8834c20c38c6af4bc4459b3752637dec017e936f8b8122fa6f2b17f8
R
87,471
1,806
--- title: "[gGnome](https://github.com/mskilab/gGnome) Tutorial" author: "Marcin Imielinski Laboratory" output: html_document: toc: true toc_float: true theme: flatly --- ```{r cache=FALSE,echo=FALSE,results="hide", message = FALSE, warning = FALSE} knitr::opts_chunk$set(collapse = TRUE, fig.width = 8,...
4a481734d59364c48e5156aea002e17e071efabc2abc1a21f5b5ba3d12a98ac8
R
90,601
1,873
#' Generate a PGV instance #' @name pgv #' @description #' #' Takes a table with paths to gGraphs, coverage files, and gWalks (optional), and #' generates an instance of a PGV directory that is ready to visualize using PGV #' #' @param data either a path to a TSV/CSV or a data.table #' @param name.col column name in ...
928cf16fce7983bdb994a56744eda56cda1defc2c9498d540fae961085e06f20
R
93,413
2,474
library(shiny) library(here) options(shiny.maxRequestSize = 200 * 1024^2) # 200 MB; files stay local if (.Platform$OS.type == "windows") windowsFonts(Arial = windowsFont("Arial")) source(here("01-scripts/01-set-up.R")) # ---- Constants ----------------------------------------------------------- GROUPS <- c("DI", "...
b1c2f45b6611ed6dc86596e12a8d8d9992fabaff8a1b3c3c07767db6fd1a1d0f
R
112,323
2,689
############## # STARTUP ############## overall_start_time = Sys.time() cat(file=stderr(), 'Loading dependencies...') options(stringsAsFactors=F) if(interactive()) setwd('~/d/sci/src/scaso') suppressMessages(library(tidyverse)) suppressMessages(library(janitor)) suppressMessages(library(weights)) suppressMessages(lib...
4023e504fa2f296eaf33f9617ae8d7a0e8cdba483ad231159de4b92603ce4259
R
115,696
2,728
#' applications of gGraph #' @name balance #' @title balance gGnome graphs #' @description #' #' Here we analyze gGraphs with "cn" (copy number) field to enforce integer #' cn and junction balance, ie sum of incoming (or outgoing) edge #' cn should be equal to node copy cn. #' #' The goal is to find a balaned assignm...
8c35ddb11c392ab382e27f4920829d631788b6e5994f2719cc8fac7b00118975
R
119,332
2,911
# assigning this operator since sometimes R tries to use the ggplot2 operator instead of the gUtils one (depending on the order of libraries loaded in a session) `%+%` = gUtils::`%+%` #' @name breakgraph #' @title breakgraph #' #' @description #' Builds a gGraph by breaking the reference genome at the points specified...
287bd4e74e7207b9b3b792fcb9ec3984d5866dac189b25cc43d76bbf59541318
R
181,705
4,316
#' Proximity analysis of two genomic regions and rearrangment movement #' @name proximity #' #' @description Takes a set of n "query" elements (GRanges object, e.g. genes) and determines #' their proximity to m "subject" elements (GRanges object, e.g. regulatory #' elements) subject to set of rearrangement adjacencie...
c7a739f47dfc804150a6b53e748c40ed4eb929a15b84f0387610c7e5d37039b6
R
200,000
4,592
## appease R CMD CHECK misunderstanding of data.table syntax by declaring these global variables low.count=high.count=seg=chromosome=alpha_high=alpha_low=beta_high=beta_low=predict.var=dup=psid=.N=es=res=esid=pid=ub=lb=esid=dup=lb=ub=dup=y=dup=pid=lb=es.s.ix=km=es.t.ix=adjusted.ratio=ref.count.t=alt.count.t=depth.norma...
e91e95cbb3ff463db5f796630519d84e010c7fbc3aaac3e6573346caf67892d3
R
200,000
4,072
#' @name gGnome #' @title gGnome #' @description #' Reference-based graph representation of structurally altered genome #' employing GenomicRanges framework. #' #' #' Copyright (C) 2018 Xiaotong Yao, Joseph DeRose, Marcin Imielinski #' #' This program is free software: you can redistribute it and/or modify #' it ...
feec56fb8400af7ccfcf3576b797d6176c6a28dad408664536322b0648586993
R
200,024
4,215
--- title: "Different rules for binocular combination of luminance flicker in cortical and subcortical pathways" author: | | Federico G. Segala$^1$, Aurelio Bruno$^2$, Joel T. Martin$^1$, Myat T. Aung$^1$, Alex R. Wade$^1$ | & Daniel H. Baker$^1$ output: bookdown::pdf_document2: fig_caption: yes toc: no ...
9335a8b5a4f3650966bec83474b8ed1546361b2f4e8df446a9c358888879b432
Rust
53
3
pub mod coord_shift; pub mod iloc; pub mod tile_ref;
ad13fd8f2d953a20369dc4d44f730e9c289369e4b324829f0264dbe896e8ddb7
Rust
183
9
mod first_sam_file; mod genome_alignment; mod new_algo; mod output_data_types; mod second_sam_file; pub mod select_alignments; pub mod select_reads; mod split_read; mod te_alignment;
2c097bea6a573d8c7165e60e5407648fbe141526280a17b5f380c99fccdeb957
Rust
828
22
use path_abs::PathFile; use std::ffi::OsStr; use std::process::Command; use crate::utils; pub fn download(url: &str, output_file: &str) { // first, create the absolute filepath from the relative filepath (create it if it doesn't exist) let output_path: PathFile = utils::absolute_filepath_unchecked(output_file...
be340ea966f541a96b1ae7c83017e699c4b614b04ca1b9747bc4e9777bc44485
Rust
1,102
29
use lazy_static::lazy_static; use regex::Regex; // lazy static regexes to avoid multiple compilations lazy_static! { pub static ref SM_REGEX: Regex = Regex::new(r"^(\d+)S(\d+)M$").unwrap(); pub static ref MS_REGEX: Regex = Regex::new(r"^(\d+)M(\d+)S$").unwrap(); pub static ref HM_REGEX: Regex = Regex::new(...
0d36576a460e52b52aaf5eb479e498a40cf2f262d0bec9281744b42303dbc464
Rust
1,486
49
use anyhow::{Context, Result}; use std::collections::HashMap; pub struct Metadata { pub delimiter: String, // a map between positions and headings // note: the positions are 1-indexed to make it // easy to look at the file format and generate this struct // also, not all headings in the file need ...
88c71d4308cc4f5660c0c537de981dcdbbaa433733d5fd09160d17c6d9624c9b
Rust
1,716
55
use path_abs::PathFile; use std::fs::File; use std::io::BufRead; use std::io::BufReader; use std::str::FromStr; // represent insertion locations (within the reference) // and read them in from a TSV file #[derive(PartialEq, Eq, Hash)] pub struct ILoc { pub chrom: String, pub upstream_pos: u64, pub downstr...
53c8fb4e208821b32d255d451fa274b0768661b37c6d9bb71200590dc77bb3e6
Rust
2,218
65
use path_abs::PathFile; use rayon::prelude::*; use std::collections::HashMap; use std::fs::File; use std::io::{BufRead, BufReader, BufWriter, Write}; use std::sync::{Arc, Mutex}; use super::first_sam_file; pub fn select_reads( te_aligned_path: &PathFile, selected_reads_path: &PathFile, only_create_transp...
a053ddef461a6dec55a13f74812f043f3864c9a7c872595efd90d76553c420d7
Rust
2,318
68
use path_abs::PathFile; use serde_json; use std::collections::HashMap; use std::fs::File; use std::io::{BufReader, BufWriter, Write}; use super::genome_alignment::GenomeAlignment; use super::output_data_types::OutputInsertions; use super::second_sam_file; pub fn select_alignments( chroms: Vec<String>, min_ts...
963ed6ee7b4e8e3d744ecf6a947f6572d0e35edf7fcd3d2847770d0f5683ea09
Rust
2,737
78
use std::process::Command; use crate::utils; use crate::utils::Reads; // "fix" alignments by cleaning up read pairing information and flags // also compress from SAM format to BAM format to save space and // put the output in result_dir/fixed_alignments.sam fn samtools_fixmate(result_dir: &str) { let input_file =...
c393f825a8e6aa3e202bb78316af203d8bf73232f9d714181daf57a726c2777d
Rust
3,422
117
// process a split-read using Regex // CIGAR string [numbers]letter[numbers]letter... // Each set of numbers modifies the letter after it // S means "no match", M means "match" // We are only interested in the 2 letters S and M // note that H also means "no match" but it uses hard clipping // Matches with hard clippin...
92c3d852b6031e6e98009edbbcdc9a31fddf5a7090c75adc9effc7b553e901e4
Rust
3,439
93
use super::iloc::ILoc; // utilities to shift coordinates from normal coords to // TE-removed coords and vice versa // the coords may not be translatable // from the reference genome into the synthetic genome // because they could be within a transposon // If within a transposon, we want to store // the start and end ...
36c082cf139c16f66788d142313d279fb8a702a42b89295149d97dd9ef09b7aa
Rust
3,541
88
use path_abs::PathDir; use std::fs::File; use std::io::BufRead; use std::io::BufReader; use std::io::BufWriter; use std::io::Write; use std::str::FromStr; use crate::utils; // tile a set of artificial 150-bp-wide artificial "reads" across the reference genome // this will then be used by the TE mapper to look for tr...
f93f68b576c91cc2f77e3e7c877cef3f099f9c7dfe396b26a9d0c92250e22960
Rust
3,569
76
//! Step 4: orthologous pairs. Within each orthologous group, trees are pruned to //! the group and every node of the leaf-to-root walk votes ortho or para for the //! pairs it joins; pairs with ortho / (ortho + para) > ratio_ortho are reported. use crate::{create, lines, step3::key, Opts, Proteins, R}; use crate::tre...
da38db4873da9f042b9b21e4315c41fb4b0d2679113dcf3ad53a3222e8cddf62
Rust
4,244
123
use path_abs::{PathDir, PathFile, PathOps}; use crate::te_mapper_utils::{select_alignments, select_reads}; use crate::utils; use crate::utils::Reads; pub fn map( ref_name: &str, reads: &Reads, transposons_name: &str, result_dir: &str, bwa_threads: u16, output_should_be_json: bool, phase: u...
76c3234af8bd0301d029460156adeafe4aa2ff86b9b6cb354447be0f67a48177
Rust
4,346
122
mod regexes; mod sg_utils; mod sx_app; mod sx_download; mod sx_map; mod sx_variants; mod tabular; mod te_mapper_utils; mod utils; use std::error::Error; use crate::utils::Reads; fn main() -> Result<(), Box<dyn Error>> { let app = sx_app::app(); let app_matches = app.get_matches(); // handle "download" s...
5c89cf8f11e301c47f62ae1aba4649f71a5a104bea4c78b500b46c45b2eea19a
Rust
4,838
133
// a set of common utilities for all StanEx subcommands use path_abs::PathFile; use std::ffi::OsStr; use std::process::Command; // create an absolute file path from a relative file path // (file must already exist) pub fn absolute_filepath_checked(relative: &str) -> PathFile { match PathFile::new(relative) { ...