I am very new to this field.I have two file (few lines of files are given below), first one is tab delimited text file contains contig numbers and respective annotations given in the same line . second file i am having contains only ids. I need to fetch annotations from the first file for the ids present in second file.May you please provide with a perl script.
first file:-
contig06610 Q9SQV1 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig07217 B0S733 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig08155 O13828 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig10605 O01510 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig12296 Q9FJR0 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
second file:-
contig07217
contig07217
contig10605
contig12296
first file:-
contig06610 Q9SQV1 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig07217 B0S733 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig08155 O13828 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig10605 O01510 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
contig12296 Q9FJR0 GO:0000184 GO:0006139 GO:0006139 nucleobase, nucleoside, nucleotideandnucleicacidmetabolicprocess biological_process
second file:-
contig07217
contig07217
contig10605
contig12296
Comment