Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • morning latte
    Member
    • Jun 2013
    • 91

    Command for vlookup function

    Hello experts,

    I have large text files that need to be arranged using a function like excel's vlookup. I have been playing with awk command but didn't really come up with a solution. Could anyone please help me out? Below are my datasets and expected output. Any help would be greatly appreciated.

    <File 1>
    contig-100_1 5
    contig-100_30 10
    contig-100_50 20
    contig-100_40 15
    contig-100_60 25

    <File 2>
    contig-100_1 "Bacteria"
    contig-100_50 "Bacteria A"
    contig-100_60 "Bacteria A, Fungi B"

    <Expected output>
    contig-100_1 5 Bacteria
    contig-100_30 10 NA
    contig-100_50 20 Bacteria A
    contig-100_40 15 NA
    contig-100_60 25 Bacteria A, Fungi B
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    you're looking for the 'join' command : http://linux.die.net/man/1/join

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Pathogen Surveillance with Advanced Genomic Tools
      by seqadmin




      The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
      Yesterday, 11:48 AM
    • seqadmin
      New Genomics Tools and Methods Shared at AGBT 2025
      by seqadmin


      This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

      The Headliner
      The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
      03-03-2025, 01:39 PM
    • seqadmin
      Investigating the Gut Microbiome Through Diet and Spatial Biology
      by seqadmin




      The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
      02-24-2025, 06:31 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 03-20-2025, 05:03 AM
    0 responses
    34 views
    0 reactions
    Last Post seqadmin  
    Started by seqadmin, 03-19-2025, 07:27 AM
    0 responses
    42 views
    0 reactions
    Last Post seqadmin  
    Started by seqadmin, 03-18-2025, 12:50 PM
    0 responses
    35 views
    0 reactions
    Last Post seqadmin  
    Started by seqadmin, 03-03-2025, 01:15 PM
    0 responses
    190 views
    0 reactions
    Last Post seqadmin  
    Working...