GENERAL R QUESTION: Accessing package versions of an old R object/project?
2
0
Entering edit mode
6 weeks ago
Natalia • 0

How do I access the packageVersions() (or similar command, like sessionInfo()) of an rds object or .Rdata object from MONTHS ago? I simply would like to know: what package versions was I using at THAT time?

For context: I am running single cell analyses with Seurat. I try restarting the session and simply loading the object to my environment-- but when I run any of the above commands, only the ambient/'current' package versions pop up (I presume they are automatically loaded when the object is), and I know those are certainly not the full extent of the packages used and I can tell they are newer versions. Therefore, I load the rest of the packages, but as expected, they have all updated to newer versions (I had highly likely done so in other single cell experiment projects I have been running at the same time). I am having dependency issues in not being able to run a function that previously worked months ago, so I want to know what package version of that function I used to use which worked. Makes sense?

If it cannot be retrieved, what is your preferred/favorite way to document what package versions you are using in your projects?

Thanks in advance!!

R Seurat Rstudio • 252 views
ADD COMMENT
0
Entering edit mode
6 weeks ago

This is the use case for renv. There is no way to determine what version of a package a given object was generated with unless that info is stored in the object itself somehow.

If I remember correctly, Seurat does indeed store this info to some degree, which can be accessed with Version(seurat_object). I believe that will tell you the version of the data structure, which should at least correspond to the major Seurat version (e.g. 3, 4, 5).

ADD COMMENT
0
Entering edit mode
6 weeks ago
ATpoint 82k

If it cannot be retrieved, what is your preferred/favorite way to document what package versions you are using in your projects?

I use Docker for all of my projects. Usually I build with the Bioconductor Docker image as a basis. DockerHub allows to store the images and GitHub takes care of version-controlling code and any notes/READMEs of the analysis.

Honestly, just re-do your analysis with freshly installed packages and from now on track things properly.

ADD COMMENT

Login before adding your answer.

Traffic: 2664 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6