I need the output by matching the first two columns from both files (Protein_ID Substitution)
NP_997239 T53R rs4274008 TOLERATED 1 2.84 15
NP_060668 V267M rs12137794 TOLERATED 0.23 1.69 75
NP_058515 P856A rs228697 TOLERATED 0.36 2.17 37
NP_001206 T55M rs2274327 TOLERATED 0.1 1.76 97
NP_006601 D371Y NA NA NA NA NA
NP_065831 A851V NA NA NA NA NA
So far this is what I got:
awk 'FNR == NR { h[$1] = 1; next } h[$1]' file1 file2 > output
but this matches only the first column and does not includes the non matching values.....
Thank you
Hi guys,
I need some help to come out with a solution . I have seven such files but I am showing only three for convenience.
filea
a5 20
a8 16
fileb
a3 42
a7 14
filec
a5 23
a3 07
The output file shoud contain the data in table form showing first field of... (7 Replies)
Hi All,
I have to match each row in file 1 with 1st row in file 2 and print the corresponding column from file2. I am trying to use an awk script to do this. For example
cat File1
X1
X3
X4
cat File2
ID X1 X2 X3 X4
A 1 6 2 1
B 2 7 3 3
C 3 8 4 1
D 4 9 1 1 (3 Replies)
I have two files... file1 and file2.
Where columns 1 and 2 of file1 match columns 1 and 2 of file2 I want to create a new file that is all file1 + columns 3 and 4 of file2
:b: Many thanks if you know how to do this.... :b:
file1
31-101 106 0 92
31-101 106 29 ... (2 Replies)
Normal grep is not working to get the output.
Sample Input:
newjob: abc
command name: a=b+c
newjob: bbc
command name: c=r+v
newjob:ddc
newjob:kkc
command name: c=l+g
newjob:mdc
newjob:ldc
newjob:kjc
command name: u=dl+g
newjob:lkdc
newjob:lksdc
command name: o=udl+g (6 Replies)
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns.
Like I have file A
1234,ABCD,23,JOHN,NJ,USA
2345,ABCD,24,SAM,NY,USA
5678,GHIJ,24,TOM,NY,USA
5678,WXYZ,27,MAT,NJ,USA
and file B
... (2 Replies)
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)