[Biopython] problem with ClustalW wrapper in Bio.Align.Applications

Peter Cock p.j.a.cock at googlemail.com
Fri Sep 5 03:11:19 UTC 2014


On Fri, Sep 5, 2014 at 1:13 AM, Jakub Stanislaw Nowak
<jakub.nowak at ed.ac.uk> wrote:
> Hi biopython community,
>
> Many thanks for the help me with a previous problem. It turned to be vital
> and help me move forward.
> Unfortunately I have got another conundrum that I can't solve easily.
>
> I am trying to use clustalW command tool in biopython on following set of
> sequences
>
> {'pre-miR-344f':
> 'AGUCAGUCUCCUGGCUGGAGUCCAGCUCUAAGCUGGUUCCAGGCUCUAGCCAGGACCUGACUAC\n',
> 'pre-miR-9':
> 'UCUUUGGUUAUCUAGCUGUAUGAGUGGUGUGGAGUCUUCAUAAAGCUAGAUAACCGAAAGU\r\n',
> 'pre-miR-210':
> 'CCGGGGCAGUCCCUCCAGGCUCAGGACAGCCACUGCCCACCGCACACUGCGUUGCUCCGGACCCACUGUGCGUGUGACAGCGGCUGA'}
>

I am unsure what is wrong, but I would guess the problem is you are
making a FASTA file with a mix of Unix and Windows style new lines.
This could easily cause subtle errors in how the file gets parsed.

Later in the code you join the sequences with \n (CR), but note in the
above your sequences have a trailing \n (CR), \r\n (LF CR) and no
trailing whitespace. Try removing these from your "sequences" as
they should not be there.

Peter


More information about the Biopython mailing list