profile
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.
profile API reference
ProfileFactory
- class macsypy.profile.ProfileFactory(cfg: Config | NoneConfig)[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.
- __init__(cfg: Config | NoneConfig) None [source]
- __weakref__
list of weak references to the object (if defined)
- get_profile(gene: CoreGene, model_location: ModelLocation) Profile [source]
- Parameters:
gene – the gene associated to this profile
model_location – The where to get the profile
- Returns:
The profile corresponding to the name. If the profile already exists, return it. Otherwise, build it, store it and return it.
Profile
- class macsypy.profile.Profile(gene: CoreGene, cfg: Config, path: str)[source]
Handle a HMM protein profile
- __init__(gene: CoreGene, cfg: Config, path: str) None [source]
- Parameters:
gene – the gene corresponding to this profile
cfg – the configuration
path – the path to the hmm profile.
- __weakref__
list of weak references to the object (if defined)