Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

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

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Advanced Methods for the Detection of Infectious Disease
      by seqadmin




      The recent pandemic caused worldwide health, economic, and social disruptions with its reverberations still felt today. A key takeaway from this event is the need for accurate and accessible tools for detecting and tracking infectious diseases. Timely identification is essential for early intervention, managing outbreaks, and preventing their spread. This article reviews several valuable tools employed in the detection and surveillance of infectious diseases.
      ...
      11-27-2023, 01:15 PM
    • seqadmin
      Strategies for Investigating the Microbiome
      by seqadmin




      Microbiome research has led to the discovery of important connections to human and environmental health. Sequencing has become a core investigational tool in microbiome research, a subject that we covered during a recent webinar. Our expert speakers shared a number of advancements including improved experimental workflows, research involving transmission dynamics, and invaluable analysis resources. This article recaps their informative presentations, offering insights...
      11-09-2023, 07:02 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 08:26 AM
    0 responses
    11 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, Yesterday, 08:12 AM
    0 responses
    12 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 11-27-2023, 08:12 AM
    0 responses
    19 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 11-22-2023, 09:29 AM
    1 response
    60 views
    0 likes
    Last Post VilliamPast  
    Working...
    X