Skip to content

Commit 7cde9dd

Browse files
committed
update TODO
1 parent b6e05ed commit 7cde9dd

2 files changed

Lines changed: 60 additions & 2 deletions

File tree

‎R/zzz.R‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.print_msg_if_live_igdata_needs_check <- function(dt)
1+
.print_tip_if_live_igdata_needs_check <- function(dt)
22
{
33
stopifnot(isSingleNumber(dt))
44
if (is.infinite(dt)) {
@@ -20,7 +20,7 @@
2020
reset_live_igdata()
2121

2222
dt <- time_since_live_igdata_last_checked()
23-
.print_msg_if_live_igdata_needs_check(dt)
23+
.print_tip_if_live_igdata_needs_check(dt)
2424

2525
igblastr_usage_report <- getOption("igblastr_usage_report")
2626
if (is.null(igblastr_usage_report)) {

‎TODO‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,64 @@ o Advertize igblastr:
6767
Low-priority TODO list
6868
======================
6969

70+
o Older versions of IgBLAST (e.g. version 1.19.0) don't necessarily include
71+
the same data as the latest version (version 1.22.0). However, we
72+
initialize igblastr_cache(LIVE_IGDATA) with the content of
73+
inst/extdata/igdata_store/ (a.k.a. "the igdata store") regardless of what
74+
version of IgBLAST is used by igblastr (note that the igdata store contains
75+
the data included in IgBLAST 1.22.0). This means that, if we use a version
76+
of IgBLAST that includes different data, then igblastr_cache(LIVE_IGDATA)
77+
in its original state already differs from the data included in the
78+
IgBLAST that we are using.
79+
There are some problems with this:
80+
1. The content of igblastr_cache(LIVE_IGDATA) is not guaranteed to be
81+
compatible with all versions of IgBLAST.
82+
2. If we're using a version of IgBLAST that includes data that differs
83+
from the igdata store, then from the very start (i.e. before
84+
any run of update_live_igdata()), igdata_info() shows differences
85+
between live and original auxiliary files. Running reset_live_igdata()
86+
of course doesn't help because it's a no-op when
87+
igblastr_cache(LIVE_IGDATA) is in its original state.
88+
3. Running update_live_igdata() doesn't help either because the updates
89+
available at NCBI are for the latest version of IgBLAST.
90+
Proposed solution:
91+
(a) Implement an internal helper (e.g. compatible_with_igdata_store())
92+
that can quickly compare the data included in an installation of
93+
IgBLAST with the igdata store. Should return TRUE or FALSE to indicate
94+
whether the data is identical or not.
95+
(b) When using a non-compatible IgBLAST (could be an internal or external
96+
installation), reset igblastr_cache(LIVE_IGDATA) with the data included
97+
in that IgBLAST.
98+
More generally, calling set_igblast_root() should:
99+
- reset igblastr_cache(LIVE_IGDATA) with the data included in the
100+
selected IgBLAST;
101+
- raise an error if the internal_data/ or optional_file/ subdir is
102+
missing in the selected IgBLAST;
103+
- print a message that suggests running update_live_igdata() only
104+
when selecting a compatible IgBLAST (message should be similar to
105+
what .print_tip_if_live_igdata_needs_check() does when is.infinite(dt),
106+
see R/zzz.R).
107+
Open question: When do we do the above if the IgBLAST to use is an
108+
external IgBLAST installation selected via IGBLAST_ROOT?
109+
(c) Disable update_live_igdata() if we're using a non-compatible IgBLAST.
110+
In this case, the function should raise an error with an error message
111+
that explains the situation.
112+
(d) The .onLoad() hook should only print the "igblastr tip" if igblastr
113+
already has access to an IgBLAST installation (i.e. if get_igblast_root()
114+
works) and if that installation compatible with the igdata store. Note
115+
that since update_live_igdata() is disabled when the selected IgBLAST
116+
non-compatible, time_since_live_igdata_last_checked() will always
117+
return Inf in that case, but we shouldn't even need to call
118+
time_since_live_igdata_last_checked() in that case.
119+
(e) Change what igdata_info() displays when the selected IgBLAST is
120+
non-compatible. For example 'last_checked:' and 'last_updated:' could
121+
display something like 'checking is disabled' and 'updating is disabled'.
122+
Or don't display these fields.
123+
(f) About install_igblast(): ncbi-igblast-1.22.0+.dmg is missing the
124+
internal_data/ and optional_file/ folders but install_igblast() is
125+
able to fix this.
126+
Make sure that the fix is applied when installing version 1.22.0 only.
127+
70128
o Migrate code in R/AIRR-utils.R from OGRDB API v1 to OGRDB API v2.
71129
See OGRDB API v2.0.0 Guide here:
72130
https://github.com/airr-community/ogrdb/blob/master/schema/ogrdb_api_v2_guide.md

0 commit comments

Comments
 (0)