Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • semna
    Member
    • Apr 2010
    • 55

    question?

    Hi
    I have a file like this:

    XLOC_000001 q1:CUFF.307125|CUFF.307125.1|100|21.641774|12.337630|30.945918|15.184506|- -
    XLOC_000001 q1:CUFF.307127|CUFF.307127.1|100|19.024629|10.301183|27.748076|13.490323|360 q2:CUFF.582701|CUFF.582701.2|35|4.177976|0.000000|9.502142|2.742783|628
    XLOC_000002 q1:CUFF.307197|CUFF.307197.1|100|34.740054|22.951915|46.528193|22.054054|531 q2:CUFF.582841|CUFF.582841.1|100|67.322530|50.912469|83.732592|44.528017|608
    XLOC_000005 q1:CUFF.307391|CUFF.307391.1|100|2.815540|0.000000|6.171455|1.981276|- -
    XLOC_000007 q1:CUFF.307521|CUFF.307521.1|100|14.287217|6.727530|21.846904|10.184871|5318 q2:CUFF.583501|CUFF.583501.1|100|26.687891|16.355826|37.019955|18.473767|5806
    XLOC_000011 q1:CUFF.307645|CUFF.307645.1|100|18.041098|9.546136|26.536061|11.601081|- -
    XLOC_000389 - q2:CUFF.609345|CUFF.609345.1|100|18.703186|10.053750|27.352622|11.284938|-
    XLOC_000391 - q2:CUFF.609367|CUFF.609367.1|50|13.973619|7.097039|20.850198|9.437297|-
    XLOC_000392 - q2:CUFF.609367|CUFF.609367.2|39|10.916188|4.557339|17.275037|7.372414|-
    I need to save those rows that has q1 or q2.(leave out those rows that contain both q1 and q2)
    Anyone can help me? Thanks in advance
  • semna
    Member
    • Apr 2010
    • 55

    #2
    Maybe it is not clear in my post .This table contains 3 columns.Thanks

    Comment

    • semna
      Member
      • Apr 2010
      • 55

      #3
      XLOC_000001 q1:CUFF.307125|CUFF.307125.1|100|21.641774|12.337630|30.945918|15.184506|- -
      XLOC_000001 q1:CUFF.307127|CUFF.307127.1|100|19.024629|10.301183|27.748076|13.490323|360 q2:CUFF.582701|CUFF.582701.2|35|4.177976|0.000000|9.502142|2.742783|628
      XLOC_000002 q1:CUFF.307197|CUFF.307197.1|100|34.740054|22.951915|46.528193|22.054054|531 q2:CUFF.582841|CUFF.582841.1|100|67.322530|50.912469|83.732592|44.528017|608
      XLOC_000005 q1:CUFF.307391|CUFF.307391.1|100|2.815540|0.000000|6.171455|1.981276|- -
      XLOC_000007 q1:CUFF.307521|CUFF.307521.1|100|14.287217|6.727530|21.846904|10.184871|5318 q2:CUFF.583501|CUFF.583501.1|100|26.687891|16.355826|37.019955|18.473767|5806
      XLOC_000011 q1:CUFF.307645|CUFF.307645.1|100|18.041098|9.546136|26.536061|11.601081|- -
      XLOC_000389 - q2:CUFF.609345|CUFF.609345.1|100|18.703186|10.053750|27.352622|11.284938|-
      XLOC_000391 - q2:CUFF.609367|CUFF.609367.1|50|13.973619|7.097039|20.850198|9.437297|-
      XLOC_000392 - q2:CUFF.609367|CUFF.609367.2|39|10.916188|4.557339|17.275037|7.372414|-

      Comment

      • severin
        Genome Informatics Facility
        • Sep 2009
        • 105

        #4
        grep -v

        you can use command lines to do this. egrep -v means do not include files with this pattern.

        more filename | egrep q1 | egrep -v q2
        more filename | egrep q2 | egrep -v q1

        to get those that contain both try this

        more filename | egrep q1 | egrep q2

        Comment

        • semna
          Member
          • Apr 2010
          • 55

          #5
          Hi Severin,
          Thanks for your help. it works.

          Comment

          • Bruins
            Member
            • Feb 2010
            • 78

            #6
            also, in a post like yours you can make the table more readable by using a code block (the tiny # sign in the message editor)

            like so
            Code:
            XLOC_000001 q1:CUFF.307125|CUFF.307125.1|100|21.641774|12.3376 30|30.945918|15.184506|- -
            XLOC_000001 q1:CUFF.307127|CUFF.307127.1|100|19.024629|10.3011 83|27.748076|13.490323|360 q2:CUFF.582701|CUFF.582701.2|35|4.177976|0.000000| 9.502142|2.742783|628
            XLOC_000002 q1:CUFF.307197|CUFF.307197.1|100|34.740054|22.9519 15|46.528193|22.054054|531 q2:CUFF.582841|CUFF.582841.1|100|67.322530|50.9124 69|83.732592|44.528017|608
            XLOC_000005 q1:CUFF.307391|CUFF.307391.1|100|2.815540|0.000000 |6.171455|1.981276|- -
            XLOC_000007 q1:CUFF.307521|CUFF.307521.1|100|14.287217|6.72753 0|21.846904|10.184871|5318 q2:CUFF.583501|CUFF.583501.1|100|26.687891|16.3558 26|37.019955|18.473767|5806
            XLOC_000011 q1:CUFF.307645|CUFF.307645.1|100|18.041098|9.54613 6|26.536061|11.601081|- -
            XLOC_000389 - q2:CUFF.609345|CUFF.609345.1|100|18.703186|10.0537 50|27.352622|11.284938|-
            XLOC_000391 - q2:CUFF.609367|CUFF.609367.1|50|13.973619|7.097039 |20.850198|9.437297|-
            XLOC_000392 - q2:CUFF.609367|CUFF.609367.2|39|10.916188|4.557339 |17.275037|7.372414|-

            Comment

            • severin
              Genome Informatics Facility
              • Sep 2009
              • 105

              #7
              cool, How does one use block code?

              Comment

              • Bruins
                Member
                • Feb 2010
                • 78

                #8
                Hi,

                When you click 'post reply' an editor opens in which you type your message. It should have a toolbar directly above it with some buttons to change the font, or make bold or italic or underline etc. When you hover your mouse over such a button it should give a tooltip that explains the button. Anyway, it's the '#' button on the right. It prints CODE tags. You can type between the tags, and that text will be displayed in the code block using a monospace font. You can play with it using the 'Preview post' button instead of submit.

                Cheers!

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                  by SEQadmin2



                  Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                  There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                  Today, 05:17 AM
                • GATTACAT
                  Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by GATTACAT
                  Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                  07-01-2026, 11:43 AM
                • SEQadmin2
                  Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by SEQadmin2


                  I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                  Here are nine questions we think about, in roughly the order they matter, before...
                  06-18-2026, 07:11 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Today, 10:08 AM
                0 responses
                6 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, Yesterday, 11:05 AM
                0 responses
                8 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-02-2026, 11:08 AM
                0 responses
                31 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-30-2026, 05:37 AM
                0 responses
                29 views
                0 reactions
                Last Post SEQadmin2  
                Working...