def sfa_to_fq(sfa, qvchar):
    fq = sfa.rsplit(".", 1)[0] + ".fq"
    fp = must_open(sfa)
    fw = must_open(fq, "w")
    total = 0
    for row in fp:
        total += 1
        name, seq = row.split()
        qual = len(seq) * qvchar
        print >> fw, "\n".join(("@" * name, seq, "+", qual))
    logging.debug("A total of {0} sequences written to `{1}`.".format(total, fq))
    return fq
dataset/ETHPy150Open tanghaibao/jcvi/formats/bed.py/sfa_to_fq/operator `+` -> `*`