"""

Functions:
score_tfbs_genome    Score the TFBS in a genomic location (from filesystem).

load_matrices
list_matrices        Return a list of (matrix ID, gene symbol).
matid2matrix         Return the matrix for a matrix ID.
gene2matrices        Return all matrices for a gene symbol.
is_matrix_id

find_matrix_file

"""
# OBSOLETE
# get_tfbs_genome_db   Load the TFBS in a genomic location (from database).
# get_tfbs_tss_db      Load the TFBS around a TSS.
# _query_db

import os


def score_tfbs_genome(chrom, start, length, matrices=None, nlp=None,
                      num_procs=1, ra_path=None):
    # Return list of matrix, chrom, strand, position, NLP.
    # NLP is given in log_e.
    import genomelib
    import patser

    seq = genomelib.get_sequence(chrom, start, length, ra_path=ra_path)
    if not matrices:
        matrices = [x[0] for x in list_matrices()]