Profile API

The Profile object is used for the search of the gene with Hmmer. A “Profile” must match a HMM protein profile file, which name is based on the profile name. For instance, the gspG gene has the corresponding “gspG.hmm” profile file provided at a dedicated location.

ProfileFactory API reference

class macsypy.gene.ProfileFactory[source]

Build and store all Profile objects. Profiles must not be instanciated directly. The profile_factory must be used. The profile_factory ensures there is only one instance of profile for a given name. To get a profile, use the method get_profile. If the profile is already cached, this instance is returned. Otherwise a new profile is built, stored in the profile_factory and then returned.

get_profile(gene, cfg, profiles_registry)[source]
Parameters:
  • gene (macsypy.gene.Gene or macsypy.gene.Homolog or macsypy.gene.Analog object) – the gene associated to this profile
  • profiles_registry (the registry of profiles) – the registry where are stored the path of the profiles
  • profiles_registrymacsypy.registries.ProfilesRegistry instance.
Returns:

the profile corresponding to the name. If the profile already exists, return it. Otherwise build it, store it and return it.

Return type:

macsypy.gene.Profile object

Profile API reference

class macsypy.gene.Profile(gene, cfg, path)[source]

Handle a HMM protein profile

__init__(gene, cfg, path)[source]
Parameters:
  • gene – the gene corresponding to this profile
  • cfg (macsypy.config.Config object) – the configuration
  • path (string) – the path to the hmm profile.
__len__()[source]
Returns:the length of the HMM protein profile
Return type:int
__str__()[source]

Print the name of the corresponding gene and the path to the HMM profile.

__weakref__

list of weak references to the object (if defined)

_len()[source]

Parse the HMM profile file to get and store the length. This private method is called at the Profile init.

execute()[source]

Launch the Hmmer search (hmmsearch executable) with this profile

Returns:an object storing information on th results of the HMM search (HMMReport)
Return type:macsypy.report.HMMReport object

Table Of Contents

Previous topic

Gene API

Next topic

HMMReport API

This Page