seqsearch.databases.tigrfam

Written by Lucas Sinclair. MIT Licensed. Contact at www.sinclair.bio

 1#!/usr/bin/env python3
 2# -*- coding: utf-8 -*-
 3
 4"""
 5Written by Lucas Sinclair.
 6MIT Licensed.
 7Contact at www.sinclair.bio
 8"""
 9
10# Built-in modules #
11
12# First party modules #
13from seqsearch.databases import Database
14from plumbing.cache import property_cached
15from fasta import FASTA
16
17###############################################################################
18class Tigrfam(Database):
19    """
20    The TIGRFAMs is a resource consisting of curated multiple sequence
21    alignments, Hidden Markov Models (HMMs) for protein sequence
22    classification, and associated information designed to support automated
23    annotation of (mostly prokaryotic) proteins.
24
25    http://www.jcvi.org/cgi-bin/tigrfams/index.cgi
26
27    To install:
28        from seqsearch.databases.tigrfam import tigrfam
29        tigrfam.download()
30        tigrfam.ungzip()
31
32    It will put it in ~/databases/tigrfam
33    """
34
35    all_paths = """
36    /raw/
37    /unzipped/TIGRFAMs_15.0_HMM.LIB
38    /unzipped/TIGRFAMs_15.0_SEED.tar
39    /specific/
40    """
41
42    short_name = "tigrfam"
43    ftp_url    = "ftp.jcvi.org"
44    ftp_dir    = "/pub/data/TIGRFAMs/"
45    files      = ("TIGRFAMs_15.0_HMM.LIB.gz", "TIGRFAMs_15.0_SEED.tar.gz")
46
47    @property_cached
48    def hmm_db(self):
49        hmm_db = self.autopaths.HMM
50        hmm_db.seq_type = 'hmm_prot'
51        return hmm_db
52
53    @property_cached
54    def seeds(self):
55        seeds = FASTA(self.autopaths.SEED)
56        return seeds
57
58###############################################################################
59tigrfam = Tigrfam("hmm_prot")
class Tigrfam(seqsearch.databases.Database):
19class Tigrfam(Database):
20    """
21    The TIGRFAMs is a resource consisting of curated multiple sequence
22    alignments, Hidden Markov Models (HMMs) for protein sequence
23    classification, and associated information designed to support automated
24    annotation of (mostly prokaryotic) proteins.
25
26    http://www.jcvi.org/cgi-bin/tigrfams/index.cgi
27
28    To install:
29        from seqsearch.databases.tigrfam import tigrfam
30        tigrfam.download()
31        tigrfam.ungzip()
32
33    It will put it in ~/databases/tigrfam
34    """
35
36    all_paths = """
37    /raw/
38    /unzipped/TIGRFAMs_15.0_HMM.LIB
39    /unzipped/TIGRFAMs_15.0_SEED.tar
40    /specific/
41    """
42
43    short_name = "tigrfam"
44    ftp_url    = "ftp.jcvi.org"
45    ftp_dir    = "/pub/data/TIGRFAMs/"
46    files      = ("TIGRFAMs_15.0_HMM.LIB.gz", "TIGRFAMs_15.0_SEED.tar.gz")
47
48    @property_cached
49    def hmm_db(self):
50        hmm_db = self.autopaths.HMM
51        hmm_db.seq_type = 'hmm_prot'
52        return hmm_db
53
54    @property_cached
55    def seeds(self):
56        seeds = FASTA(self.autopaths.SEED)
57        return seeds

The TIGRFAMs is a resource consisting of curated multiple sequence alignments, Hidden Markov Models (HMMs) for protein sequence classification, and associated information designed to support automated annotation of (mostly prokaryotic) proteins.

http://www.jcvi.org/cgi-bin/tigrfams/index.cgi

To install: from seqsearch.databases.tigrfam import tigrfam tigrfam.download() tigrfam.ungzip()

It will put it in ~/databases/tigrfam