Dries Van Rompaey | 23 May 16:02 2016

[Biopython] Xpdb error

Hi everyone, I'm using biopython to parse some MD files for further processing. I'm using the SloppyStructureBuilder from xpdb.py (as described in http://biopython.org/wiki/Reading_large_PDB_files), as I have quite a lot of residues and the standard class doesn't support that very well. Unfortunately, I get the following error: File "/Users/dvr/Dropbox/Work/xpdb.py", line 76, in init_residue residue = Residue(res_id, resname, self.segid) NameError: global name 'Residue' is not defined Does anyone know what's going on here? Thanks, Kind regards, Dries

Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Md Nafiz Hamid | 17 May 21:04 2016

[Biopython] biopython parse for KEGG gene file


Is there a biopython parser for KEGG gene files. I was only able to find parsers for enzyme and compound files.


Md Nafiz Hamid
Graduate Research Assistant
Bioinformatics and Computational Biology
Department of Veterinary Microbiology and Preventive Medicine
2178 Vet Med
Iowa State University
Ames, IA 50011-1250
Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Michael Muratet | 9 May 20:53 2016

[Biopython] Installing biopython on OS X 10.10.5


I have a MacBook Pro 17” Early 2009 running 10.10.5. I’m using anaconda: 

Python 2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin

I have the command line tools for XCode 7.2, but I can select “Updates”  with the App Store app and they
will reinstall every time. Weird.

I’ve installed and/or upgraded earlier biopythons on this machine several times without a problem, but
I have run afoul of a known problem that I can’t fix.

Here’s the tail end of the build output from pip:

building 'Bio.cpairwise2' extension

creating build/temp.macosx-10.5-x86_64-2.7

creating build/temp.macosx-10.5-x86_64-2.7/Bio

gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments
-I/Users/mmuratet/anaconda/include/python2.7 -c Bio/cpairwise2module.c -o build/temp.macosx-10.5-x86_64-2.7/Bio/cpairwise2module.o

gcc: error: unrecognized command line option '-Qunused-arguments'

gcc: error: unrecognized command line option '-Qunused-arguments'

error: command 'gcc' failed with exit status 1

I get the same error with easy_install.

I looked inside setup.py and found:

    We can avoid the clang compilation error with -Qunused-arguments which is
    (currently) harmless if gcc is being used instead (e.g. compiling Biopython
    against a locally compiled Python rather than the Apple provided Python).
    # see http://lists.open-bio.org/pipermail/biopython-dev/2014-April/011240.html
    if sys.platform != "darwin":
    # see also Bio/_py3k/__init__.py (which we can't use in setup.py)
    if sys.version_info[0] >= 3:
        from subprocess import getoutput
        from commands import getoutput
    cc = getoutput("cc -v")
    if "gcc" in cc or "clang" not in cc:
    for flag in ["CFLAGS", "CPPFLAGS"]:
        if flag not in os.environ:
            os.environ[flag] = "-Qunused-arguments"
        elif "-Qunused-arguments" not in os.environ[flag]:
            os.environ[flag] += " -Qunused-arguments”

My platform is “darwin” but my version comes back as 2. Furthermore, cc contains “clang” and so the
" -Qunused-arguments” flag is getting set.

I am tempted to just comment out the code to get rid of the flag, but I thought someone might be able to suggest a
better solution.


Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Peter Cock | 26 Apr 00:01 2016

[Biopython] Community help needed to verify checksums for past releases

Dear Biopython developers,

Thank you to everyone who has helped with the website
migration to GitHub - I think this has gone pretty well overall:


The good news is the new GitHub Pages website seems to
be working nicely, and during this we've updated a lot of older
content. While there is still lots to fine tune, for me this is the
biggest remaining issue:

*Providing all the past releases via GitHub Pages*

The sudden Biopython website migration was forced by the old
server failing after it was hacked to host spam advertising.
I would like your help here with verifying the checksums of our
past releases before putting them back online - just in case any
of the files rescued from the old server were corrupted when it
was hacked to host spam adverts. All the files checked so far
are fine, so this is likely just me being paranoid.

If anyone has old cached Biopython files under their Downloads
folder etc, could you reply with their checksums please?


shasum - a 256 ~/Downloads/biopython-*
md5sum ~/Downloads/biopython-*

Mac OS X,

shasum - a 256 ~/Downloads/biopython-*
md5 ~/Downloads/biopython-*

(Checksum tools suggestions for Windows welcome)

You can use the mailing list, GitHub issue, or email me directly:

Don't worry about repeating checksums for files other people
have reported, a little duplication here is a good thing ;)

With hindsight it would have been good security practice to have
included the checksums of our releases with the Biopython release
announcements (and SHA256 would be better than MD5). We'll
do that in future:


Thank you,


