Skip to content

Commit

Permalink
Make R library imports consistent with Mike style
Browse files Browse the repository at this point in the history
  • Loading branch information
hermidalc committed Aug 19, 2021
1 parent 86694cf commit d9b8d48
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion count_eset_case_info.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
suppressPackageStartupMessages(library("Biobase"))
suppressPackageStartupMessages(library(Biobase))

uniq_kraken_case_uuids <- c()
uniq_kraken_na_case_uuids <- c()
Expand Down
12 changes: 7 additions & 5 deletions create_esets.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
options(warn=1)
suppressPackageStartupMessages(library("argparser"))
suppressPackageStartupMessages(library("Biobase"))
suppressPackageStartupMessages(library("data.table"))
suppressPackageStartupMessages(library("GenomicDataCommons"))
suppressPackageStartupMessages(library("stringr"))
suppressPackageStartupMessages({
library(argparser)
library(Biobase)
library(data.table)
library(GenomicDataCommons)
library(stringr)
})

stopifnot(GenomicDataCommons::status()$status == "OK")

Expand Down
20 changes: 11 additions & 9 deletions generate_violin_plots.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
options(warn=1)
suppressPackageStartupMessages(library("argparser"))
suppressPackageStartupMessages(library("dplyr"))
suppressPackageStartupMessages(library("gdtools"))
suppressPackageStartupMessages(library("ggplot2"))
suppressPackageStartupMessages(library("ggsignif"))
suppressPackageStartupMessages(library("ggstatsplot"))
suppressPackageStartupMessages(library("ggtext"))
suppressPackageStartupMessages(library("pairwiseComparisons"))
suppressPackageStartupMessages(library("stringr"))
suppressPackageStartupMessages({
library(argparser)
library(dplyr)
library(gdtools)
library(ggplot2)
library(ggsignif)
library(ggstatsplot)
library(ggtext)
library(pairwiseComparisons)
library(stringr)
})

set.seed(777)

Expand Down
16 changes: 9 additions & 7 deletions get_gtf_ensg_annots.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
suppressPackageStartupMessages(library("AnnotationHub"))
suppressPackageStartupMessages(library("argparser"))
suppressPackageStartupMessages(library("ensembldb"))
suppressPackageStartupMessages(library("httr"))
suppressPackageStartupMessages(library("rtracklayer"))
suppressPackageStartupMessages(library("stringr"))
suppressPackageStartupMessages(library("tools"))
suppressPackageStartupMessages({
library(AnnotationHub)
library(argparser)
library(ensembldb)
library(httr)
library(rtracklayer)
library(stringr)
library(tools)
})

argp <- arg_parser("Get GDC GENCODE gtf and latest Ensembl annotations")
argp <- add_argument(
Expand Down
14 changes: 8 additions & 6 deletions mlcomp.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
library(dplyr)
library(readr)
library("ggpubr")
library(VennDiagram)
library(cowplot)
suppressPackageStartupMessages({
library(dplyr)
library(readr)
library(ggpubr)
library(VennDiagram)
library(cowplot)
library(RColorBrewer)
})

library(RColorBrewer)
myCol <- brewer.pal(3, "Pastel2")
cbPalette <- c(
"#999999", "#E69F00", "#56B4E9", "#009E73",
Expand Down
12 changes: 7 additions & 5 deletions process_knight_data_gdc_meta.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
options(warn=1)
suppressPackageStartupMessages(library("argparser"))
suppressPackageStartupMessages(library("data.table"))
suppressPackageStartupMessages(library("httr"))
suppressPackageStartupMessages(library("GenomicDataCommons"))
suppressPackageStartupMessages(library("stringr"))
suppressPackageStartupMessages({
library(argparser)
library(data.table)
library(httr)
library(GenomicDataCommons)
library(stringr)
})

stopifnot(GenomicDataCommons::status()$status == "OK")

Expand Down
2 changes: 1 addition & 1 deletion process_surv_resp_pdata.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
options(warn=1)
suppressPackageStartupMessages(library("argparser"))
suppressPackageStartupMessages(library(argparser))

argp <- arg_parser("Process survival and drug response phenotypic data")
argp <- add_argument(
Expand Down

0 comments on commit d9b8d48

Please sign in to comment.