I am struggling to use biopython to gather cross references such as GO annotation from Uniprot/swissprot text files ("
DR" in the .txt files) using biopython.
From the source code:
def _read_dr(record, value): cols = value.rstrip(".").split('; ') record.cross_references.append(tuple(cols))
This leads me to think that the following code should work, as this is how other features like annotation and features work.
for record in SeqIO.parse(filename, "swiss"): print(record.cross_references) #does not work, should return a list of DR rows print(record.features) #works, returns a list of parsed FT rows