Seqanswers Leaderboard Ad

Collapse

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
      Exploring the Dynamics of the Tumor Microenvironment
      by seqadmin




      The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
      07-08-2024, 03:19 PM
    • seqadmin
      Exploring Human Diversity Through Large-Scale Omics
      by seqadmin


      In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
      06-25-2024, 06:43 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 07-10-2024, 07:30 AM
    0 responses
    26 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 07-03-2024, 09:45 AM
    0 responses
    201 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 07-03-2024, 08:54 AM
    0 responses
    212 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 07-02-2024, 03:00 PM
    0 responses
    193 views
    0 likes
    Last Post seqadmin  
    Working...
    X