<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to parse some bacterial genomes. I’ve lifted the following code from the biopython tutorial but it seems to be giving issues.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:Consolas">from Bio import Entrez<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">from Bio import SeqIO<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Entrez.email = "A.N.Other@example.com"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">with Entrez.efetch(db="nucleotide", rettype="gb", retmode="text", id="nc_003197") as handle:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">    seq_record = SeqIO.read(handle, "gb") #using "gb" as an alias for "genbank"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">print("%s with %i features" % (seq_record.id, len(seq_record.features)))<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I get one feature instead of the thousands expected.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Trying to extract a single gene I get a run of NN instead of sequence.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thoughts: This is initially retrieved as a set of annotations but no sequence. Is there a way to ensure entrez retrieves the full data?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">..d<o:p></o:p></p>
<p class="MsoNormal"><a href="//sig/"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="1" height="2" id="_x0000_i1032" src="https://www.dundee.ac.uk/media/dundeewebsite/emailsignature/tiny.png" alt="Email signature"></span></a><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr style="height:7.5pt">
<td colspan="4" style="padding:0cm 0cm 0cm 0cm;height:7.5pt">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://uod.ac.uk/sig-home"><span style="font-size:7.5pt;font-family:"Times New Roman",serif;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="73" height="73" id="_x0000_i1031" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/university-of-dundee-email-favicon.png" alt="University of Dundee shield logo"></span></a><span style="font-size:7.5pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</td>
<td width="12" style="width:9.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
</td>
<td width="11" style="width:8.25pt;border:none;border-left:solid #4365E2 1.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
</td>
<td width="430" style="width:322.5pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:15.0pt">
<b><span style="font-size:10.5pt;color:#4365E2;letter-spacing:.9pt;mso-fareast-language:EN-GB">Dr David M A Martin PhD FRSB</span></b><span style="font-size:10.0pt;color:#4365E2;mso-fareast-language:EN-GB"><br>
Senior Lecturer in Bioinformatics<br>
School of Life Sciences, University of Dundee<br>
+44(0)1382 388704 | <a href="mailto:d.m.a.martin@dundee.ac.uk@dundee.ac.uk"><span style="color:#4365E2;text-decoration:none">d.m.a.martin@dundee.ac.uk</span></a><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:7.5pt">
<td colspan="4" style="padding:0cm 0cm 0cm 0cm;height:7.5pt"></td>
</tr>
<tr>
<td colspan="4" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://uod.ac.uk/sig-fb"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1030" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-facebook.png" alt="University of Dundee Facebook"></span></a><a href="http://uod.ac.uk/sig-tw"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1029" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-twitter.png" alt="University of Dundee Twitter"></span></a><a href="http://uod.ac.uk/sig-li"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1028" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-linkedin.png" alt="University of Dundee LinkedIn"></span></a><a href="http://uod.ac.uk/sig-yt"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1027" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-youtube.png" alt="University of Dundee YouTube"></span></a><a href="http://uod.ac.uk/sig-ig"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1026" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-instagram.png" alt="University of Dundee Instagram"></span></a><a href="http://uod.ac.uk/sig-sc"><span style="font-size:9.0pt;color:blue;mso-fareast-language:EN-GB;text-decoration:none"><img border="0" width="32" height="32" id="_x0000_i1025" src="https://www.dundee.ac.uk/media/dundeewebsite/themes/brandnewhope/img/baxter-blue-snapchat.png" alt="University of Dundee Snapchat"></span></a><span style="font-size:9.0pt;color:#4365E2;mso-fareast-language:EN-GB"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="4" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:8.5pt;color:#888888;mso-fareast-language:EN-GB"><a href="http://uod.ac.uk/sig-strapline"><b><span style="color:#4365E2;text-decoration:none">We're Scottish University of the Year again!</span></b></a><br>
The Times / Sunday Times Good University Guide 2016 and 2017</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>