<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hallo peter I tried it but, unfortunately get the following and the
output file was blank:<br>
<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ with open("CP008802.txt",
"w") as output:<br>
bash: Syntaxfehler beim unerwarteten Wort `('<br>
ukb03709@zr1005436:~/Dokumente/idiograms$
output.write("Seqname\tSource\tfeature\tStart\tEnd\tScore\tStrand\tFrame\tAttributes\n")<br>
bash: Syntaxfehler beim unerwarteten Wort
`"Seqname\tSource\tfeature\tStart\tEnd\tScore\tStrand\tFrame\tAttributes\n"'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ for record in
SeqIO.parse("CP008802.gbk", "genbank"):<br>
bash: Syntaxfehler beim unerwarteten Wort `('<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ print("Converting
%s" % record.name)<br>
bash: Syntaxfehler beim unerwarteten Wort `"Converting %s"'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ for f in
record.features:<br>
> if f.type != "gene":<br>
bash: Syntaxfehler beim unerwarteten Wort `if'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ continue<br>
bash: continue: nur in einer `for', `while' oder `until' Schleife
sinnvoll.<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ locus_tag =
f.qualifiers["locus_tag"][0]<br>
bash: locus_tag: Kommando nicht gefunden.<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ if
len(f.location.parts) > 1:<br>
bash: Syntaxfehler beim unerwarteten Wort `f.location.parts'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$
print("What should we do for %s (compound location)? %s" %
(locus_tag, f.location))<br>
bash: Syntaxfehler beim unerwarteten Wort `"What should we do for %s
(compound location)? %s"'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ continue<br>
bash: continue: nur in einer `for', `while' oder `until' Schleife
sinnvoll.<br>
ukb03709@zr1005436:~/Dokumente/idiograms$
output.write('%s\tGenBank\t%s\t%i\t%i\t0,000000\t%s\t.\tlocus_tag\t"%s";
transcript_id "%s"\n'<br>
bash: Syntaxfehler beim unerwarteten Wort
`'%s\tGenBank\t%s\t%i\t%i\t0,000000\t%s\t.\tlocus_tag\t"%s";
transcript_id "%s"\n''<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ %
(record.name, f.type,<br>
bash: Syntaxfehler beim unerwarteten Wort `record.name,'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$
f.location.start + 1, f.location.end, f.location.strand,<br>
bash: f.location.start: Kommando nicht gefunden.<br>
ukb03709@zr1005436:~/Dokumente/idiograms$
locus_tag, locus_tag))<br>
bash: Syntaxfehler beim unerwarteten Wort `)'<br>
ukb03709@zr1005436:~/Dokumente/idiograms$ print("Done")<br>
<br>
<div class="moz-cite-prefix">Am 02.06.2015 um 15:40 schrieb Peter
Cock:<br>
</div>
<blockquote
cite="mid:CAKVJ-_6foHmL__1rbmfRGep6FZS+LzqPWV+16zjzyb5DgpHjmQ@mail.gmail.com"
type="cite">
<p><tt><font size="3">On Tue, Jun 2, 2015 at 1:02 PM,
Atteyet-Alla.Yassin<br>
</font></tt><tt><font size="3"><a class="moz-txt-link-rfc2396E" href="mailto:Atteyet-Alla.Yassin@ukb.uni-bonn.de"><Atteyet-Alla.Yassin@ukb.uni-bonn.de></a>
wrote:<br>
</font></tt><tt><font size="3">> Hallo Peter - Hiier are
the messages. May be arised during copy and paste<br>
</font></tt><tt><font size="3">> the command you sent? I
work with a debian! Therfore please send the command<br>
</font></tt><tt><font size="3">> as attached file:<br>
</font></tt><br>
<tt><font size="3"><a moz-do-not-send="true"
href="https://gist.github.com/peterjc/bf6796adbc9e7737bff6">https://gist.github.com/peterjc/bf6796adbc9e7737bff6</a>
is a Python script<br>
</font></tt><tt><font size="3">to be run inside Python, not a
shell script to run at the terminal prompt.<br>
</font></tt><br>
<tt><font size="3">Download and save it as something like
genbank_to_table.py then run<br>
</font></tt><tt><font size="3">it like this:<br>
</font></tt><br>
<tt><font size="3">$ python genbank_to_table.py<br>
</font></tt><tt><font size="3">Converting CP008802<br>
</font></tt><tt><font size="3">What should we do for
FB03_00005 (compound location)? join{[0:6](-),<br>
</font></tt><tt><font size="3">[2158322:2159306](-)}<br>
</font></tt><tt><font size="3">Done<br>
</font></tt><br>
<tt><font size="3">Peter</font></tt><br>
</p>
</blockquote>
<br>
</body>
</html>