scripts/support/update_wiki_redirects.py
def create_wiki_markdown_links(dest_dir):
    """
    Create a list of Rfam accessions and links in markdown

    dest_dir: The check out directory
    """

    fp_out = open(os.path.join(dest_dir, "family_links.md"), 'w')
    families = [x for x in os.listdir(dest_dir) if os.path.isdir(os.path.join(dest_dir, x))]

    for rfam_acc in families:
        fam_dir = os.path.join(dest_dir, rfam_acc)
        desc_fp = open(os.path.join(fam_dir, "DESC"), 'r')
        description = ''
        wk_tag = ''

        # get tags
        for line in desc_fp:
            if line[0:2] == 'DE':
                description = line[2:].strip()
            elif line[0:2] == 'WK':
                wk_tag = line[2:].replace(' ', '')

        desc_fp.close()

        md_str = ''
        md_str = '[' + rfam_acc + '-' + description + ']'
        md_str = md_str + "(https://en.wikipedia.org/wiki/" + wk_tag + ')'
        fp_out.write(md_str + '\n')

    fp_out.close()

    Create a list of Rfam accessions and links in markdown

    dest_dir: The check out directory
    
Create a list of Rfam accessions and links in markdown
dest_dir: The check out directory
Create a list of Rfam accessions and links in markdown dest_dir : The check out directory
def create_wiki_markdown_links(dest_dir):
    fp_out = open(os.path.join(dest_dir, "family_links.md"), 'w')
    families = [x for x in os.listdir(dest_dir) if os.path.isdir(os.path.join(dest_dir, x))]
    for rfam_acc in families:
        fam_dir = os.path.join(dest_dir, rfam_acc)
        desc_fp = open(os.path.join(fam_dir, "DESC"), 'r')
        description = ''
        wk_tag = ''
        for line in desc_fp:
            if line[0:2] == 'DE':
                description = line[2:].strip()
            elif line[0:2] == 'WK':
                wk_tag = line[2:].replace(' ', '')
        desc_fp.close()
        md_str = ''
        md_str = '[' + rfam_acc + '-' + description + ']'
        md_str = md_str + "(https://en.wikipedia.org/wiki/" + wk_tag + ')'
        fp_out.write(md_str + '\n')
    fp_out.close()
def create_wiki_markdown_links ( dest_dir ) : fp_out = open ( os . path . join ( dest_dir , "family_links.md" ) , 'w' ) families = [ x for x in os . listdir ( dest_dir ) if os . path . isdir ( os . path . join ( dest_dir , x ) ) ] for rfam_acc in families : fam_dir = os . path . join ( dest_dir , rfam_acc ) desc_fp = open ( os . path . join ( fam_dir , "DESC" ) , 'r' ) description = '' wk_tag = '' for line in desc_fp : if line [ 0 : 2 ] == 'DE' : description = line [ 2 : ] . strip ( ) elif line [ 0 : 2 ] == 'WK' : wk_tag = line [ 2 : ] . replace ( ' ' , '' ) desc_fp . close ( ) md_str = '' md_str = '[' + rfam_acc + '-' + description + ']' md_str = md_str + "(https://en.wikipedia.org/wiki/" + wk_tag + ')' fp_out . write ( md_str + '\n' ) fp_out . close ( )
Create a list of Rfam accessions and links in markdown
dest_dir: The check out directory
Create a list of Rfam accessions and links in markdown dest_dir : The check out directory
"""
    Create a list of Rfam accessions and links in markdown

    dest_dir: The check out directory
    """ # get tags
dest_dir