Depends on what you're trying to do. OK, you appear to be searching for 20mers against a virus library. Is the purpose to identify how often a given 20mer comes up in the library? To see if the 20mer is unique in a given sequence? To see if the 20mer is represented at all in the library? To map the position of 20mer hits to features within the library? Answers depend upon the purpose.

I suggest that you go to the Pasteur web site that provides BioPerl training and have a look at the examples they give around doing Blast - it has several very good examples on how to do this with variations on the parameters. I agree that BioPerl can be a bit of a beast at the beginning but I happen to like it. The alternative is try out a copy of the Tisdall book

Another question - given that you're looking for 20mers, is BLAST even the best tool to be using for this exercise? You're going to end up with many hits (they're 20mers after all and they're everywhere) and many HSPs based upon each individual hit and your e-values are going to be crap.

Given this would you maybe be better in taking your library of sequences, walking down it 20 bases at a time and scoring each 20mer pattern as you observe it? This is more by way of a regex approach to the problem. Each 20mer is represented as a key in a hash and you simply increment by one every time you get a new pattern occurring.

If you're trying something more ambitious, you'll need to provide more information.

MadraghRua
yet another biologist hacking perl....


In reply to Re: Parsing BLAST by MadraghRua
in thread Parsing BLAST by cumurph

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.