The potato paradox

I came across this question last night on some trivia app I have on my phone: When you let fruits consisting of 99% water by weight dry so that they become 98% water, what percentage of weight do they lose? Stop scrolling (or looking) down right now, if you want to give it some thought…

Continue Reading

Rate limited by GitHub when using remotes::install_github()

When you use remotes::install_github() too often in a short span of time, GitHub may rate limit you. This means you can’t use install the package you wanted without waiting for the rate limit to end. One way around this (and to prevent getting rate limited) is to simply clone the repo and use remotes::install_local()! To…

Continue Reading

Check what genes are correlated to your gene of interest

ARCHS4 (All RNA-seq and ChIP-seq sample and signature search) is a resource that provides access to gene and transcript counts uniformly processed (using kallisto) from all human and mouse RNA-seq experiments from the Gene Expression Omnibus (GEO) and the Sequence Read Archive (SRA). The tool gget and the sub-tool archs4 can be used to query…

Continue Reading

Find out which function is being used in R

Today I learned of the utils::getAnywhere() function in R, which I discovered when looking for a way to determine which function is going to be used when two attached packages have the same function name. I knew of base::search() which provides the search path used by R to look for objects (remember that everything in…

Continue Reading

Prevent download errors in R by increasing the timeout

If you find yourself getting a "Timeout of 60 seconds was reached" warning from download.file that’s preventing you from installing a package, you can increase the timeout in R by using options(). For example, when I was trying to run the following command: SeuratData::InstallData('ifnb') trying URL 'http://seurat.nygenome.org/src/contrib/ifnb.SeuratData_3.1.0.tar.gz' Content type 'application/octet-stream' length 413266233 bytes (394.1 MB)…

Continue Reading

Getting something to work once is not hard

As I wrote in a post on where to get information, I have been switching to offline resources such as books as a source of information. I’ve probably bought too many physical books as of late but I am reading them! One book that I’ve started to read is Clean Architecture by Robert C. Martin,…

Continue Reading

What fraction of 10x reads map to ribosomal proteins?

As you may have learned in school, ribosomes are cell organelles that can be thought of as protein factories because they aid in the synthesis of proteins. The eukaryotic ribosome is made up of ribosomal proteins and ribosomal RNA (rRNA). This post is about ribosomal protein gene expression and not non-coding rRNAs. I was interested…

Continue Reading

How and where to get information?

As you may have heard, Stack Overflow (SO) and OpenAI have recently announced a partnership, which basically just means allowing OpenAI to train models using data from SO and then selling these models. Kathy Reid summarised the problem perfectly: Like many other technologists, I gave my time and expertise for free to #StackOverflow because the…

Continue Reading

Naming variables and functions

An important aspect of programming that I never paid much attention to is the naming of things such as variables and functions. I think the reason is because a script/program will work as long as the syntax is correct and the naming of things is unimportant to the computer. When I first learned programming as…

Continue Reading