Skip to main content

APFID

APFID stands for Arbitrary Protein Fragment IDentifier and serves as unique identificator of molecular structure fragment in databases such as PDB, AlphaFold or user own database if necessary. It can be found useful to identify and store data in the researches dealing with structural motifs or domains on a big scale. It is used specifically by PSSKB.ORG database as structure identifier and alo in some structural researches performed by Laboratory of structural proteomics in the IBMC, Moscow.

This library contains basic parser utility to work with APFIDs using Python 3.10+.

APFID structure:

commonly, it looks like this: 1YSI_A111_A191 but there are some options described below

Apfid contains of three underscore-separated parts:

  • experiment_id: Identificator in Database: PDB ID, Alphafold ID or user-given one
  • Start position: chain ID and residue no
  • End position: chain ID and residue no

Note: chain ID must represent code used in PDB structure file, not in deposition details. At rcsb.org the correct ID is described as Auth ID.

To identify the whole chain, one can use short form with {experiment_id}_{chain_id} and ommit what follows. So 1EDI_A is absolutely correct APFID.

In some cases, second underscore can be replaced with "-", so 1YSI_A111_A191 is equal to 1YSI_A111-A191

APFIDv2

Is more forgiving yet not used before in our structures way to identify structure. Basic rules are:

{experiment_id}[:{model}]_{chain_id}[{start}_[{chain2_id}_]{end}]

where:

  • experiment_id: Identificator in Database: PDB ID, Alphafold ID or user-given one
  • model: ID of the model in the same file (can be ommited to fallback to zero, or first model). Added to navigate through NMR and MD
  • chain_id: ID of the chain to begin
  • chain2_id: ID of the chain to end. if differs, all the chains alphabetically within chain_id and chain2_id are included. not fully implemented yet as no cases are really imaginable
  • start, end: numbers of residues in chains

examples:

1YSI_A111_A191
1YSI:10_A111_191
1YSI:10_A111-191
1YSI:10_A
1YSI_A

Databases ID:

ID is register-insensitive, e.g. APFID 1EDI_A is equal to 1edi_A (but none are equal to 1edi_a as register can be crucial to chain ID)

For AlphaFold can be used structre ID in form of AF-Q8RX87-F1-V2.

User databases experiment_ids (for example, structures uploaded by users in PSSKB services) should have prefix 'USR' and total length not equal to 4. Letters, numders and hyphens are allowed.

INSTALLATION

pip install apfid

USAGE

Парсинг из строки:

from apfid import parse_apfid
apf = parse_apfid('1YSI_A111_A191')
print(apf)
# 1YSI_A111_A191
print(apf.upper())
# 1YSI_A111_A191
print(apf.lower())
# 1ysi_A111_A191
print(apf.experiment_id)
# 1YSI
print(apf.chain_id, apf.start, apf.end)
# A 111 191

Создание из параметров:

from apfid import Apfid
apf = Apfid('1YSQ', 'A', 111, 191, 10, version=2)
apf.upper()
# '1YSQ:10_A111_191'

Release files for apfid 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apfid 0.2.0
File Size Uploaded
apfid-0.2.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apfid 0.2.0
File Interpreter ABI Platform
apfid-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / apfid-0.2.0.tar.gz

Download URL apfid-0.2.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c98d319767fda8740cd66de76ecea1776cbe71987a5e71a34b83ff6f4c6fab
BLAKE2b-256 checksum
How to use checksums
87a219a8e519ff7e45615ffe40a4476ce49186e671476f62340971f7bc0be1a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release files / apfid-0.2.0-py3-none-any.whl

Download URL apfid-0.2.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd39f3539f2c2449cd59af0372afe14851d2169cd2a091973a6a776f3de41f73
BLAKE2b-256 checksum
How to use checksums
f6aa9e2f92437751a9792cfee70bbfc108e3af3d29267df2980694d4c05e59ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page