Я ищу команду bash, чтобы удалить часть текста, если текст после ">"
присутствует в file1
и file2
.
Вот пример
File1:
CUI02270
CUI02272
CUI02271
CUI02290
CUI02289
CUI022799
File2:
>CUI02270 |hypothetical protein pCPXV0248[Cowpox virus]
MGTVFVPYLLVKLALRVLVISNGYCHVPLKYIVLMIAHRVLLSSIVESTTLDIPDLRSTM
ELILLTASRLKFNLYRPNL
>CUI02271 |CPXV043 protein[Cowpox virus]
MLAFCYSLPNVGDVLKGKVYENGYALYIDLFDYPHSEAILAESVQMHMNRYFKYRDKLVG
KTVKVKVIRVDYTKGYIDVNYKRMCKHQ
>CUI02272 |hypothetical protein pCPXV0245[Cowpox virus]
MFTHPFVIDIYISFCIINSNHFNFYSFPYQFIPIFKISIHMHLNTLCQDSFRVRIVKKIN
V
>CUI02273 |CPXV044 protein[Cowpox virus]
MNPDNTIAVITETIPIGMQFDKVYLSTFNVWREILSNTTKTLDISSFYWSLLDEVGTNFG
TTILNEIVQLPKRGVRVRVAVNKSNKPLKDVETLQMAGVEVRYIDITNILGGVLHTKFWI
SDNTHIYLGSANMDWRSLTQVKELGIAIFNNRNLAADLTQIFEVYWYLGVNNLPYNWKNF
YPAYYNTDHPLSMNVSGVPHSVFIASAPQQLCTMERTNDLTALLSCIGNASKFVYVSVMN
FIPIIYSKAGNILFWPYIEDELRRTAIDRKVSVKLLISCWQRSSFIMRNFLRSIAMLKSK
NIDIEVKLFIVPDTDPPIPYSRVNHAKYMVTDKTAYIGTSNWTGNYFTDTCGTSINITPD
DGLGLRQQLEDIFMRDWNSKYSYELYDTSPTKRCRLLKNMKQCTNDIYSDEIQPEKEIPE
YSLE
>CUI02274 |CPXV045 protein[Cowpox virus]
MSANCMFNLDNDYIYCKYWKPITYPKALVFISHGAGEHSGRYDELAENISSLGILVFSHD
HIGHGRSNGEKMMIDDFGTYVRDVVQHVVTIKSTYPGVPVFLLGHSMGATISILAAYENP
NLFTAMILMSPLVNAEAVPRLNLLAAKLMGAITPNAPVGKLCPESVSRDMDEVYKYQYDP
LVNHEKIKAGFASQVLKATNKVRKIIPKINTPSLILQGTNNEISDVSGAYYFMQHANCNR
EIKIYEGAKHHLHKETDEVKKSVMKEIETWIFNRVK
>CUI022799 |CPXV046 protein[Cowpox virus]
MATKSDYEDAVFYFVDDDEICSRDSIIDLIDEYITWRNHVIVFNKDITSCGRLYKELMKF
DDAAIRYYGIDKINEIVEAMSEGDHYINLTEVHDQESLFATIGICAKITEHWGYKKISES
RFQSLGNITDLMTDDNINILILFLEKKLN
>CUI02276 |hypothetical protein pCPXV0240[Cowpox virus]
MDFCKIDVVVSFAHSLDNLINFINTIVPYSSIIELHQFLVESSTTGNIFVKHYNMISPRD
IFIY
чем у меня должен быть новый file3
, такой как:
>CUI02273 |CPXV044 protein[Cowpox virus]
MNPDNTIAVITETIPIGMQFDKVYLSTFNVWREILSNTTKTLDISSFYWSLLDEVGTNFG
TTILNEIVQLPKRGVRVRVAVNKSNKPLKDVETLQMAGVEVRYIDITNILGGVLHTKFWI
SDNTHIYLGSANMDWRSLTQVKELGIAIFNNRNLAADLTQIFEVYWYLGVNNLPYNWKNF
YPAYYNTDHPLSMNVSGVPHSVFIASAPQQLCTMERTNDLTALLSCIGNASKFVYVSVMN
FIPIIYSKAGNILFWPYIEDELRRTAIDRKVSVKLLISCWQRSSFIMRNFLRSIAMLKSK
NIDIEVKLFIVPDTDPPIPYSRVNHAKYMVTDKTAYIGTSNWTGNYFTDTCGTSINITPD
DGLGLRQQLEDIFMRDWNSKYSYELYDTSPTKRCRLLKNMKQCTNDIYSDEIQPEKEIPE
YSLE
>CUI02274 |CPXV045 protein[Cowpox virus]
MSANCMFNLDNDYIYCKYWKPITYPKALVFISHGAGEHSGRYDELAENISSLGILVFSHD
HIGHGRSNGEKMMIDDFGTYVRDVVQHVVTIKSTYPGVPVFLLGHSMGATISILAAYENP
NLFTAMILMSPLVNAEAVPRLNLLAAKLMGAITPNAPVGKLCPESVSRDMDEVYKYQYDP
LVNHEKIKAGFASQVLKATNKVRKIIPKINTPSLILQGTNNEISDVSGAYYFMQHANCNR
EIKIYEGAKHHLHKETDEVKKSVMKEIETWIFNRVK
>CUI02276 |hypothetical protein pCPXV0240[Cowpox virus]
MDFCKIDVVVSFAHSLDNLINFINTIVPYSSIIELHQFLVESSTTGNIFVKHYNMISPRD
IFIY
, где
CUI02270 ; CUI02272 ; CUI02271 ; CUI022799
были удалены, потому что там, где присутствует в обоих file 1 and 2
,
У кого-нибудь есть идеи?
Спасибо за вашу помощь.