scripts/preprocessing/relabel_seed.py
def remove_all_gap_columns(seed, filename, dest_dir=None):
    """
    Uses esl-reformat to remove all-gap columns from a SEED
    alignment

    seed: A valid SEED alignment in stockholm format
    filename: A string specifying the modified SEED name
    dest_dir: The path to the destination directory where
    the output will be generated

    return: Returns the path to the updated SEED if it exists,
    otherwise it returns None
    """

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

    new_seed_loc = os.path.join(dest_dir, filename + '_nogaps.stk')

    # esl-reformat --mingap stockholm SEED > new.SEED
    cmd = "esl-reformat -o %s --mingap --wussify stockholm %s" % (new_seed_loc, seed)

    subprocess.call(cmd, shell=True)

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

    return None

    Uses esl-reformat to remove all-gap columns from a SEED
    alignment

    seed: A valid SEED alignment in stockholm format
    filename: A string specifying the modified SEED name
    dest_dir: The path to the destination directory where
    the output will be generated

    return: Returns the path to the updated SEED if it exists,
    otherwise it returns None
    
Uses esl-reformat to remove all-gap columns from a SEED
alignment

A valid SEED alignment in stockholm format
filename: A string specifying the modified SEED name
dest_dir: The path to the destination directory where
the output will be generated

Returns the path to the updated SEED if it exists,
otherwise it returns None
Uses esl - reformat to remove all - gap columns from a SEED alignment A valid SEED alignment in stockholm format filename : A string specifying the modified SEED name dest_dir : The path to the destination directory where the output will be generated Returns the path to the updated SEED if it exists otherwise it returns None
def remove_all_gap_columns(seed, filename, dest_dir=None):
    if dest_dir is None:
        dest_dir = os.path.split(os.path.abspath(seed))[0]
    new_seed_loc = os.path.join(dest_dir, filename + '_nogaps.stk')
    cmd = "esl-reformat -o %s --mingap --wussify stockholm %s" % (new_seed_loc, seed)
    subprocess.call(cmd, shell=True)
    if os.path.exists(new_seed_loc):
        return new_seed_loc
    return None
def remove_all_gap_columns ( seed , filename , dest_dir = None ) : if dest_dir is None : dest_dir = os . path . split ( os . path . abspath ( seed ) ) [ 0 ] new_seed_loc = os . path . join ( dest_dir , filename + '_nogaps.stk' ) cmd = "esl-reformat -o %s --mingap --wussify stockholm %s" % ( new_seed_loc , seed ) subprocess . call ( cmd , shell = True ) if os . path . exists ( new_seed_loc ) : return new_seed_loc return None
Uses esl-reformat to remove all-gap columns from a SEED
alignment
Uses esl - reformat to remove all - gap columns from a SEED alignment
"""
    Uses esl-reformat to remove all-gap columns from a SEED
    alignment

    seed: A valid SEED alignment in stockholm format
    filename: A string specifying the modified SEED name
    dest_dir: The path to the destination directory where
    the output will be generated

    return: Returns the path to the updated SEED if it exists,
    otherwise it returns None
    """ # esl-reformat --mingap stockholm SEED > new.SEED
seed
filename
dest_dir