Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zillur
    Senior Member
    • Sep 2014
    • 106

    #1

    Convert intiger into ascii character in a .qual file

    Hi there,
    I have a quality file like this:
    Code:
    >M00365:7:000000000-A48JK:1:1101:14885:1320
    32 32 32 32 32 37 37 31 33 33 33 33 38 38 38 38 34 36 32 37 36 37 36 36 36 36 38 35 37 38 38 39 38 38 36 30 32 32 37 39 37 36 36 34 36 38 38 34 36 36 37 37 37 39 36 36 38 36 30 38
    >M00365:7:000000000-A48JK:1:1101:16088:1320
    33 33 32 32 33 37 37 37 37 37 37 37 38 38 38 17 36 36 37 37 38 38 38 38 38 38 38 39 33 34 38 38 36 36 36 36 36 38 39 39 39 37 37 38 37 38 38 39 37 38 34 36 30 36 36 36 38 38 35
    truncated for convenience. I want to convert them into:
    Code:
    >M00365:7:000000000-A48JK:1:1101:14885:1320
    HIKALUIKJHKHKHUIKJHHIJHGFUIYDFHKKIJGHJKIIIII...............and so on.....
    >M00365:7:000000000-A48JK:1:1101:16088:1320
    IKJHGFRFIKJGDHKBFRTJJKH........and so on.......
    Any suggestion? I also want them sort according to header.

    Thanks in advance for your comments.

    Best Regards
    Zillur
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    use awk:

    Code:
       awk '/^>/ {print;next;} {for(i=0;i<NF;++i) printf("%c",33+int($i));printf("\n");}'
    I don't know your endoding. I just put +33. However, your example is strange, if a quality starts with

    Code:
    32 32 32 32 32  ....
    then the translated qualities should be the same isn't it ?

    Comment

    • zillur
      Senior Member
      • Sep 2014
      • 106

      #3
      Thank you very much. That exactly what I wanted.
      Code:
      >M00365:7:000000000-A48JK:1:1101:14885:1320
      AAAAAAFF@BBBBGGGGCEAFEFEEEEGDFGGHGGE?AAFHFEECEGGCEEFFFHEEGE?
      FFGEGGHG/>EEEHHHHHGHHHHHHFHGGGGHEGHHHHHHGHFDHGHHHHHHFFFHH2FD
      FFFHFHBDDG?DCHHFFGHHGGGCGFHHGHH
      >M00365:7:000000000-A48JK:1:1101:16088:1320
      BBBAABFFFFFFFGGG2EEFFGGGGGGGHBCGGEEEEEGHHHFFGFGGHFGCE?EEEGGD
      EEFFFGFEE>>FGHHHHHHHFGHHHHHHGEGGGHHHHHGCGGGHHHGHHHGHHHHHFHCH
      GGGGHGEAEDCEGH0<<D<GAGHGHCGGHGF
      Thanks again.

      Best Regards
      Zillur

      Comment

      • zillur
        Senior Member
        • Sep 2014
        • 106

        #4
        Thanks again. How can sort the file according to header?

        Best Regards
        Zillur

        Comment

        Latest Articles

        Collapse

        • kinpict.com
          Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by kinpict.com
          The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
          Today, 06:37 PM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        28 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        35 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-03-2026, 11:54 AM
        2 responses
        56 views
        0 reactions
        Last Post kinpict.com  
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        175 views
        0 reactions
        Last Post SEQadmin2  
        Working...