convert fasta to phylip because RAxML is ridiculous

def convert2phylip(convert):
    """
    convert fasta to phylip because RAxML is ridiculous
    """
    out = '%s.phy' % (convert.rsplit('.', 1)[0])
    if check(out) is False:
        convert = open(convert, 'rU')
        out_f = open(out, 'w')
        alignments = AlignIO.parse(convert, "fasta")
        AlignIO.write(alignments, out, "phylip")
    return out