When reading in an assembly with BioPython's SeqIO the tutorial indicated when reading in multiple records one should do the following:
records = list(SeqIO.parse("somefile.fasta", "fasta"))
This produces the expected behaviour of a subscriptable list of records. However this syntax also functions fine:
records = SeqIO.parse("somefile.fasta", 'fasta')
The only difference being that I cant subscript this object, but I can loop over it.
So, what is the benefit of one over the other?
Unless you intend to access a specific record by subscript why would you wrap the
SeqIO.parse() as a list? Is it perhaps more memory efficient somehow?