[Biopython-dev] Bio.Wise

Michiel de Hoon mdehoon at c2b2.columbia.edu
Sun Aug 12 14:18:25 UTC 2007


Thank you for your explanation. It makes sense now.
I have uploaded a modified version of Bio.Wise.__init__.py to CVS. 
Please let me know if there are any changes you don't agree with.

Thanks again,

--Michiel.

Michael Hoffman wrote:
> [Michiel De Hoon]
> 
>> # In Bio.Wise.__init__.py:
>> from Bio.SeqIO.FASTA import FastaReader, FastaWriter
>>
>> The FastaReader, FastaWriter functions are used as follows:
>>
>>        for filename, input_file in zip(pair, input_files):
>>            input_file.close()
>>            FastaWriter(file(input_file.name,
>> "w")).write(FastaReader(file(filename)).next())
>>
>> To me, it looks like all this does is to read one Fasta record from 
>> filename,
>> and then store it in input_file.
> 
> I believe this was done to smooth out troublesome Fasta files because
> the Biopython parser was more versatile than that in
> Wise2. Specifically, there was a maximum line length restriction in
> Wise2. Piping this through a Biopython read/write pairing ensures that
> all the lines are short enough to be read in.
> 
>> I am asking since the current code in Bio.Wise does not seem to be
>> handling temporary files correctly, and it'll be easier to fix it if
>> we don't have to consider both poly.NamedTemporaryFile and
>> tempfile.NamedTemporaryFile.
> 
> If it makes things easier for you, please do it by all means.




More information about the Biopython-dev mailing list