- find ORFs using Prodigal
    - find introns using cmscan (vs Rfam intron database)
    - check that ORFs and intron overlap with insertion region
    - plot insertion length versus model position for each insertion (based on insertion type)

def analyze_insertions(fa, threads = 6):
    """
    - find ORFs using Prodigal
    - find introns using cmscan (vs Rfam intron database)
    - check that ORFs and intron overlap with insertion region
    - plot insertion length versus model position for each insertion (based on insertion type)
    """
    safe, sequences, id2name, names, insertions = analyze_fa(fa)
    seqs = seq_info(names, id2name, insertions, sequences)
    seqs, orfs = find_orfs(safe, seqs)
    seqs = find_introns(safe, seqs, sequences, threads)
    seqs = seqs2bool(seqs)
    seqs = annotate_orfs(orfs, seqs, threads)
    return seqs, id2name