A change in requirements
The OP mentioned in the comments below that he'd like the ultimate solution to drop any lines where the 4th and 5th columns from file1 matched the 4th and 5th columns from file2.
For example, add this line to both file1 & file2:
s2/40 40 . S S 90 N=2 F=5;U=4
A single line addition to the original solution can address this particular change in the requirements.
if ((k in a) && (lc==$4) && (ld==$5)) next
New Example
ex2.awk:
BEGIN{} FNR==NR{ k=$1" "$2 a[k]=$4" "$5 b[k]=$0 c[k]=$4 d[k]=$5 next } { k=$1" "$2 lc=c[k] ld=d[k] if ((k in a) && (lc==$4) && (ld==$5)) next if ((k in a) && ($4==$5) && (lc==$4) || (ld==$5)) print b[k]" "$0 }
Rerunning the new awk script, ex2.awk:
$ awk -f ex2.awk file1 file2 | sed 's/[ ]\+/ /g' s2/90 60 . C G 30 N=2 F=5;U=4 s2/90 60 . G G 97 N=2 F=5;U=4 s2/80 20 . A T 86 N=2 F=5;U=4 s2/80 20 . A A 20 N=2 F=5;U=4 s2/20 10 . G T 90 N=2 F=5;U=4 s2/20 10 . G G 99 N=2 F=5;U=4