My problem is that I want to retrieve the sequences line + secondary structure line that match the protein names from the header.txt
file:
The text file(header.txt
) contains the protein names that look like this:
1XXIJ
1P0EA
1H9HI
And the other file(pdb.txt
) structured like this:
Line 1:the protein name
Line 2: protein length
Line 3: amino acid sequence
Line 4: secondary structure
Line 5: empty
4LGTD
247
M S E K L Q K V L A R
. . E E H H H H H H H
1XXIJ
334
M R W Y P W L R P D F
. . . . T T H H H H H
6U02G
116
E V Q L V E S G G G L
. . E E E E E . . E E
1P0EA
363
R P R F S F S I A A R
. . S E E E E E E E E
1H9HI
30
G C P R I L I R C K Q
. E E . . . . B S S
So my expected output is:
1XXIJ
334
M R W Y P W L R P D F
. . . . T T H H H H H
1P0EA
363
R P R F S F S I A A R
. . S E E E E E E E E
1H9HI
30
G C P R I L I R C K Q
. E E . . . . B S S
Do you guys have any suggestions for me by awk or any(Linux)code? Please let me know if you require additional information. Cheers!