I can not seem to figure out how to update the attached match.txt column 2 using update.txt. However, only the text before the period in updat.txt appears in match.txt.
For example, in update.txt NM_001613.2 matches NM_001613 in match.txt, so is it possible to update the record in match.txt to NM_001613.2? Thanks.
Sorry, I attached the input (update.txt) and the file match.txt (file to use to match the NM_). The desired output would be the match.txt updated with the new NM_.
So, NM_001613 belongs to the gene ACTA2 and after updating it would be NM_001613.2 with all the text in match.txt. Thank you.
You forgot to post the output you wanted... Right now your request is ambiguous. Show at least a line from each that causes a match to be changed and the resulting output you want please!
I have no output as I can not write a script that works.
In update.txt the gene ACTA2 is NM_001613
and that # is in match.txt but can it be updated to NM_001613.2? (which is the full # in update.txt). Thanks.
So, basically look for NM_001613 in match.txt and when it is found update it to NM_001613.2. Does this help? Thanks.