Open earbebarnes opened 5 months ago
Hi @earbebarnes
I just ran the install command u gave above and it seems to be working. There may have been issues with Github when u ran the command. Maybe try again now and see if it works?
Alternatively, you can also try the remotes package to see if it works:
remotes::install_github("immunedynamics/spectre", ref = 'development')
Having said that, we recently synced the master branch with the development branch. The issue may have been resolved in the master branch. So maybe give the prep.cytonorm
in the master branch a go first and see how you go.
Thank you for your quick reply. I could not get prep.cytonorm working on the master branch version, however it did work with the developer version. I also realised that install_github() was timing out so was able to fix it by running options(timeout=400) before it. Thank you for your help.
In my hands, the git repo results in a zip file named ImmuneDynamics-Spectre-v0.5.5-197-gd0fd33c.tar.gz of 234 MB. This is quite huge, IMHO, and may result in a large amount of download time.
In my hands, the git repo results in a zip file named ImmuneDynamics-Spectre-v0.5.5-197-gd0fd33c.tar.gz of 234 MB. This is quite huge, IMHO, and may result in a large amount of download time.
Thanks for pointing this out @SamGG. @tomashhurst we should trim the repo size down.
@earbebarnes the prep.cytonorm
issues should be fixed in the beta of v1.2
which you can test out with the following install code.
if(!require('remotes')) {install.packages('remotes')} # Installs the package 'remotes'
remotes::install_github(repo = "immunedynamics/spectre", ref = 'v1.2.0-beta') # Install the Spectre package
Don't forget the ref = 'v1.2.0-beta'
Along the lines of @SamGG 's suggestion, we've also massively cut down on the actual datasets stored within the Spectre repository itself, so the download time shouldn't be an issue at this point. If you run into any timeout issues, then please let us know! There are quick workarounds but it looks like they should not be necessary anymore.
We are looking to release v1.2
as the master version, hopefully next week.
Just a heads up that I also ran in to timeout issues today (post-cut down).
Running options(timeout=400)
immediately before devtools:install_github("immunedynamics/spectre)
as suggested above provided a quick workaround.
Of course download speed is also a function of internet speed and stability, so this might be useful for users in locations where internet is less reliable.
The exact error message, in case it facilitates other people finding this thread:
Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/immunedynamics/spectre/tarball/HEAD' failed
Thanks for bringing this up @Kajlinko. We'll see if we can trim the repo down further.
Another alternative is by physically cloning the repository (make sure it's the right branch you want to install the repo from), then use devtools to install from a local copy devtools::install(pkg=<where the local repository copy is stored>)
Hi all, I've found my way here from #179 . I've installed v1.2.0-beta but notice the following behaviours:
> package.check()
Error in deets$Package : $ operator is invalid for atomic vectors
In addition: Warning message:
In utils::packageDescription("spectre") : no package 'spectre' was found
> data_list <- read.files(file.loc = "data/clean", file.type = ".fcs", do.embed.file.names = TRUE)
Error in `*tmp*`[[i]] : subscript out of bounds
In addition: Warning message:
In rm(tempdata) : object 'tempdata' not found
Has the use of these functions changed?
Thanks for all your hard work!
Hey mate! The first issue is odd as it works fine on my laptop, however, there is an issue in the code that might be the problem: deets <- utils::packageDescription('spectre')
should be sentence case for 'spectre' (i.e. 'Spectre'). So because of the typo it might be looking for a package that doesn't exist. You could try grabbing the code for the package.check
function, making that edit ('spectre' --> 'Spectre'), and running it locally to see if package.check()
works properly.
At least that first issue should not impact the rest of the workflow.
The second issue is probably related to a code change. The file.loc
argument is really looking for a global directory address, so a local one ('data/clean') likely won't work. Perhaps an oversight on our part, I guess in our normal workflow we are using global paths (often because we are pulling data from servers etc). I just did some testing with .fcs files -- global directory path works fine, but using files in 'data/clean' did not -- my error was different, but this might be a good place to start. If you can give it the absolute address for that directory, it might work?
Hey Tom! Thanks for such a quick reply. Yes you're right, altering package.check()
to capitalise the S in Spectre fixes that issue, though I then get
> package.check()
Package: Spectre
-- Version: 1.2.0-00
-- Install date: 2024-06-28 19:05:46 UTC; hefin
-- Install source: github
-- R version: R version 4.3.2 (2023-10-31)
-- OS: Linux Mint 21.3
-- OS detail: x86_64-pc-linux-gnu (64-bit)
-- Library path(s):
/home/hefin/R/x86_64-pc-linux-gnu-library/4.3
/usr/local/lib/R/site-library
/usr/local/lib/R/library
Checking dependency packages...
Error in package.check() : object 'type' not found
Ah I see. Is there a way read.files()
could accept both relative and absolute paths? For example, if I'm in the parent directory of data
, both of these work:
> R.utils::getAbsolutePath("data")
[1] "/home/hefin/Documents/Projects/R-for-cytometry-course/data"
> R.utils::getAbsolutePath("/home/hefin/Documents/Projects/R-for-cytometry-course/data")
[1] "/home/hefin/Documents/Projects/R-for-cytometry-course/data"
Sometimes I use absolute paths, sometimes all my data are in the project directory.
Btw, I'm replying over the weekend but I have no expectation that you'll reply any earlier than you'd like.
I was trying to download the development version of Spectre to get around an issue with prep.cytonorm as was suggested by a previous question : https://github.com/ImmuneDynamics/Spectre/issues/169#issue-1795142299
However I do not seem to be able to download the development version. I do seem to be able to install the non-development version (see below). Do you have any suggestions as to what my issue might be? Thank you in advance
devtools::install_github("immunedynamics/spectre", ref = 'development') Downloading GitHub repo immunedynamics/spectre@development Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/immunedynamics/spectre/tarball/development' failed