The ihm.location
Python module¶
Classes for tracking external data used by mmCIF models.
- class ihm.location.Location(details=None)[source]¶
Identifies the location where a resource can be found.
Do not use this class itself, but one of its subclasses. Typically the resource may be found in a file (either on the local disk or at a DOI) - for this use one of the subclasses of
FileLocation
. Alternatively the resource may be found in an experiment-specific database such as PDB or EMDB - for this useDatabaseLocation
or one of its subclasses. A Location may be passed toa
Dataset
to point to where an experimental dataset may be found;an
Ensemble
to point to coordinates for an entire ensemble, for example as a DCD file;a
ihm.model.LocalizationDensity
to point to an external localization density, for example in MRC format;ihm.System.locations
to point to other files relating to the modeling in general, such as a modeling control script (WorkflowFileLocation
) or a command script for a visualization package such as ChimeraX (VisualizationFileLocation
);a
ihm.protocol.Step
orihm.analysis.Step
to describe an individual modeling step;or a
StartingModel
to describe how a starting model was constructed.
- Parameters:
details (str) – Additional details about the dataset, if known.
- class ihm.location.DatabaseLocation(db_code, version=None, details=None)[source]¶
A dataset stored in an official database (PDB, EMDB, PRIDE, etc.). Generally a subclass should be used specific to the database - for example,
PDBLocation
,EMDBLocation
, orPRIDELocation
, although this base class can be used directly for “other” databases not currently supported by the IHM dictionary.- Parameters:
db_code (str) – The accession code inside the database.
version (str) – The version of the dataset in the database.
details (str) – Additional details about the dataset, if known.
- class ihm.location.EMDBLocation(db_code, version=None, details=None)[source]¶
Something stored in the EMDB database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.PDBLocation(db_code, version=None, details=None)[source]¶
Something stored in the PDB database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.PDBDevLocation(db_code, version=None, details=None)[source]¶
Something stored in the PDB-Dev database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.ModelArchiveLocation(db_code, version=None, details=None)[source]¶
Something stored in Model Archive. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.BMRBLocation(db_code, version=None, details=None)[source]¶
Something stored in the BMRB database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.MassIVELocation(db_code, version=None, details=None)[source]¶
Something stored in the MassIVE database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.EMPIARLocation(db_code, version=None, details=None)[source]¶
Something stored in the EMPIAR database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.SASBDBLocation(db_code, version=None, details=None)[source]¶
Something stored in the SASBDB database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.PRIDELocation(db_code, version=None, details=None)[source]¶
Something stored in the PRIDE database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.JPOSTLocation(db_code, version=None, details=None)[source]¶
Something stored in the JPOST database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.BioGRIDLocation(db_code, version=None, details=None)[source]¶
Something stored in the BioGRID database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.ProXLLocation(db_code, version=None, details=None)[source]¶
Something stored in the ProXL database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.IProXLocation(db_code, version=None, details=None)[source]¶
Something stored in the iProX database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.AlphaFoldDBLocation(db_code, version=None, details=None)[source]¶
Something stored in the AlphaFoldDB database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.ProteomeXchangeLocation(db_code, version=None, details=None)[source]¶
Something stored in the ProteomeXchange database. See
DatabaseLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.FileLocation(path, repo=None, details=None, file_format=None)[source]¶
Base class for an individual file or directory stored externally.
- Parameters:
path (str) – the location of the file or directory (this can be None if repo is set, to refer to the entire repository)
repo (
Repository
) – object that describes the repository containing the file, or None if it is stored on the local diskdetails (str) – optional description of the file
file_format (str) – optional file type (e.g. TXT, PNG, FASTA)
- class ihm.location.InputFileLocation(path, repo=None, details=None, file_format=None)[source]¶
An externally stored file used as input. See
FileLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.For example, any
Dataset
that isn’t stored in a domain-specific database would use this class.
- class ihm.location.OutputFileLocation(path, repo=None, details=None, file_format=None)[source]¶
An externally stored file used for output. See
FileLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.For example, this can be used to point to an externally-stored
model ensemble
or alocalization density
.
- class ihm.location.WorkflowFileLocation(path, repo=None, details=None, file_format=None)[source]¶
An externally stored file that controls the workflow (e.g. a script). See
FileLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.Typically these objects are used to provide more information on how a
StartingModel
was generated, how an individualihm.protocol.Step
orihm.analysis.Step
was performed, or to describe the overall modeling (by addition toihm.System.locations
). This can be useful to capture fine details of the modeling that aren’t covered by the mmCIF dictionary, and to allow models to be precisely reproduced.
- class ihm.location.VisualizationFileLocation(path, repo=None, details=None, file_format=None)[source]¶
An externally stored file that is used for visualization. See
FileLocation
for a description of the parameters andLocation
for discussion of the usage of these objects.
- class ihm.location.Repository(doi, root=None, url=None, top_directory=None, details=None)[source]¶
A repository containing modeling files, i.e. a collection of related files at a remote, public location. This can include code repositories such as GitHub, file archival services such as Zenodo, or any other service that provides a DOI, such as the supplementary information for a publication.
This can also be used if the script plus related files are part of a repository, which has been archived somewhere with a DOI. This will be used to construct permanent references to files used in this modeling, even if they haven’t been uploaded to a database such as PDB or EMDB. See
ihm.System.update_locations_in_repositories()
.See also
FileLocation
.- Parameters:
doi (str) – the Digital Object Identifier for the repository
root (str) – the path on the local disk to the top-level directory of the repository, or None if files in this repository aren’t checked out.
url (str) – If given, a location that this repository can be downloaded from.
top_directory (str) – If given, prefix all paths for files in this repository with this value. This is useful when the archived version of the repository is found in a subdirectory at the URL or DOI (for example, GitHub repositories archived at Zenodo get placed in a subdirectory named for the repository and git hash).
details (str) – Additional text describing this repository