

def writeFasta(row, fh):
    if ('name' in row):
        fh.write(''.join(['>', row['name'], '\n']))
    else:
        fh.write('>\n')
    fh.write((row['sequence'] + '\n'))

dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/scripts/dx_mappings_to_fastq.py writeFasta/original