Skip to content

Commit 8af913a

Browse files
committed
changed the README and small improvement to writing xlsx files.
The de xlsx writer will no longer save plots to the rda file, _significantly_ reducing their size from absurd Gb scale to small Mb.
1 parent c32ef46 commit 8af913a

File tree

3 files changed

+15
-45
lines changed

3 files changed

+15
-45
lines changed

R/de_xlsx.R

+10-6
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ combine_de_tables <- function(apr, extra_annot = NULL, keepers = "all", excludes
272272

273273
## Finished! Dump the important stuff into a return list.
274274
ret <- list(
275+
"input" = apr,
275276
"data" = extracted[["data"]],
276277
"table_names" = extracted[["table_names"]],
277-
"input" = apr,
278278
"plots" = extracted[["plots"]],
279279
"comp_plot" = comp,
280280
"keepers" = keepers,
@@ -286,14 +286,18 @@ combine_de_tables <- function(apr, extra_annot = NULL, keepers = "all", excludes
286286

287287
if (!is.null(rda)) {
288288
varname <- gsub(x = basename(rda), pattern = "\\.rda$", replacement = "")
289-
assigned <- assign(varname, ret)
290-
## When saving a rda of the combined tables, it is less likely that one wants a copy of the
291-
## entire differential expression analysis produced by all_pairwise().
289+
tmp <- ret
292290
if (!isTRUE(rda_input)) {
293-
varname[["input"]] <- NULL
291+
message("Removing the input and plots from the rda result.")
292+
tmp[["plots"]] <- NULL
293+
tmp[["input"]] <- NULL
294294
}
295+
assigned <- assign(varname, tmp)
296+
removed <- rm(list = "tmp")
297+
## When saving a rda of the combined tables, it is less likely that one wants a copy of the
298+
## entire differential expression analysis produced by all_pairwise().
295299
message("Saving de result as ", varname, " to ", rda, ".")
296-
saved <- save(list = varname, file = rda)
300+
saved <- save(list = varname, file = rda, compress = "xz")
297301
removed <- rm(varname)
298302
}
299303
## Cleanup the saved image files.

R/zzz_print.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ print.snps_genes <- function(x) {
548548
most_idx <- x[["count_by_gene"]] == most_num
549549
most_name <- names(x[["count_by_gene"]])[most_idx]
550550
summary_string <- glue("When the variants observed were cross referenced against annotated genes,
551-
{gt_zero} genes were observed with at least 1 variant. {most_name} had the most variants, with
552-
{most_num}.")
551+
{gt_zero} genes were observed with at least 1 variant.
552+
{most_name} had the most variants, with {most_num}.")
553553
message(summary_string)
554554
return(invisible(x))
555555
}

README.md

+3-37
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@ computer with nothing pre-installed.
2222
## Compiled Prerequisites
2323

2424
Quite a few packages used by hpgltools have compiled code, here is an incomplete list of
25-
requisites and the likely Debian-based (circa 201811) solution.
25+
requisites and the likely Debian-based.
2626

2727
* The basics: gcc,g++,gfortran,make,boost,build-essential,automake,autoconf
2828
* curl
29-
* graphviz (This has problems, I ended up using the Rgraphviz from github and fiddling around in
30-
the src/ directory to get it to compile.)
31-
* java
3229
* libgvc
3330
* libnlopt
3431
* libxml2
35-
* mysqlclient (mariadb)
3632
* pandoc
3733
* pkg-config
3834
* texlive
@@ -43,29 +39,21 @@ requisites and the likely Debian-based (circa 201811) solution.
4339

4440
## For the basics:
4541
apt-get install gcc g++ cc1plus gfortran gawk sed bison libboost-all-dev build-essential \
46-
curl libcurl4-gnutls-dev:amd64 libcurl4:amd64 default-jdk automake autoconf autotools-dev \
42+
curl libcurl4-gnutls-dev:amd64 libcurl4:amd64 automake autoconf autotools-dev \
4743
pkg-config
4844

49-
## For a large set of potentially relevant development tools:
50-
apt-get install kdesdk
51-
5245
## For the prerequisite tools:
5346
apt-get install udunits2-bin libudunit2-0 libudunits2-dev libnlopt0 libnlopt-dev \
5447
libxml2-dev pandoc texlive-latex-recommended texlive-science texlive-extra-utils \
55-
texlive-fonts-extra texlive-latex-extra libgvc6 libgraphviz-dev libmariadbclient-dev
48+
texlive-fonts-extra texlive-latex-extra
5649
```
5750

58-
### Caveats
59-
60-
1. Rgraphviz compilation fails with 'too few arguments to agedge' and similar problems.
61-
6251
## The actual R installation
6352

6453
Download the package via 'git pull' or from the github download link, go
6554
into the hpgltools/ directory and:
6655

6756
```bash
68-
R CMD javareconf -e
6957
make prereq ## install knitr, devtools, and friends.
7058
make deps ## Pick up dependencies from the DESCRIPTION file.
7159
make install ## Perform the installation
@@ -85,32 +73,10 @@ make build
8573
make check
8674
## Cleanup this tree
8775
make clean
88-
## Clean after making vignettes
89-
make clean_vignette
90-
## Install dependencies
91-
make dep
9276
## Rerun roxygen, rebuild the vignettes, and the reference manual
9377
make document
9478
## Install this via R CMD INSTALL
9579
make install
96-
## Install _ALL_ of bioconductor!
97-
make install_bioconductor
98-
## Install prerequisite packages which are not explicitly dependencies, but are useful
99-
make prereq
100-
## push to github
101-
make push
102-
## remake the roxygen docs
103-
make roxygen
104-
## Remake the reference manual
105-
make reference
106-
## Install suggested packages
107-
make suggests
108-
## Run the test suite
109-
make test
110-
## Update R packages via bioconductor
111-
make update
112-
## Update bioconductor
113-
make update_bioc
11480
## Rebuild the vignettes
11581
make vignette
11682
```

0 commit comments

Comments
 (0)