Hi guys,
Can you help me in solving ths problem?
I have two files file1 and file2 as following:
===FILE1====
>LOC21
MASSKFCTVLSLALFLVLLTHANSAELFSFNFQTFNAANLILQGNASVSSSGQLRLTEVKSNGEPKVASL
VASFATAFTFNILAPILSNSADGLAFALVPVGSQPKFNGGFLGLFQNVTYDP
>LOC05
MASSKFSTVLSLALFLVLLTHANSAELFSFNFQTFNAANLILQGNASVSSSGQLRLTEVKSNGEPKVASL
GRAFYSAPIQIWDSTTGKVASFATAFTFNILAPILSNSADGLAFALVPVGSQPKFNGGFLGLFQNVTYDP
AKVLITYDSSTKLLVASLVYPSGS
>LOC48
MASLQTQMISFYAIFLSILLTTILFFKVNSTGEITSFSIPKFRPDQPNLIFQGGGYTTKEKLTLTKAVK
====FILE2====
LOC21
LOC48
I want to write the complete record form FILE1 (which starts from '>' sign) which matches the pattern in FILE2 into a new file FILE3 which shold look like -
>LOC21
MASSKFCTVLSLALFLVLLTHANSAELFSFNFQTFNAANLILQGNASVSSSGQLRLTEVKSNGEPKVASL
VASFATAFTFNILAPILSNSADGLAFALVPVGSQPKFNGGFLGLFQNVTYDP
>LOC48
MASLQTQMISFYAIFLSILLTTILFFKVNSTGEITSFSIPKFRPDQPNLIFQGGGYTTKEKLTLTKAVK
your help is highly appretiated
Thanks