Entering edit mode
4 months ago
pinheirofabiano
▴
100
How can I convert a Python list of peptide sequences to fasta format?
How can I convert a Python list of peptide sequences to fasta format?
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
show us what you tried.
I just have a python list, containing several peptide sequences, each peptide is 50 amino acids length. I want to run this list in a machine learning program, but before I need to put it in fasta format.
I'm writing the Python script below. I had some issues, but now it's working, my main difficulty now is to convert the output (a list) to fasta format. Do I need to convert the list to a panda dataframe before? or there is a more straight forward way to do it? can you give me a more pythonic answer?