FertigLab / CoGAPS

Bayesian MCMC matrix factorization algorithm
https://www.bioconductor.org/packages/release/bioc/html/CoGAPS.html
BSD 3-Clause "New" or "Revised" License
61 stars 17 forks source link

bioconductor nightly build fails on Windows platform #74

Closed dimalvovs closed 11 months ago

dimalvovs commented 11 months ago
##############################################################################
##############################################################################
###
### Running command:
###
###   chmod a+r CoGAPS -R && F:\biocbuild\bbs-3.18-bioc\R\bin\R.exe CMD build --keep-empty-dirs --no-resave-data CoGAPS
###
##############################################################################
##############################################################################

* checking for file 'CoGAPS/DESCRIPTION' ... OK
* preparing 'CoGAPS':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building 'CoGAPS.Rmd' using rmarkdown
Data Model: Dense, Normal
Sampler Type: Sequential
Loading Data...Done! (00:00:00)
-- Equilibration Phase --
10000 of 50000, Atoms: 68(A), 29(P), ChiSq: 329, Time: 00:00:00 / 00:00:00
20000 of 50000, Atoms: 74(A), 43(P), ChiSq: 161, Time: 00:00:00 / 00:00:00
30000 of 50000, Atoms: 84(A), 38(P), ChiSq: 141, Time: 00:00:00 / 00:00:00
40000 of 50000, Atoms: 80(A), 32(P), ChiSq: 143, Time: 00:00:01 / 00:00:02
50000 of 50000, Atoms: 81(A), 42(P), ChiSq: 117, Time: 00:00:01 / 00:00:02
-- Sampling Phase --
10000 of 50000, Atoms: 74(A), 43(P), ChiSq: 136, Time: 00:00:01 / 00:00:01
20000 of 50000, Atoms: 80(A), 37(P), ChiSq: 126, Time: 00:00:02 / 00:00:02
30000 of 50000, Atoms: 80(A), 41(P), ChiSq: 127, Time: 00:00:02 / 00:00:02
40000 of 50000, Atoms: 81(A), 38(P), ChiSq: 130, Time: 00:00:03 / 00:00:03
50000 of 50000, Atoms: 82(A), 44(P), ChiSq: 104, Time: 00:00:03 / 00:00:03
trying URL 'https://zenodo.org/record/7709664/files/inputdata.Rds?download=1'
Content type 'application/octet-stream' length 433262849 bytes (413.2 MB)
==================================================
downloaded 413.2 MB

Quitting from lines 235-240 [load single cell data from zenodo] (CoGAPS.Rmd)
Error: processing vignette 'CoGAPS.Rmd' failed with diagnostics:
error reading from connection
--- failed re-building 'CoGAPS.Rmd'

SUMMARY: processing the following file failed:
  'CoGAPS.Rmd'

Error: Vignette re-building failed.
Execution halted
dimalvovs commented 11 months ago

This bug can be reproduced on the windows server platform outside bioconductor.

-- Equilibration Phase --
10000 of 50000, Atoms: 76(A), 31(P), ChiSq: 403, Time: 00:00:00 / 00:00:00
20000 of 50000, Atoms: 79(A), 37(P), ChiSq: 152, Time: 00:00:00 / 00:00:00
30000 of 50000, Atoms: 81(A), 33(P), ChiSq: 139, Time: 00:00:00 / 00:00:00
40000 of 50000, Atoms: 78(A), 38(P), ChiSq: 141, Time: 00:00:00 / 00:00:00
50000 of 50000, Atoms: 88(A), 38(P), ChiSq: 120, Time: 00:00:01 / 00:00:02
-- Sampling Phase --
10000 of 50000, Atoms: 83(A), 38(P), ChiSq: 112, Time: 00:00:01 / 00:00:01
20000 of 50000, Atoms: 86(A), 32(P), ChiSq: 115, Time: 00:00:01 / 00:00:01
30000 of 50000, Atoms: 78(A), 34(P), ChiSq: 182, Time: 00:00:02 / 00:00:02
40000 of 50000, Atoms: 80(A), 31(P), ChiSq: 120, Time: 00:00:02 / 00:00:02
50000 of 50000, Atoms: 86(A), 34(P), ChiSq: 145, Time: 00:00:02 / 00:00:02
trying URL 'https://zenodo.org/record/7709664/files/inputdata.Rds?download=1'
Content type 'application/octet-stream' length 433262849 bytes (413.2 MB)
==================================================
downloaded 413.2 MB

Quitting from lines 235-241 [load single cell data from zenodo] (CoGAPS.Rmd)
Error: processing vignette 'CoGAPS.Rmd' failed with diagnostics:
error reading from connection
--- failed re-building 'CoGAPS.Rmd'

SUMMARY: processing the following file failed:
  'CoGAPS.Rmd'

Error: Vignette re-building failed.
Execution halted

C:\Users\lvovs\Documents\CoGAPS>
dimalvovs commented 11 months ago

To some reason, the file downloaded by a *nix system reads fine, but the file downloaded by a win-system can not be read (on any of the 2 platforms):

> proper <- readRDS('vignettes/inputdata_download.Rds')
The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
which was just loaded, will retire in October 2023.
Please refer to R-spatial evolution reports for details, especially
https://r-spatial.org/r/2023/05/15/evolution4.html.
It may be desirable to make the sf package available;
package maintainers should consider adding sf to Suggests:.
The sp package is now running under evolution status 2
     (status 2 uses the sf package in place of rgdal)
> corrupt <- readRDS('vignettes/inputdata_download 2.Rds')  # this one has been downloaded on win machine
Error in readRDS("vignettes/inputdata_download 2.Rds") : 
  error reading from connection
dimalvovs commented 11 months ago

ok, it works naturally if the proper parameter (mode='wb') added

> download.file(url,"inputdata_download_wb.Rds",mode='wb')
dimalvovs commented 11 months ago

other platforms are not affected by this change, closing the issue.

> url = "https://zenodo.org/record/7709664/files/inputdata.Rds"
> download.file(url,"inputdata_download.Rds", mode='wb')
trying URL 'https://zenodo.org/record/7709664/files/inputdata.Rds'
Content type 'application/octet-stream' length 433262849 bytes (413.2 MB)
==================================================
downloaded 413.2 MB

> pdac_data <- readRDS("inputdata_download.Rds")
> pdac_data
An object of class Seurat 
15184 features across 25442 samples within 2 assays 
Active assay: originalexp (15176 features, 2000 variable features)
 1 other assay present: CoGAPS
 5 dimensional reductions calculated: PCA, Aligned, UMAP, pca, umap
dimalvovs commented 11 months ago

it helped also on bioconductor

Screenshot 2023-09-21 at 15 36 57
dimalvovs commented 11 months ago

the commit lacked same fix for the second download, and swapping knitr with markdown made vignette build fail silently

dimalvovs commented 11 months ago

moving this to #75 as these two are too much interconnected.