ConductScience Sequences
Contents

Installation guide · Data add-ons

Species of each hit

Give each record its NCBI taxon and group, so hits can be filtered by species.

Each hit lists the organisms its records name. A taxa folder also gives each record its NCBI taxon and a group, such as Human, Mouse or Artificial or synthetic, so the page and the API can filter a search's hits by species or group. The taxa-scan and taxa commands make the folder from NCBI's taxonomy and the source files of your snapshots, with no network connection, and the service only reads it.

Download NCBI's taxonomy, taxdump.tar.gz, about 80 MB, and its checksum file, taxdump.tar.gz.md5, from https://ftp.ncbi.nlm.nih.gov/pub/taxonomy/ into /srv/taxa on the server, readable by user ID 10001. Check the file before you use it:

cd /srv/taxa && md5sum -c taxdump.tar.gz.md5

Then scan the source files of each snapshot you built, before you remove them, as in Build from the public files. A scan reads the NCBI taxon each record states. Give --inputs for the snapshot's folder, then once more for each of its deltas' folders, in order. With --source all, the command scans each source those folders list into a folder of its own inside --out, a new folder:

docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  taxa-scan --inputs /data/inputs/release-274.0 --source all --out /data/taxa-scans/release-274.0

A snapshot you loaded as a copy has no source files on the server. Skip the scans. Each of its records keeps the taxon and group the snapshot was built with, or, if it was built without a taxa folder, is placed by its organism name alone.

Then make the folder. --out is the parent folder: the command makes a folder named by its ID inside it, and prints the ID at the end. A taxa folder holds one scan of each source. Give --scans for each folder of scans you made, or leave it out if you made none:

docker run --rm -v sequences-data:/data -v /srv/taxa:/in:ro conductscience/sequences:<version> \
  taxa --taxdump /in/taxdump.tar.gz --out /data/taxa --scans /data/taxa-scans/release-274.0

Set BIOSEQUENCE_TAXA=/data/taxa/<id>, with the ID the command printed, then remove the container and start it again. The log then says Species groups come from taxa folder <id>, built <time>., and Sources and terms credits NCBI Taxonomy. If the folder is not a finished taxa folder, the service does not start, and the log says why.

To keep each record's taxon and group in a snapshot or delta you build, give build or delta the folder with --taxa /data/taxa/<id>. For a new snapshot, scan its source files and make a new folder first. A copy of the snapshot loaded on another server keeps them too.

A search keeps the species it had when it ran, so a search from before the folder cannot be filtered by species until it runs again. Keep /data/taxa-scans: with a newer taxdump.tar.gz, the taxa command alone makes a new folder. Without the setting, each hit still lists the organisms its records name, with no taxon or group.

Guide version 1.63.0 · For Sequences 0.155.0