I'm a massive newbie to the whole Linux scene but am enjoying the flexibility offered so far.
However, I have searched for a while and cannot work out how to tackle this problem.
I basically have two files: file_1.txt and file_2.txt
file_1.txt contains a list of genes, with each line containing a new gene e.g.:
file_2.txt contains the original gene data in the following format:
Basically I want to search file_2.txt for all of the genes in file_1.txt. If found, I then want to put both the gene name (e.g. >CDS.002) AND the gene sequence (e.g. MALTLAGLEIEKTSGYWRAKGFKQPGILERLE) from file_2.txt into a new text file. I want all of the results in the final text file.
So, I'd end up with a text file similar to this:
Now I have no idea how complicated this is for someone that knows their stuff! But for me, it's a little over my head at this stage. I'm very new to using the Terminal, and am only just starting out learning Perl.
Any assistance would be greeted with a thousand thanks
Thanks for any help!