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

Edson Ishengoma ishengomae at nm-aist.ac.tz
Mon Feb 3 21:45:38 UTC 2014


Thanks Peter.

Here is a link to my script at
https://gist.github.com/EBIshengoma/efc4ad3e32427891931d

Also, please find attached the sample xml output.



On Mon, Feb 3, 2014 at 11:14 PM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

>
> 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
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sample_output.xml
Type: text/xml
Size: 12909 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biopython/attachments/20140204/d5442841/attachment-0002.xml>


More information about the Biopython mailing list