Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Hello Monks!!

I am trying to read in a qual file and put it directly into a hash so that I can access the quality string via id. However, for some odd reason, I cannot get it to work. I am reading in fasta files and assigning them to hashes with no problem, but I cannot seem to get the quality file to work. Any suggestions? Below is my code and what my qual data looks like


$qual_obj = Bio::SeqIO->new(-file => "/home/Alan/Desktop/sequence_data +/$qual_file", -format => "qual"); my %qual_hash = (); while($qual_hash = $qual_obj->_next_qual){ $qual_hash{$qual_obj->id} = $qual_obj->seq; }

>FQ4HLCS01B2SNT rank=0025082 x=734.0 y=3335.0 length=53 37 37 37 37 37 37 37 37 37 37 37 40 40 40 40 40 40 40 40 40 40 40 40 4 +0 40 40 40 40 40 40 40 40 40 40 40 38 38 35 33 32 32 27 27 15 13 13 1 +3 11 14 11 17 17 17 >FQ4HLCS01BGPRG rank=0042480 x=483.0 y=1242.5 length=108 37 37 37 37 37 37 37 37 37 37 37 40 40 40 40 40 40 40 40 40 40 40 40 4 +0 40 40 40 40 40 40 40 40 40 40 40 40 39 39 39 39 39 39 39 39 39 39 3 +9 39 39 39 40 40 37 37 37 37 37 37 35 33 32 27 23 19 17 17 19 19 11 11 11 11 14 22 14 21 25 24 25 25 29 30 30 2 +8 28 28 28 28 28 16 16 11 11 11 11 11 17 16 12 12 17 16 18 17 22 16 1 +2 13 >FQ4HLCS01AY14Q rank=0050917 x=282.0 y=760.0 length=314 29 29 18 14 14 14 14 14 27 30 28 17 19 19 19 31 35 37 30 31 31 37 39 4 +0 40 40 40 40 40 40 40 40 40 40 40 39 39 39 40 40 40 40 40 40 40 40 3 +9 38 37 37 37 37 37 25 25 21 21 21 21 30 30 35 37 37 35 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 28 28 28 2 +8 37 37 37 37 30 30 23 23 23 32 37 37 37 37 37 37 37 37 37 37 37 37 3 +7 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 35 35 35 35 33 32 28 18 18 21 21 25 25 28 3 +3 33 33 32 32 32 33 33 33 30 25 25 21 21 21 25 25 32 32 35 37 37 37 3 +7 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 3 +7 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 3 +7 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 38 37 35 35 33 33 33 16 16 1 +7 17 17 27 11 19 19 22 21 21 23 23 23 23 23 24 23 19 23 27 27 19 19 1 +9 23 23 28 27 27 27 27 17 17 19 24 23 21 21 11 11 11 22 22 24 16 12 11 11 0 12 12

Let me know if you need any more info!! Thank you very much!!

In reply to Reading in Qual File Using Bio::SeqIO by twaddlac

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (7)
    As of 2014-12-21 06:28 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (104 votes), past polls