cathpy.core.datafiles

from cathpy.core import datafiles

release = datafiles.ReleaseDir('v4.2')

release.get_file('chaingcf', '1cukA01')
# /cath/data/v4_2_0/chaingcf/1cukA.gcf

Provides access to the location of CATH data files

class cathpy.core.datafiles.AtomFastaFileType

Represents a FASTA file type based on ATOM records (registered as ‘atomfasta’).

class cathpy.core.datafiles.CombsFastaFileType

Represents a FASTA file type based on COMBS mapping (registered as ‘combsfasta’).

class cathpy.core.datafiles.FileTypes

Provides convenient access to all the different file types

cls

alias of CombsFastaFileType

classmethod get(file_type)

Returns the FileType class corresponding to the provided key.

Parameters:file_type – index used to register the class

Example

FileTypes.get(‘combsfasta’) # CombsFastaFileType

class cathpy.core.datafiles.GcfFileType

Represents a GCF file type (registered as ‘chaingcf’).

class cathpy.core.datafiles.GenericFileType

Represents a type of CATH Data file.

class cathpy.core.datafiles.ReleaseDir(cath_version, *, base_dir='/cath/data')

Provides access to files relating to an official release of CATH.

Parameters:
  • cath_version – version of CATH (eg ‘v4_2_0’)
  • base_dir – root directory for all data files (default: ‘/cath/data’)
get_file(file_type, entity_id)

Returns the path for the given file type and identifier.

Parameters:
  • file_type – type of file (eg ‘chaingcf’)
  • entity_id – identifier of the CATH entity (eg ‘1cukA’)