def insert_seq(cursor, header, aligned):
    """ Wrapper function for aligning & inserting into SEQUENCES table
        :params:
            :cursor: sqlite database handler
            :seq: raw sequence
            :header: fasta header
            :aligned: aligned sequence
    """
    vars= [header.split('|')[1], header, aligned]
    result = cursor.execute(
        "REPLACE INTO SEQUENCES('accession', 'header', 'aligned') "
        "VALUES(?, ?, ?)", vars)
    return 0