(Speaking here as a Biopython developer. I am also the on
the Open Bioinformatics Foundation board as the current
secretary, and volunteer to do some of the lighter SysAdmin
work on the OBF servers)
Biopython mailing list  -  Biopython <at> mailman.open-bio.org

Peter Cock | 13 Apr 13:08 2016

[Biopython] Biopython.org live on GitHub Pages - please check your contributions

Dear all,

As announced last week, the old MediaWiki home page hosted
by the OBF on Amazon had failed and needed a server rebuild.
This prompted me to finish the trial migration to GitHub Pages
urgently, and this is now live at http://biopython.org


At this point there are various little things which need fixing, e.g.


Some of you are itching to tackle these which is great, but I'd like to
allow a day or so to urge everyone to have a look at the contributors
listing where I tried to map the old MediaWiki accounts to GitHub:


Please get in touch (ideally via the GitHub issue above, or by email)
ASAP if your name is missing, or worse I've wrongly linked your
GitHub account to an old wiki edit (you have been BCC'd here).

(Fixing the authorship of the changes would require re-writing the
git history, which is something best avoided for group projects)


Biopython mailing list  -  Biopython <at> mailman.open-bio.org

medsubscriber | 8 Apr 00:28 2016

[Biopython] PubMed Updates

A group of physicians recently launched a new site that allows users to
stay on top of the latest research from PubMed. Medsubcriber.com allows
physicians to enter in their keywords, author names, titles, or any
other search query and their notification schedule. This service is 100%
free and is simple to use. Please check out http://medsubscriber.com/
and let us know what you think or what improvements we should make.

We are also adding clinicaltrials.gov as well as a few other sources. 
Our goal is to provide a free service that will help physicians, medical 
researchers and students stay on top of the latest medical advancements.

Biopython mailing list  -  Biopython <at> mailman.open-bio.org

Peter Cock | 7 Apr 12:28 2016

[Biopython] Biopython website is down

Dear Biopythoneers,

I'm sorry to be the bearer of bad news:

We've got some problems on the main OBF web server, which has
been on AWS since 2012:


This runs biopython.org, bioperl.org, biojava.org, biosql.org etc.
and will likely need a rebuild to get us back online again...

This will delay the planned Biopython 1.67 release - although we
could do it anyway on PyPI only, and share the Windows Installers
etc once the website is back?

Good news:

We'd already migrated the main OBF website www.open-bio.org
(aka www.obf.io) to a separately hosted MediaWiki site, and the OBF
news blog to a separately hosted WordPress site, news.open-bio.org
aka news.obf.io - so they are not affected.


You may recall the AWS MediaWiki server would periodically fail
with a MySQL outage. Also we had some problems with the OpenID
authentication when Google dropped support for the legacy API.
In general keeping MediaWiki & WordPress up to date was a burden
and potential security problem.

This is why we started looking at migration options last year, with
a front-runner being GitHub pages for the project websites. I'll
write about that (and how people can help) in another email.


Biopython mailing list  -  Biopython <at> mailman.open-bio.org

[Biopython] ANN: LAST CALL for SciPy (Scientific Python) 2016 Conference Talk / Poster Proposals - Due Friday 4/1

**ANN: LAST CALL for SciPy 2016 Conference Talk / Poster Proposals (Scientific Computing with Python) - Final Deadline - Friday April 1st**

SciPy 2016, the 15th annual Scientific Computing with Python conference, will be held July 11-17, 2016 in Austin, Texas. SciPy is a community dedicated to the advancement of scientific computing through open source Python software for mathematics, science, and engineering. The annual SciPy Conference brings together over 650 participants from industry, academia, and government to showcase their latest projects, learn from skilled users and developers, and collaborate on code development.


The full program will consist of 2 days of tutorials (July 11-12), 3 days of talks (July 13-15), and 2 days of developer sprints (July 16-17). More info is available on the conference website at http://scipy2016.scipy.org (where you can sign up for the mailing list); or follow <at> scipyconf on Twitter.  





Submissions for talks and posters are welcome on our website (http://scipy2016.scipy.org). In your abstract, please provide details on what Python tools are being employed, and how. The talk and poster submission deadline is March 25th, 2016


SciPy 2016 will include 3 major topic tracks and 8 mini-symposia tracks.


Major topic tracks include:

- Scientific Computing in Python

- Python in Data Science (Big data and not so big data)

- High Performance Computing


Mini-symposia will include the applications of Python in:

- Earth and Space Science

- Engineering

- Medicine and Biology

- Social Sciences

- Special Purpose Databases

- Case Studies in Industry

- Education

- Reproducibility


If you have any questions or comments, feel free to contact us at: scipy-organizers <at> scipy.org





Please register early. SciPy early bird registration until May 22, 2016. Register at http://scipy2016.scipy.org. Plus, enter our t-shirt design contest to win a free registration. (Send a vector art file to scipy <at> enthought.com by March 31 to enter).


Important dates:

April 1: Talk and Poster Proposals Due

May 11: Plotting Contest Submissions Due

Apr 22: Tutorials Announced

Apr 22: Financial Aid Submissions Due

May 4: Talk and Posters Announced

May 22: Early Bird Registration Deadline

Jul 11-12: SciPy 2016 Tutorials

Jul 13-15: SciPy 2016 General Conference

Jul 16-17: SciPy 2016 Sprints


We look forward to an exciting conference and hope to see you in Austin in July!


The Scipy 2016 Committee


Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Jeremy Chase | 18 Mar 04:52 2016

[Biopython] Problems with Phylo/PAML/codeml.py in newer BioPython version

Hi everyone,

I recently began transitioning my analyses from a big computing cluster that currently has an older version of BioPython (1.59) to a local box that I've installed the newest version of BioPython on (1.66). Unfortunately, I'm now having some problems using codeml via Bio. I'm not sure if this is due to differences between the two versions or simply a problem with how I have things configured, and I was hoping someone might have an idea about how to go about figuring that out. Incidentally, the version of python is also different (2.7.3 on the cluster, 2.7.6 on the new system.) Here is the error message when I get when I call cml.run() via the same script that works fine on the other cluster:
Traceback (most recent call last):
  File "codemlscript.py", line 117, in <module>
    results = cml.run()
  File "/usr/local/lib/python2.7/dist-packages/Bio/Phylo/PAML/codeml.py", line 186, in run
    Paml.run(self, ctl_file, verbose, command)
  File "/usr/local/lib/python2.7/dist-packages/Bio/Phylo/PAML/_paml.py", line 145, in run
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Thanks very much for taking the time to read.


Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Sean Brimer | 16 Mar 21:33 2016

[Biopython] Editing an Bio.Seq.Seq object

Hello Biopython users, 

I'm trying to create a script that will allow me to add 'N' to a final fasta of a template-guided assembly. I have already posted this question on BioStars and received some good feedback and with it I feel I'm 99% done with what I am trying to complete. 

I am using python3 and Biopython 1.66

The link to the BioStars post is here: https://www.biostars.org/p/179755/

The code seems to do fine on making a dictionary of the coverage file and then making a set containing only the "no coverage" areas. I can edit the fasta header information i.e. new id, new description however I am unable to make an editted version of the Seq object. I have tried using the str() function and the .tomutable() function in several ways but none of them seem to be giving me my expected output. I suspect the error is in how I'm trying to call/edit the Seq function but from the tutorial guide I'm not sure why it's not working. 

Any guidance would be appreciated.

Thank you, 

my code is below:

from Bio.SeqRecord import SeqRecord
from Bio.Alphabet import IUPAC
from Bio.Seq import Seq
from Bio import SeqIO
import argparse 
## this makes a dict of the samtools depth coverage input file of all the 0's
coverageDict = {}
## this loops over the input depth information and appends the dictionary with 
## a key,value as genome position, depth of coverage
coverage = open("/home/sbrimer/Desktop/Columbia ST/1819_1/coverage.txt","r")
for line in coverage:
    coverages = line.split("\t")
    coverageDict[coverages[1]] = coverages[2]
## this should read in the sequence file as an oblect, change it to a mutable
## object, then anywhere the coverageDict value = 0. Replace that nt with "N"
missing = {index for index,value in coverageDict.items() if value == 0}
def filter_coverage(index,value):
    return 'N' if index in missing else value
newSeqRec = []
with open("newfile.fasta","w") as handle:
    for seq_record in SeqIO.parse("Salmonella enterica subsp.fasta","fasta"):
        refseq = seq_record.seq
        newSeq = "".join(filter_coverage(index,value) for index,value in enumerate(refseq.tomutable(), start=1))
        newSeqRec = SeqRecord(Seq(newSeq),id ="new_id", description = str(seq_record.description))
    SeqIO.write(newSeqRec, handle, "fasta")

Biopython mailing list  -  Biopython <at> mailman.open-bio.org
Lluís Revilla | 15 Mar 14:45 2016

[Biopython] PSI-BLAST


I am trying to perform online a PSI-BLAST. In the tutorial there isn't any example so looking on the help I found what I thought it was the way:

record = SeqIO.read("protein.fasta", format="fasta")
result_handle = NCBIWWW.qblast('blastp', 'nr', record.format("fasta"),
blast_record = NCBIXML.read(result_handle)

However it returns a normal Blast record. But the object I get is not the "PSIBlast record " described on the tutorial with information about. I haven't found the way to set the number of round of the PSI-BLAST (neither in the NCBI help at http://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.html ). 

How can I do a PSI-BLAST? 

Many thanks,

Biopython mailing list  -  Biopython <at> mailman.open-bio.org