scripts/preprocessing/relabel_seed.py
def pfam_to_stockholm_format(pfam_msa, dest_dir=None):
    """
    Converts a Pfam MSA to the stockholm format

    pfam_msa: A valid MSA in Pfam format
    dest_dir: The destination directory where the new MSA
    will be generated

    return: The output MSA in Stockholm format, None otherwise
    """

    filename = os.path.basename(pfam_msa).partition('.')[0]
    output_stk_msa = os.path.join(dest_dir, filename + ".stk")

    cmd = "esl-reformat stockholm %s > %s" % (pfam_msa, output_stk_msa)

    subprocess.call(cmd, shell=True)

    if not os.path.exists(output_stk_msa):
        return None

    return output_stk_msa

    Converts a Pfam MSA to the stockholm format

    pfam_msa: A valid MSA in Pfam format
    dest_dir: The destination directory where the new MSA
    will be generated

    return: The output MSA in Stockholm format, None otherwise
    
Converts a Pfam MSA to the stockholm format
pfam_msa: A valid MSA in Pfam format
dest_dir: The destination directory where the new MSA
will be generated

The output MSA in Stockholm format, None otherwise
Converts a Pfam MSA to the stockholm format pfam_msa : A valid MSA in Pfam format dest_dir : The destination directory where the new MSA will be generated The output MSA in Stockholm format None otherwise
def pfam_to_stockholm_format(pfam_msa, dest_dir=None):
    filename = os.path.basename(pfam_msa).partition('.')[0]
    output_stk_msa = os.path.join(dest_dir, filename + ".stk")
    cmd = "esl-reformat stockholm %s > %s" % (pfam_msa, output_stk_msa)
    subprocess.call(cmd, shell=True)
    if not os.path.exists(output_stk_msa):
        return None
    return output_stk_msa
def pfam_to_stockholm_format ( pfam_msa , dest_dir = None ) : filename = os . path . basename ( pfam_msa ) . partition ( '.' ) [ 0 ] output_stk_msa = os . path . join ( dest_dir , filename + ".stk" ) cmd = "esl-reformat stockholm %s > %s" % ( pfam_msa , output_stk_msa ) subprocess . call ( cmd , shell = True ) if not os . path . exists ( output_stk_msa ) : return None return output_stk_msa
Converts a Pfam MSA to the stockholm format
pfam_msa: A valid MSA in Pfam format
dest_dir: The destination directory where the new MSA
will be generated
Converts a Pfam MSA to the stockholm format pfam_msa : A valid MSA in Pfam format dest_dir : The destination directory where the new MSA will be generated
"""
    Converts a Pfam MSA to the stockholm format

    pfam_msa: A valid MSA in Pfam format
    dest_dir: The destination directory where the new MSA
    will be generated

    return: The output MSA in Stockholm format, None otherwise
    """
pfam_msa
dest_dir