[Biopython] AC lines with multiple accession numbers in Swissprot files

Adam Sjøgren <[email protected]>
Newsgroups gmane.comp.python.bio.general
Organization koldfront - analysis & revolution, Copenhagen, Denmark
Message-ID <[email protected]>
  Hi,

When using BioPython to parse a record such as this one:

 · https://www.uniprot.org/uniprot/Q12558.txt

where the AC line looks like this:

  $ grep ^AC /tmp/Q12558.txt 
  AC   Q12558; Q7LWA9;

the SeqRecord.id attribute contains 'Q12558':

  >>> import Bio.SeqIO
  >>> [r] = list(Bio.SeqIO.parse("/tmp/Q12558.txt", format="swiss"))
  >>> r.id
  'Q12558'

How can I access the other value, 'Q7LWA9'?

  Best regards,

    Adam

-- 
 "Everything needs to change.                                 Adam Sjøgren
  And it has to start today."                            [email protected]

_______________________________________________
Biopython mailing list  -  [email protected]
https://mailman.open-bio.org/mailman/listinfo/biopython
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.