command to summarize a cluster of entries in a tableParsing a text-file table and aggregating informationGet...

My Friend James

What exactly is Apple Cider

Is it right to use the ideas of non-winning designers in a design contest?

What is the justification for Dirac's large numbers hypothesis?

How can electricity be positive when electrons are negative?

Infinitely many primes

Fantasy Military Arms and Armor: the Dwarven Grand Armory

SQL Always On COPY ONLY backups - what's the point if I cant restore the AG from these backups?

How to create large inductors (1H) for audio use?

Why did Boris Johnson call for new elections?

Why are some hotels asking you to book through Booking.com instead of matching the price at the front desk?

Are there mathematical concepts that exist in the fourth dimension, but not in the third dimension?

What's in a druid's grove?

Could this estimate of the size and mass of the Chicxulub Impactor be accurate?

Balm of the Summer Court fey energy dice usage limits

What are some countries where you can be imprisoned for reading or owning a Bible?

What is the purpose of the rotating plate in front of the lock?

Why did Tony's Arc Reactor do this?

Why does the seven segment display have decimal point at the right?

Old sci fi book, addictive soft drinks

How can I hint that my character isn't real?

What are the map units that WGS84 uses?

If I have an accident, should I file a claim with my car insurance company?

Euro sign in table with siunitx



command to summarize a cluster of entries in a table


Parsing a text-file table and aggregating informationGet row data for non-matching column valuesawk script to rearrange similar rowsSelect every two rows if they begin with the same nameremove duplicate entries in one column and linearize the values in multiple rows to a single rowReplace each unique value in all columns with a unique identifiercompute sum up each 2 rows and replace them with another value if the sum is less than a specific valueconditional replacement of rows with a numberMerge multiple CSV files with partially matching key columnReplace block of text with sed, awk, perl or vim






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-1















I have a table that shows how many ASVs(columns) are clustered in one OTU(rows). Each ASV is represented by a value of 1.



#OTUID    ASV_1    ASV_2    ASV_3    ASV_4    ASV_5    ASV_6    ASV_7    ASV_8    ASV_9    ASV_10
OTU1 1 0 0 1 0 0 0 0 0 1
OTU2 0 1 0 0 1 0 0 0 0 0
OTU3 0 0 0 0 0 1 0 1 1 0


I want to summarize the table to the following;



#OTUID    ASVs
OTU1 ASV_1, ASV_4, ASV_10
OTU2 ASV_2, ASV_5
OTU3 ASV_6, ASV_8, ASV_9


kindly help.










share|improve this question

































    -1















    I have a table that shows how many ASVs(columns) are clustered in one OTU(rows). Each ASV is represented by a value of 1.



    #OTUID    ASV_1    ASV_2    ASV_3    ASV_4    ASV_5    ASV_6    ASV_7    ASV_8    ASV_9    ASV_10
    OTU1 1 0 0 1 0 0 0 0 0 1
    OTU2 0 1 0 0 1 0 0 0 0 0
    OTU3 0 0 0 0 0 1 0 1 1 0


    I want to summarize the table to the following;



    #OTUID    ASVs
    OTU1 ASV_1, ASV_4, ASV_10
    OTU2 ASV_2, ASV_5
    OTU3 ASV_6, ASV_8, ASV_9


    kindly help.










    share|improve this question





























      -1












      -1








      -1








      I have a table that shows how many ASVs(columns) are clustered in one OTU(rows). Each ASV is represented by a value of 1.



      #OTUID    ASV_1    ASV_2    ASV_3    ASV_4    ASV_5    ASV_6    ASV_7    ASV_8    ASV_9    ASV_10
      OTU1 1 0 0 1 0 0 0 0 0 1
      OTU2 0 1 0 0 1 0 0 0 0 0
      OTU3 0 0 0 0 0 1 0 1 1 0


      I want to summarize the table to the following;



      #OTUID    ASVs
      OTU1 ASV_1, ASV_4, ASV_10
      OTU2 ASV_2, ASV_5
      OTU3 ASV_6, ASV_8, ASV_9


      kindly help.










      share|improve this question
















      I have a table that shows how many ASVs(columns) are clustered in one OTU(rows). Each ASV is represented by a value of 1.



      #OTUID    ASV_1    ASV_2    ASV_3    ASV_4    ASV_5    ASV_6    ASV_7    ASV_8    ASV_9    ASV_10
      OTU1 1 0 0 1 0 0 0 0 0 1
      OTU2 0 1 0 0 1 0 0 0 0 0
      OTU3 0 0 0 0 0 1 0 1 1 0


      I want to summarize the table to the following;



      #OTUID    ASVs
      OTU1 ASV_1, ASV_4, ASV_10
      OTU2 ASV_2, ASV_5
      OTU3 ASV_6, ASV_8, ASV_9


      kindly help.







      linux bash perl






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 35 mins ago







      alex kiarie

















      asked 59 mins ago









      alex kiariealex kiarie

      275 bronze badges




      275 bronze badges

























          0






          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });















          draft saved

          draft discarded
















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f539295%2fcommand-to-summarize-a-cluster-of-entries-in-a-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

















          draft saved

          draft discarded



















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f539295%2fcommand-to-summarize-a-cluster-of-entries-in-a-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...