Hello all , Could you please help me about this? I have 2 tab delimited file, I want to compare them to find common Id between 2 file which has one or all of these report in 7 column of the second file “Luciferase reporter assay//qRT-PCR//Western blot” For instance :
1st file
hsa-miR-654-5p
hsa-miR-182-5p
2nd file
MIRT733442 hsa-miR-654-5p Homo sapiens RPS6KB1 6198 Homo sapiens PAR-CLIP
MIRT733429 hsa-miR-654-5p Homo sapiens EPSTI1 94240 Homo sapiens Luciferase reporter assay//qRT-PCR//Western blot
Out put
MIRT733429 hsa-miR-654-5p Homo sapiens EPSTI1 94240 Homo sapiens Luciferase reporter assay//qRT-PCR//Western blot
Thanks in advance
in bash shell with grep:
test1.txt - 1st file and test2.txt- 2nd file in OP and assuming that blot is common in all lines ending up with western blot and no other line has word blot in it.
with awk:
with join:
didn't see the second requirement in OP.
Thanks lessismore, you are a real biostars :)
In R
2nd file is a huge file and with grep -f test1.txt test2.txt > out.put , OP contain all data of test2.txt NOT common data of both files, how I can solve this problem ? for instance , out put file contain hsa-miR-99 but it's not available in test1.txt file
I already also tried with this command
but again out put file contain hsa-miR-99 !