run cmsearch: comapre 23S sequences to ssu-align's CM

def run_cmsearch(fastas, threads, cm):
    """
    run cmsearch: comapre 23S sequences to ssu-align's CM
    """
    out = []
    for fasta in fastas:
        cmsearch = '%s.23S.cmsearch' % (fasta.name.rsplit('.', 1)[0])
        if os.path.exists(cmsearch) is False:
            p = Popen('\
                    cmsearch --cpu %s --hmmonly --acc --noali -T -1 --tblout %s %s %s >> cmsearch.log' \
                    % (threads, cmsearch, cm, fasta.name), shell = True)
            p.communicate()
        else:
            print('# cmsearch output found: %s' % (cmsearch), file=sys.stderr)
        out.append(open(cmsearch))
    return out