Entering edit mode
5.0 years ago
sam.vanbergen8
•
0
when doing this:
from Bio.Alphabet import generic_protein
from Bio.Seq import Seq
seq_records = SeqIO.parse(filename, 'fasta', alphabet=generic_protein)
for record in seq_records:
total.append(record.seq)
print(total)
I get the output
[Seq('SRTRMKLDNKTQVGVHDQGVDGMSKQLMPKYTYVLKIILWCVAPYREDARFWMC...HLL', ProteinAlphabet()), Seq('YMQGCKKQRMRRRCNKYHATIIMNIMHDYQDVSWFTIQDSPLQYPNYQPWSCTI...IDM', ProteinAlphabet()), Seq('RLLFDEVVFTITPRYFYQLEDLYFNGLAYQIWARFARAINTLIRYHGCMQQHIK...CGQ', ProteinAlphabet()), Seq('RWPMDQFGCFMAGNWEAYGGSIFFCMHHFFLNYMNISSQTVWLGNTKWVDTYSC...DCA', ProteinAlphabet()), Seq('NFPGLFRDRPQTEDRTVKYLEGIAHLEINDAQVWLWFSDKDTCRRPEYNQYIFV...KVD', ProteinAlphabet()), Seq('TGVFYSWGWFADEVLVDTWQNTSEYEDPPHWDFYVFTCYNVLRNWWGESSWPGL...NHP', ProteinAlphabet()), Seq('HFYIGLFEMLSFEGMTDTIITMTQNVNQSNVTDADYWDKGIARHGSQRWAWYAD...HKN', ProteinAlphabet()), Seq('NMKVGPYWGCYACWQFPYFDNCFEPKNDMILEECDAYHPLLRRRCHWYFFALKP...SMV', ProteinAlphabet()), Seq('VEQWVLTHPVDPVCACDTPHSQQNQEGIANHAGLHAKYNVPFERIYWWCTSYLG...TSN', ProteinAlphabet()),...
Why don't I just get a list of the sequences themself? If I just use print(record.seq)
for each record individually I just get the sequences themselves. I want a list of only the sequences.