Roleren / ORFik

MIT License
32 stars 9 forks source link

Config issue on Mac #170

Closed SuhasSrinivasan closed 4 months ago

SuhasSrinivasan commented 4 months ago

Hi,

Thank you for the recent comment on #167 .

I took your suggestion and this time I tried on a Mac which never had ORFik and installed from GitHub.

There is an error which I have not encountered before.

I have only used ORFik on Linux(Ubuntu) before, so wanted to create this separate issue in case it was Mac specific.

Because not passing arguments to config() would not cause this error before (on Linux).

> parent_folder = '~/riboseq'
> config_csv = file.path(parent_folder, 'orfik_config.csv')
> fastq_dir = file.path(parent_folder, 'fastq')
> bam_dir = file.path(parent_folder, 'bam')
> reference_dir = file.path(parent_folder, 'reference')
> config.save(config_csv, fastq_dir, bam_dir, reference_dir)
> config()
/Users/user/Library/Caches/org.R-project.R/R/BiocFileCache
  does not exist, create directory? (yes/no): yes
Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/rlang_error>
Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
---
Backtrace:
     ▆
  1. ├─ORFik::config()
  2. │ └─ORFik::config_file(old_config_location = old_config_location)
  3. │   └─BiocFileCache::BiocFileCache(cache, ask)
  4. │     └─BiocFileCache:::.sql_create_db(bfc)
  5. │       └─BiocFileCache:::.sql_validate_version(bfc)
  6. │         └─BiocFileCache:::.sql_schema_version(bfc)
  7. │           ├─base::tryCatch(...)
  8. │           │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  9. │           └─tbl(src, "metadata") %>% collect(Inf)
 10. ├─dplyr::collect(., Inf)
 11. └─dbplyr:::collect.tbl_sql(., Inf)
 12.   ├─base::tryCatch(...)
 13.   │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 14.   │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 15.   │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 16.   └─dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)
SuhasSrinivasan commented 4 months ago

Passing the CSV path resolves the error, but still observing Bio_data

> config(config_csv)
                          fastq                             bam                             ref                             exp 
              "~/riboseq/fastq"                 "~/riboseq/bam"           "~/riboseq/reference" "~/Bio_data/ORFik_experiments/" 
SuhasSrinivasan commented 4 months ago

As I try to perform more config steps, there is something strange happening. Have not encountered this error for this statement before.

> config_inf = config.exper(experiment = 'chx', 
+                           assembly = 'hs_assembly',
+                           type = c('Ribo-seq'))

Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/rlang_error>
Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
---
Backtrace:
     ▆
  1. ├─ORFik::config.exper(...)
  2. │ ├─base::file.path(config["fastq"], type, experiment, "")
  3. │ └─ORFik::config()
  4. │   └─ORFik::config_file(old_config_location = old_config_location)
  5. │     └─BiocFileCache::BiocFileCache(cache, ask)
  6. │       └─BiocFileCache:::.sql_create_db(bfc)
  7. │         └─BiocFileCache:::.sql_validate_version(bfc)
  8. │           └─BiocFileCache:::.sql_schema_version(bfc)
  9. │             ├─base::tryCatch(...)
 10. │             │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 11. │             └─tbl(src, "metadata") %>% collect(Inf)
 12. ├─dplyr::collect(., Inf)
 13. └─dbplyr:::collect.tbl_sql(., Inf)
 14.   ├─base::tryCatch(...)
 15.   │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 16.   │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 17.   │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 18.   └─dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)
Roleren commented 4 months ago

This is not an ORFik error I think, but in biocfilecache for Mac. Wait a week for it to be fixed and we see if they fixed it. What version of R is this on ?

SuhasSrinivasan commented 4 months ago

I see, thank you for reviewing.

Here is the info, please let me know if any other details are needed.

Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS 14.4.1
R version 4.3.0 (2023-04-21)
BiocManager: 3.17
BiocFileCache: 2.8.0
ORFik: 1.23.10
SuhasSrinivasan commented 4 months ago

Passing the CSV path resolves the error, but still observing Bio_data

> config(config_csv)
                          fastq                             bam                             ref                             exp 
              "~/riboseq/fastq"                 "~/riboseq/bam"           "~/riboseq/reference" "~/Bio_data/ORFik_experiments/" 

The Bio_data path/directories still seem to be created by default.

Roleren commented 4 months ago

This error does not happen on newest update, for you now easiest is just to manually update "exp" path.

Will close issue for now, make new one if there is anything else :)