jh041 / msatcommander

Automatically exported from code.google.com/p/msatcommander
0 stars 0 forks source link

msatCommander.py SequenceIterator ImportError #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I haven't run it, but msatCommander.py has several odd things in it with
respect to Biopython.  I'm looking at:

http://code.google.com/p/msatcommander/source/browse/trunk/commandline/msatComma
nd.py

First of all, this doesn't work on any official Biopython release:

from Bio.SeqIO import SequenceIterator
...
for record in SequenceIterator(handle,"fasta"):
...

I would guess you should be using:

from Bio import SeqIO
...
for record in SeqIO.parse(handle,"fasta"):
...

Or, if you want a one line change:

from Bio.SeqIO import parse as SequenceIterator

I have not tested this.

Original issue reported on code.google.com by p.j.a.c...@googlemail.com on 4 Mar 2009 at 2:51

GoogleCodeExporter commented 8 years ago
Yep, sorry about that... the issue with SequenceIterator derived from older 
code (prior to biopython 1.43) from 
the CVS version of biopython.  Things were a little confused at the time, and 
the code reflects an intermediate 
state during the transition to SeqIO.

This has been updated in the trunk.  As you may notice (comparing the trunk of 
the commandline version to 
the trunk of the GUI, the commandline has fallen behind in terms of maintenance 
- i'll try to get some general 
cleanup done).

Thank you for your report and providing a fix.

Original comment by faircl...@gmail.com on 4 Mar 2009 at 5:33

GoogleCodeExporter commented 8 years ago
Also, if you are interested in maintaining/updating/contributing code (i,e. 
write access to SVN), please contact 
me via email (you can use my gmail address or brant at ucla dot edu).

cheers,
b

Original comment by faircl...@gmail.com on 4 Mar 2009 at 5:41

GoogleCodeExporter commented 8 years ago
That looks good :)

Thanks for the offer, but I think I have my hands full with Biopython and my 
day job.

Peter

Original comment by p.j.a.c...@googlemail.com on 5 Mar 2009 at 9:47

GoogleCodeExporter commented 8 years ago
Peter, 

right on - never hurts to ask!

my day job is trying to wipe the floor with me this week, so I know what you 
mean ; ).

take care,
b

Original comment by faircl...@gmail.com on 5 Mar 2009 at 4:06

GoogleCodeExporter commented 8 years ago
Peter,

If you are still following this issue... as mentioned previously, I have 
greatly cleaned up the code, moving most 
of the SSR locating bits to classes in seqsearch.py (within the commandline 
folder) which is an awkward name, 
at present, but I couldn't think of anything more apt.

I noticed the reference at biopython.org to which modules msatcommander uses.  
As of the moment, it still 
incorporates SeqIO as well as Seq from Bio.Seq (my new class takes a Seq 
instance) from the SeqRecord 
instance from SeqIO.  I was initially thinking of subclassing Seq, but have 
decided not to, for the moment, 
since it seemed redundant.

All-in-all, everything is much cleaner now, although several of the options for 
msatCommand.py still need 
work.  I'll be getting to those shortly before cleaning the GUI code (and 
making some major changes there, as 
well).

cheers,
b

Original comment by faircl...@gmail.com on 30 Mar 2009 at 1:57

GoogleCodeExporter commented 8 years ago
Sorry, no, I haven't been following your changes.

If you mean http://biopython.org/wiki/Publications then yes, for recent papers 
it
seemed like a nice idea to say which bits of Biopython were used (where known).

Are you on the Biopython mailing lists?  You might want to have a look at the 
new
Bio.Motif module which will be in Biopython 1.50, it *may* be relevant to you 
...

Peter

Original comment by p.j.a.c...@googlemail.com on 30 Mar 2009 at 9:09

GoogleCodeExporter commented 8 years ago
No worries - I was assuming that you were not, but I figured I would post a 
notice for you on the off chance 
that you were.

I am not on the mailing list at present, but I did search around for the 
Bio.Motif code.  I think that it is 
relevant, and I will likely include it (at some point) as an alternate method 
for accomplishing the same task 
but in a slightly different manner.

cheers,
b

Original comment by faircl...@gmail.com on 30 Mar 2009 at 4:57

GoogleCodeExporter commented 8 years ago

Original comment by faircl...@gmail.com on 24 Sep 2009 at 4:57