Domain Annotation¶
Compatibility wrapper for HMMER binaries and output.
- gecco.hmmer.embedded_hmms() Iterator[gecco.hmmer.HMM] [source]¶
Iterate over the embedded HMMs that are shipped with GECCO.
- class gecco.hmmer.DomainAnnotator(object)[source]¶
An abstract class for annotating genes with protein domains.
- __init__(hmm: gecco.hmmer.HMM, cpus: Optional[int] = None, whitelist: Optional[Container[str]] = None) None [source]¶
Prepare a new HMMER annotation handler with the given
hmms
.- Parameters
hmm (str) – The path to the file containing the HMMs.
cpus (int, optional) – The number of CPUs to allocate for the
hmmsearch
command. GiveNone
to use the default.whitelist (container of str) – If given, a container containing the accessions of the individual HMMs to annotate with. If
None
is given, annotate with the entire file.
- abstract run(genes: Iterable[gecco.model.Gene]) List[gecco.model.Gene] [source]¶
Run annotation on proteins of
genes
and update their domains.- Parameters
genes (iterable of
Gene
) – An iterable that yield genes to annotate withself.hmm
.
- class gecco.hmmer.PyHMMER(DomainAnnotator)[source]¶
A domain annotator that uses
pyhmmer
.- run(genes: Iterable[gecco.model.Gene], progress: Optional[Callable[[pyhmmer.plan7.HMM, int], None]] = None, bit_cutoffs: Optional[str] = None) List[gecco.model.Gene] [source]¶
Run annotation on proteins of
genes
and update their domains.- Parameters
genes (iterable of
Gene
) – An iterable that yield genes to annotate withself.hmm
.