-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I observe an error when dealing with DBS.
It seems the get_dbs_context() is not working as expected on the first GRL entry, as the test and context genomic ranges look identical.
test=MutationalPatterns::read_vcfs_as_granges(vcf_file, sample_name, ref_genome, type = "dbs")
context=MutationalPatterns::get_dbs_context(test)
counts=MutationalPatterns::count_dbs_contexts(context)
Error inpurrr::map()at MutationalPatterns/R/count_dbs_contexts.R:41:5:
ℹ In index: 1.
ℹ With name: sample1.
Caused by error:
! There are some REF or ALT bases, that do not belong to any of the categories.
Did you forget to use 'get_dbs_context()'?
Runrlang::last_trace()to see where the error occurred.
rlang::last_trace(drop = F)
<error/purrr_error_indexed>
Error inpurrr::map()at MutationalPatterns/R/count_dbs_contexts.R:41:5:
ℹ In index: 1.
ℹ With name: sample1.
Caused by error:
! There are some REF or ALT bases, that do not belong to any of the categories.
Did you forget to use 'get_dbs_context()'?
Backtrace:
▆
- ├─MutationalPatterns::count_dbs_contexts(context)
- │ └─purrr::map(vcf_list, .count_dbs_contexts_gr, categories) at MutationalPatterns/R/count_dbs_contexts.R:41:5
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─MutationalPatterns (local) .f(.x[[i]], ...)
- │ └─base::stop(...) at MutationalPatterns/R/count_dbs_contexts.R:90:5
- └─base::.handleSimpleError(...)
- └─purrr (local) h(simpleError(msg, call))
-
└─cli::cli_abort(...) -
└─rlang::abort(...)
I attaches the R data files in a ZIP archive for test, context, and counts for you to reproduce my error.
I hope that helps.
Thank you for your support.