Releases: mortazavilab/ENCODELIB
Releases · mortazavilab/ENCODELIB
v0.4
Added
- Optional experiment loading modes on
ENCODE:load_mode="eager"(default, backward compatible),load_mode="lazy", andload_mode="incremental". - Incremental summary loading with
load_experiment_summaries(),get_experiment_summaries(), andload_next_experiment_batch()to keep lightweight summaries in memory until full experiment payloads are explicitly materialized. - Summary cache stored separately in
experiment_summaries.jsonto support incremental and indexed search flows. - Optional search indexing with
build_search_index(),clear_search_index(), andget_search_index_stats(). - Batch search helper:
search_experiments_batch()for grouped biosample, organism, and target searches. - Facet helper:
get_experiment_facets()for counts by assay, biosample, organism, status, and target. - Export helper:
export_experiments()for JSON, CSV, and TSV output. - Performance reporting:
get_performance_stats()with lightweight HTTP/cache/index metrics. - Batch file-accession helpers on
ENCODE:get_file_metadata_batch(),get_file_url_batch(), andsearch_experiments_by_file_accessions(). - Download manifest and verification support in
encodeExperiment:prepare_download_manifest(),preview_only,resume, andverify_checksumoptions. - New MCP tools:
search_batchget_experiment_facetsrebuild_search_indexget_search_index_statsget_performance_statsexport_experimentsget_file_metadata_batch_by_accessionget_file_url_batch_by_accessionsearch_by_file_accession_batch
- Streamlit client quick actions for batch search, facets, exports, and metrics/index inspection.
- Streamlit client LLM provider selection with configurable base URLs for both Ollama and OpenAI-compatible endpoints such as LM Studio.
- Focused unit-test coverage for lazy/incremental loading, indexed search, download preview/resume/checksum behavior, server auth/cache semantics, and server load-mode configuration.
Changed
- Library version bumped to
0.4. - MCP server version bumped to
0.4. - Streamlit client version bumped to
0.4. - Streamlit client now supports session-scoped API keys for auth-enabled MCP servers and injects them automatically into tool calls.
- Streamlit client can now route model requests to either Ollama (
/api/chat) or OpenAI-compatible chat APIs (/chat/completions) based on sidebar configuration. - Search methods now reuse
create_experiment_object()when experiment data is already available, avoiding unnecessary object reconstruction by accession. list_experimentson the MCP server now uses experiment summaries so low-memory server modes do not have to fully materialize all experiments just to list them.download_files()now returns amanifestalongside download results._request_with_retry()now accepts optional request headers, enabling resumable downloads.
Fixed
- MCP server API-key authentication is now actually enforced across all exposed tools when auth is enabled.
- MCP server cache clearing now resets the shared in-process
ENCODEsingleton so subsequent requests do not reuse stale state. clear_cache(clear_metadata=True)on the MCP server now clears both the main experiments cache and metadata cache, matching the user-facing message.- Metadata cache read/write failures now log warnings instead of failing silently.
- Experiment and file API responses now receive basic structure validation before they are cached or returned.
- Streamlit tool-call displays and saved assistant tool-call payloads now redact API keys instead of exposing them in the UI.
Notes
ENCODE()with no new arguments remains eager-loading by default for backward compatibility.- In
incrementalmode, direct access toencode.experimentsstill materializes the full experiment list to preserve the existing public API; the low-memory gains come from summary-based search and explicit batch materialization methods.