Check when install.packages fails in R

I recently found out that when install.packages() fails, it only returns a warning and not an error, i.e., the exit code is 0. R -q -e 'install.packages("thisdoesnotexist!!!")' > install.packages("thisdoesnotexist!!!") Installing package into ‘/home/dtang/R/x86_64-pc-linux-gnu-library/4.3’ (as ‘lib’ is unspecified) Warning message: package ‘thisdoesnotexist!!!’ is not available for this version of R A version of this package for…

Continue Reading

Testing Singularity builds

A quick post on testing Singularity builds, where I discovered how the %test section of the Singularity Definition File works. If you aren’t familiar, the Definition File is similar to the Dockerfile for Docker; it is used to define and build the image. From the documentation: A SingularityCE Definition File (or “def file” for short)…

Continue Reading

Running RStudio Server with Singularity

For running RStudio Server in a container, I’ve written about how to run RStudio Server with Docker; in the post I also listed out some reasons why you would want to do that instead of simply installing RStudio on your computer. This post demonstrates one way of running RStudio Server with Singularity. I learned that…

Continue Reading

Building Singularity images in layers

Recently I have been learning about Singularity and have been experimenting with building Singularity images. However it seems that there is no layering in Singularity, which exists with Docker and Dockerfiles. This is quite convenient to have because building will resume from the point where the last step failed. However the comment: You can build…

Continue Reading

Download from the SRA using ffq (and ffs)

ffq is a tool that can be used to fetch metadata from several data repositories. It can also be used to generate links to raw data hosted at the EBI (via FTP), AWS, GCP, and NCBI. I wrote a short Bash script called ffs that can generate the commands needed to download the raw data…

Continue Reading

TIL about code snippets in RStudio

Last updated: 2023/07/28 I recently learned about code snippets in RStudio (ignore the strikethrough). As the name suggests, they are snippets of code that you can quickly insert into your source code in the source pane of RStudio. There are two ways to add code snippets: Click on the following: Tools -> Global Options ->…

Continue Reading

The things that matter

I recently learned of the WTFPL licence and was reading the FAQ (link no longer works) to learn a bit more about it. I came to the "But profanity is offensive!" section and while reading it it made me reflect about the things that really matter to me in life. The last few years have…

Continue Reading

Deciding which bioinformatics tool to use

I just finished reading "Using prototyping to choose a bioinformatics workflow management system", which I summarised on Mastodon as follows: Enjoyed reading "Using prototyping to choose a #bioinformatics workflow management system". Paper describes authors’ 10 day experience searching and implementing a workflow. Summary: Need to decide which tool to use? Shortlist a list of potentially…

Continue Reading

Maintaining a (bioinformatics) blog

A lot of the well known bioinformatics blogs are no longer maintained. I recently came across a blog post that talked about blogging and how it was possible to actively maintain a blog for over 10 years. I discovered the blog when I learned of the book Building reproducible analytical pipelines with R, which also…

Continue Reading