Public archives
Ingence can scan a public archive’s list of files as if it were a folder, without downloading a file. This guide shows how, with the BioImage Archive as the example.
A list of files as a data folder
A data folder does not have to be on your disk. It can be an archive’s listing, its list of files, written:
listing:<archive>:<identifier>
<archive> is the short name of a source Ingence can read, and <identifier> names one study in
that archive. One source ships: biostudies. It reads studies from the BioStudies service, where the
BioImage Archive keeps its studies. A BioImage Archive study’s identifier is its accession number,
which begins S-BIAD. So the data folder is listing:biostudies: followed by that accession number.
For each file, a listing holds its path, its stated size and the descriptions the depositor wrote. It doesn’t hold file contents. A BioStudies listing doesn’t have a checksum for a file, and usually doesn’t have a date of its own. A listing made by another converter may say more.
The steps
ingence init archive-project --root listing:biostudies:ACCESSION
ingence index -p archive-project --fetch
ingence infer -p archive-project
ingence see -p archive-project
Replace ACCESSION with the study’s accession number.
index --fetch is the one step that uses the network. It fetches each listing from its archive
into the project, once. It is polite to the archive:
it sends one request at a time;
it waits between requests (half a second, unless you change
listing.pause_seconds);each request says what it is;
it logs every request beside the listing.
The archive may answer “too many requests” or “service unavailable”. Then Ingence stops asking that archive for the scan, and does not try again. It records any other failure against that study, and goes on to the next. At the end it prints how many requests it made and how many bytes came back.
After the first fetch, every index reads the listing from what was fetched. Without --fetch,
Ingence doesn’t use the network. Add --fetch again to fetch a new copy.
You can give several data folders by repeating --root, and one can be a folder on your disk.
Reading contents
A listing’s files are not on your computer. So ingence dive leaves them as the listing states
them: not read yet, which is different from “nothing found”. What Ingence reads comes from names,
paths, stated sizes and the depositor’s own descriptions.
Other archives
Ingence can also scan an archive that doesn’t have a source built in. A converter outside Ingence writes
the archive’s listing, in Ingence’s listing format, into the project’s cache. Then index reads it
from there. A new archive needs a converter. It doesn’t need a change to the engine.
Before you use an archive’s data
Read the archive’s terms. The listing and each study’s own license can differ, and the files’ licenses differ from study to study. Ingence does not check licenses.
An archive is someone else’s server. Fetch only what you need. If you change the pause between requests (
listing.pause_seconds), only make it longer.A listing is what the depositor wrote. A depositor can state that one file was made from another. By default, Ingence keeps these stated links away from the rules (
listing.declared_linksiswithheld). These links are ground truth that the depositor wrote. Ingence’s own guesses about what was made from what can be scored against them. A rule that could read them would be scoring its own work.