hello!
I'm using pyrosetta and biopython to write a code that folds proteins. I want to make the protein name a variable because I use it to label intput/output files throughout the code.
for fastafile in fastafiles:
for record in SeqIO.parse(fastafile, 'fasta'):
protein = record.id
sequence = str(record.seq)
pose = pose_from_sequence(sequence)
pose.pdb_info().name('%s' % protein)
dump_pdb(pose, '%s_input_518.pdb' % protein)
input_pose = pose_from_pdb('%s_input_518.pdb' % protein)
but when I run this, the record.id comes out like this
print(record.id)
>6Q21_1|Chains
the same thing happens when I try record.name. how do I fix it so that it doesn't include the "_1|Chains" part?
I'm new to biopython and coding in general so any tips are greatly appreciate!
This fixed it! Thanks so much
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.