How to extract 2 columns and sorting them numerically in descending order (fasta)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.



I've tried:



awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1



yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?










share|improve this question







New contributor




Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.



    I've tried:



    awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1



    yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?










    share|improve this question







    New contributor




    Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.



      I've tried:



      awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1



      yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?










      share|improve this question







      New contributor




      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.



      I've tried:



      awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1



      yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?







      sort






      share|improve this question







      New contributor




      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 12 mins ago









      Gurkamal Deol

      1




      1




      New contributor




      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474726%2fhow-to-extract-2-columns-and-sorting-them-numerically-in-descending-order-fasta%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.












          Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.











          Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474726%2fhow-to-extract-2-columns-and-sorting-them-numerically-in-descending-order-fasta%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay