You can loop through the second file and keep grep
ing each line in the first file.
Like this, for example:
while read line
do
grep -wF "$line" f1
done < f2
Explanation
grep -w
matches full words.grep -F
matches fixed strings, so no regex.
Test
$ while read line; do grep "$line" f1; done < f2
rs1333026 0.000 0.000 0.000 1.000 0.000 1.000 0.000 0.000 0.000 1.000 0.000
rs11847697 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000
rs4771122 1.983 0.998 1.998 1.990 0.998 0.988 1.000 1.984 0.001 1.998 1.996
rs10150332 1.000 0.000 1.000 0.000 1.000 0.000 1.000 1.000 0.975 0.000 1.000