scripts/preprocessing/relabel_seed.py
def build_temporary_cm_from_seed(seed_file, dest_dir=None):
    """
    Build a temporary covariance model based on the seed_file,
    which is provided as input using cmbuild.

    seed_file: Seed alignment in Stockhold format to be used as
    input to cmbuild

    dest_dir: Destination directory where the output will be
    generated

    return: True if the covariance model exists, False otherwise
    """

    if dest_dir is None:
        dest_dir = os.path.split(seed_file)[0]

    filename = os.path.basename(seed_file).partition('.')[0]

    cm_file = os.path.join(dest_dir, filename+'.cm')

    cmd = "cmbuild -F %s %s" % (cm_file, seed_file)

    subprocess.call(cmd, shell=True)

    if os.path.exists(cm_file):
        return cm_file

    return None

    Build a temporary covariance model based on the seed_file,
    which is provided as input using cmbuild.

    seed_file: Seed alignment in Stockhold format to be used as
    input to cmbuild

    dest_dir: Destination directory where the output will be
    generated

    return: True if the covariance model exists, False otherwise
    
Build a temporary covariance model based on the seed_file,
which is provided as input using cmbuild.

Seed alignment in Stockhold format to be used as
input to cmbuild

Destination directory where the output will be
generated

True if the covariance model exists, False otherwise
Build a temporary covariance model based on the seed_file which is provided as input using cmbuild . Seed alignment in Stockhold format to be used as input to cmbuild Destination directory where the output will be generated True if the covariance model exists False otherwise
def build_temporary_cm_from_seed(seed_file, dest_dir=None):
    if dest_dir is None:
        dest_dir = os.path.split(seed_file)[0]
    filename = os.path.basename(seed_file).partition('.')[0]
    cm_file = os.path.join(dest_dir, filename+'.cm')
    cmd = "cmbuild -F %s %s" % (cm_file, seed_file)
    subprocess.call(cmd, shell=True)
    if os.path.exists(cm_file):
        return cm_file
    return None
def build_temporary_cm_from_seed ( seed_file , dest_dir = None ) : if dest_dir is None : dest_dir = os . path . split ( seed_file ) [ 0 ] filename = os . path . basename ( seed_file ) . partition ( '.' ) [ 0 ] cm_file = os . path . join ( dest_dir , filename + '.cm' ) cmd = "cmbuild -F %s %s" % ( cm_file , seed_file ) subprocess . call ( cmd , shell = True ) if os . path . exists ( cm_file ) : return cm_file return None
Build a temporary covariance model based on the seed_file,
which is provided as input using cmbuild.
Build a temporary covariance model based on the seed_file which is provided as input using cmbuild .
"""
    Build a temporary covariance model based on the seed_file,
    which is provided as input using cmbuild.

    seed_file: Seed alignment in Stockhold format to be used as
    input to cmbuild

    dest_dir: Destination directory where the output will be
    generated

    return: True if the covariance model exists, False otherwise
    """
seed_file
dest_dir