calculate adjacencies from read files