Installation guide · Optional features
Export formats
Choose the columns, headers and file types of the exports, and mark confidential sets.
Six exports save rows: a search's Alignments tab (matches) and Patents tab (patents), a combined search's references (combined), a case's References step by feature (case-references) and under All references, each reference once (case-all-references), and a case's claim charts, one row per cell (case-charts). Each has a built-in format, the CSV file the user guide describes. A file of your own adds formats. Each picks columns from its export's fields, in your order and under your headers, writes CSV, TSV or JSON lines, and can leave out or mask fields. People choose a format under Format, beside the export button, and the page says how many rows the file holds and what it left out.
Write the file as JSON with one key, formats, a list of 1 to 100 formats, put it beside the license in /etc/sequences, and set BIOSEQUENCE_EXPORT_FORMATS_FILE=/config/export-formats.json. Then remove the container and start it again. Each format takes:
| Key | What it holds |
|---|---|
name | 1 to 60 letters, digits, spaces and . _ ( ) & + , / -, shown under Format and in each record of an export. Each format has its own name, and none may be Built-in |
version | MAJOR.MINOR.PATCH, such as 1.0.0 |
audience | internal or external. An external format always leaves out the rows of confidential sets |
export | The export it serves: matches, patents, combined, case-references, case-all-references or case-charts |
type | csv (the default), tsv or jsonl |
columns | The fields to write, in order: a field's name, or { "field": "...", "header": "..." } for a header of 1 to 100 characters. Without it, every field in the built-in order |
redact | { "omit": [...], "mask": [...] }: the fields left out of the file, and the fields whose every cell reads [redacted] |
The fields of each export, in the built-in order:
matches:query,subject,title,engine,strand,mark,mark_reason,accession,first_published,offices,publications,query_match,identity,query_identity,coverage,evalue,bits,score,exact_tool,exact_score,exact_identity,exact_query_match,exact_coverage,exact_matches,exact_gaps,exact_align_length,align_length,matches,mismatches,gaps,query_from,query_to,subject_from,subject_to,subject_length,occurrences,positions,reached_limit,entries,papers,pubmed_ids,dois,paper_dates,paper_marks,first_publication,first_kind,first_applicant,first_filed,first_application_number,first_priority,changes,substitutions,insertions,deletions,wildcard_matches,x_letters,identity_x_as_match,known_changes,query_changes,clinvar_variants,species,taxa,species_groups,drugs,drug_sources,genes,gene_ids,gene_links,claimed,claimed_in,hit_identity,patent_status,patent_status_group,patent_status_as_of,stored_codes,modifications,modification_positionspatents:office,number,kind,published,applicant,title,mark,mark_reason,sequences_hit,seq_nos,best_query_match,best_identity,hits,link,undated,after_date,application_number,filed,priority,family,family_size,family_basis,date_group,why_listed,claimed_seq_nos,not_claimed_seq_nos,patent_status,patent_status_date,patent_status_group,patent_status_as_of,family_id,family_publications,family_offices,modified_seq_noscombined:reference,id,office,number,kind,accession,source,published,applicant,title,mark,mark_reason,sets,queries,sequences_hit,seq_nos,best_query_match,best_identity,hits,best_set,best_query,best_job,best_row,link,undated,after_date,application_number,filed,priority,family,family_size,family_basis,date_groupcase-references:feature,claim,claim_words,threshold,rank,meets,coverage,date_class,query_match,evalue,reference,id,label,office,number,kind,accession,source,published,filed,priority,application_number,applicant,title,link,matched,meeting,of,claimed_seq_ids,reference_seq_nos,best_search,best_set,best_job,best_row,best_query,best_seq_id_no,query_identity,identity,bits,align_length,matches,searches,sets,mark,marks,meets_words,date_words,matched_words,met_seq_idscase-all-references:rank,best_rank,features_met,features,reference,id,label,office,number,kind,accession,source,published,filed,priority,application_number,applicant,title,link,date_class,family,family_size,family_basis,feature_ranks,feature_meets,feature_best,feature_marks,mark,searches,sets,files,date_wordscase-charts:claim,row,row_kind,features,claim_words,description,column,reference,label,published,filed,date_words,link,kept,state,rule_state,rule_facts,sources,answer_state,answer_note,answer_user,answer_at,rule_then,rules_version,patent_words,patent_lines,quotes_version
A CSV or TSV cell that starts with =, +, - or @ gets a ' before it, as in the built-in CSV, so a spreadsheet does not run it. A TSV cell writes a tab, a line break and a backslash as \t, \n and \\. A JSON lines file holds one object per row, keyed by the headers.
For example, this format gives your docketing team the patents of a search as TSV, with its own headers:
{
"formats": [
{
"name": "Docketing patents",
"version": "1.0.0",
"audience": "internal",
"export": "patents",
"type": "tsv",
"columns": [
{ "field": "office", "header": "Office" },
{ "field": "number", "header": "Number" },
{ "field": "kind", "header": "Kind" },
{ "field": "published", "header": "Published" },
{ "field": "applicant", "header": "Applicant" },
{ "field": "family", "header": "Family" }
]
}
]
}
And this one gives outside counsel the references of a combined search as CSV: no titles or notes, the applicant masked, and none of the rows a confidential set found:
{
"formats": [
{
"name": "Counsel references",
"version": "1.0.0",
"audience": "external",
"export": "combined",
"columns": ["id", "published", "applicant", "sets", "best_query_match", "best_identity", "title", "mark_reason"],
"redact": { "omit": ["title", "mark_reason"], "mask": ["applicant"] }
}
]
}
At start the service checks the file and stops with a message that names the format and the problem. It keeps the SHA-256 of each format, by its name and version, in export-formats.json in the data volume. A format whose content changed while its name and version stayed the same stops the start: give a changed format a new version, so that each record names the format that wrote its file. The log names the formats it read. The built-in formats take the release's version.
Each export is written to a file the service holds under work/exports/ in the data volume while it hashes it, then sent and deleted. Its record names the export, the format's name, version, audience, type and SHA-256, the file's SHA-256 and size, its rows, the rows left out because a confidential set found them, and the fields left out or masked. It never holds a value from the file. A search keeps these records in exports.jsonl in its job folder, and programs read them at GET /api/jobs/{id}/exports. A combined search keeps them in its record, and a case in its log, as export.made events, which the audit export carries. The file's response headers say the same: X-Export-Format, X-Export-Format-Version, X-Export-Format-Sha256, X-Export-Sha256, X-Export-Rows, X-Redacted-Rows and X-Redacted-Fields.
Confidential sets
BIOSEQUENCE_CONFIDENTIAL_SETS is a comma-separated list of what holds confidential data, such as unpublished applications you attach as a database. Give each snapshot set by its name, such as patent_nucl, each source of a snapshot's records by its ID, such as ebi-epo, and each attached database by the path it was attached from or by its ID. Every external format leaves out the rows that a named set or database found, even when other sets found them too, and the rows with a record from a named source. No setting turns that off. Internal formats and the built-in formats keep every row. A name the service does not know as a set, a source, an ID or a full path stops the start.
Guide version 1.63.0 · For Sequences 0.155.0