Entering edit mode
7.1 years ago
bk11
★
3.0k
Hi I have two files,
File1
Chr1 NC_029516.1 19961 - LRRC16B
Chr1 NC_029516.1 23408 - LOC107314597
Chr1 NC_029516.1 31174 + LOC107305688
Chr1 NC_029516.1 156107 - ACR
Chr1 NC_029516.1 193750 + LOC107319936
Chr1 NC_029516.1 457876 + SHANK3
Chr1 NC_029516.1 549801 - DENND6B
Chr1 NC_029516.1 575842 - LOC107323953
File2
Chr1 NC_029516.1 967 5379 - RNF212B
Chr1 NC_029516.1 5341 19961 - LRRC16B
Chr1 NC_029516.1 20428 23408 - LOC107314597
Chr1 NC_029516.1 23722 31174 + LOC107305688
Chr1 NC_029516.1 34904 43887 - LOC107312337
Chr1 NC_029516.1 49744 56456 - LOC107317046
Chr1 NC_029516.1 57601 93908 + GOLGB1
I want to get result like this in File3
Chr1 NC_029516.1 5341 19961 - LRRC16B
Chr1 NC_029516.1 20428 23408 - LOC107314597
Chr1 NC_029516.1 23722 31174 + LOC107305688
Hi Kevin, It worked! I am new to awk. Could you please explain how this code works? Thanks.
Hi!
You could also do it by matching the gene names.