[Biopython] Help modify this code so it can do what I want it to do

Peter Cock p.j.a.cock at googlemail.com
Mon Feb 3 20:14:04 UTC 2014


On Monday, February 3, 2014, Edson Ishengoma <ishengomae at nm-aist.ac.tz>
wrote:

> Hi Peter,
>
> Sorry that was the typo, it should be:
> complete_sbjct_seq += str(sbjct[sb_start:sb_end]).
>
> I tried a suggestion by Ivan on the providing tblastn option
> [-max_hsps_per_subject 1] but still the output shows up as fragmented hits.
>
> Peter said: "Another approach would be to use the alignment sequence
> fragments BLAST gives you (and remove the gap characters)."
> With the script I have I can only extract the first fragment only for each
> hit. I don't know why string slicing method [sb_start:sb_end] in my script
> does not include start and end positions for subsequent fragments.
>
> Regards,
>
> Edson
>

Hi Edson,

Emails can mess up Python indentation, so posting the file online might
show something silly we've missed - I find http://gist.github.com works
well for this.

It would also help if you could share a sample BLAST output file where the
script is failing, as then people on the list could recreate your problem
on their own computer, which is often the first step in solving it.

Peter



More information about the Biopython mailing list