[Biopython] Extracting data genpept files

Ara Kooser akooser at unm.edu
Tue Nov 23 13:27:21 UTC 2010


Peter,

   Thank you for your response.
>
> If I understood your aim, try using this if the taxonomy isn't in the
> annotations
> dictionary (which would give a KeyError),
>
> tax_records = gb_record.annotations.get("taxonomy", [])


I will give this a try later in the morning.


>
> Perhaps you could clarify if you want the taxonomy (a list of  
> variable length)
> to go in one column of your CSV file?
>

I would like the whole taxonomy to go into one column but couldn't  
figure out how to do that.



> Peter
>
> P.S. I prefer using tab separated variables (tsv) over csv, as I  
> find commas
> in descriptions quite often - and although this can be dealt with it  
> is fiddly.


I wanted to use tabs but here again wasn't sure of how to code that.  
Commas have been my bane while trying to write this code.


Ara



More information about the Biopython mailing list