ConductScience Sequences
Contents

Installation guide · Data add-ons

Patent context

Make the quotes on a matching sequence: a US publication's abstract, claims and description, and another office's title and abstract.

What the patent says, in a US publication's pane, quotes its abstract, its claims that name a matching SEQ ID NO, up to three description paragraphs for each and its sequence listing's notes. See What the patent says. Since 0.133.0 a case's claim charts quote the same text in each cell of a US publication. The quotes come from a patent context folder that the context command makes from the US patent office's weekly full-text files. The command reads the files you downloaded and makes no network connection. The service only reads the folder, so a search takes no longer and the page asks no other site. Without the folder, a chart's cells of US publications say that the server holds no patent text.

The command reads the weekly ZIP files of applications (APPXML) and grants (PTGRXML, and PTGRSGM for the grants of 2001 in SGML), from the US patent office's Open Data Portal, which asks for an API key of your own. Keep them in one folder, such as /srv/patent-text, in the paths of the bulk data: a folder for each kind and a folder for each year in it, such as APPXML/2026/ipa261105.zip, with PTGRSGM/ holding its files directly. Where a week has a revised file, such as ipa261105_r1.zip, the command takes the newest. In November 2026 the files since 2001 held about 282 GB.

Then make the folder in three steps. extract reads each weekly file once into a part, one file to a thread, and passes over the files it has done, so a run that stops starts again where it stopped. assemble writes the folder for the US publications of one snapshot and of the deltas you name with --delta. check reads the folder as the service will and checks its SHA-256:

docker run --rm -v sequences-data:/data -v /srv/patent-text:/in:ro conductscience/sequences:<version> \
  context extract --archive /in --parts /data/context-parts --workers 8
docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  context assemble --parts /data/context-parts --snapshot /data/corpora/<snapshotId> --out /data/context/<snapshotId>-1
docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  context check --folder /data/context/<snapshotId>-1

One weekly application file of 183 MB took 8 seconds on one thread, at most 1.3 GB of memory, and gave a part of 1.1 MB. At that speed all the files since 2001 take about 3 hours on one thread, and less with more workers as far as the disk keeps up; their parts come to about 2 GB. Allow the container 2 GB of memory for each worker. If a worker runs out of memory on a large file, the summary names the file: run extract again with fewer workers and a larger heap each, which -e NODE_OPTIONS=--max-old-space-size=<MB> sets, and it reads only the files that have no part.

Set BIOSEQUENCE_CONTEXT=/data/context/<snapshotId>-1, then remove the container and start it again. The log then says Patent context from the folder of <date>: <count> US publications of snapshot <snapshotId>. If the folder does not pass its checks, the service does not start, and the log says why. When a delta adds a week, run extract again for the new files, assemble into a new folder with a --delta for each delta, and point the setting at it. Without the setting, a pane shows no What the patent says.

Other offices

For publications of other offices, such as EP, WO, JP and KR, What the patent says can show the English title and abstract, from Google Patents Research Data or from EPO's Open Patent Services. Each source gives a part that assemble takes beside the parts of the weekly files. Where both give a publication, the part from Open Patent Services stands.

Google Patents Research Data, from Google under the Creative Commons Attribution 4.0 license (CC BY 4.0), gives the English title and abstract of most publications of EP, WO, JP and KR, and of some of other offices. Google Translate made many of them, and the pane labels each one it made. The pane links each publication's claims and description at Google Patents and Espacenet, and names the source, its license and the day of its data. The data are a public BigQuery table, patents-public-data.google_patents_research.publications, so you read them with a Google Cloud project of your own, which BigQuery bills for the query: in November 2026 it read 134 GB. Nothing goes to Google when people search or open a pane.

First list the numbers to ask for, one a line. This makes no network connection:

docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  context google stems --snapshot /data/corpora/<snapshotId> --out /data/context-google/stems.txt

In BigQuery, load the file as a table with one STRING column named stem, and run this query with that table's name in place of <stems table>. Save its rows as newline-delimited JSON, gzipped, in one file or several, such as /data/context-google/rows-001.jsonl.gz:

SELECT r.publication_number, p.publication_date, r.title, r.title_translated, r.abstract, r.abstract_translated
FROM `patents-public-data.google_patents_research.publications` AS r
JOIN `<stems table>` AS s ON REGEXP_EXTRACT(r.publication_number, r'^([A-Z]{2}-[A-Z0-9]+)') = s.stem
LEFT JOIN `patents-public-data.patents.publications` AS p ON p.publication_number = r.publication_number

Then make the part. Give --source-date the day the table last changed, as bq show patents-public-data:google_patents_research.publications gives it. The pane shows it as the day of the data:

docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  context google build --snapshot /data/corpora/<snapshotId> --rows /data/context-google/rows-001.jsonl.gz \
  --parts /data/context-google/parts --source-date <YYYY-MM-DD>

A publication takes a row of the same office and number whose publication date agrees and whose kind agrees, or shares its letter, such as A and A1. Where the row's English title and abstract share no word with the publication's own title, the row is taken to be another document, and the publication gets no entry. The summary counts the publications matched and left out for each office. Assemble with both parts folders into a new folder, and point BIOSEQUENCE_CONTEXT at it, as above:

docker run --rm -v sequences-data:/data conductscience/sequences:<version> \
  context assemble --parts /data/context-parts --parts /data/context-google/parts \
  --snapshot /data/corpora/<snapshotId> --out /data/context/<snapshotId>-2

Give stems, build and assemble the same --delta folders, one for each delta.

EPO's Open Patent Services (OPS) gives the title and the English abstract that EPO holds, with a link to Espacenet for the claims and the description. OPS needs an account of your own at EPO, under its fair use terms and weekly limit. This is off by default: context ops asks OPS only when all three of these settings are given, and otherwise sends nothing.

SettingWhat it holds
BIOSEQUENCE_OPSon lets context ops ask OPS. Unset or any other value, the command stops and asks nothing
BIOSEQUENCE_OPS_KEY_FILEA file that holds your OPS consumer key, such as /config/ops-key
BIOSEQUENCE_OPS_SECRET_FILEA file that holds your OPS consumer secret, such as /config/ops-secret

Keep the two files on the server, readable by the container's user only, as you keep the sign-in secret. The command sends OPS the numbers of the snapshot's publications of other offices, one request at a time and slower when OPS asks, and nothing about searches or the people who run them. It keeps what it has asked, so a run that stops or reaches the weekly limit starts again where it stopped. Run it with the parts folder of extract:

docker run --rm -e BIOSEQUENCE_OPS=on -e BIOSEQUENCE_OPS_KEY_FILE=/config/ops-key \
  -e BIOSEQUENCE_OPS_SECRET_FILE=/config/ops-secret -v /etc/sequences:/config:ro -v sequences-data:/data \
  conductscience/sequences:<version> context ops --snapshot /data/corpora/<snapshotId> --parts /data/context-parts

Then run assemble into a new folder and point BIOSEQUENCE_CONTEXT at it, as above. The log's line then adds and <count> of other offices.

Guide version 1.63.0 · For Sequences 0.155.0