read only edges to valid contigs in function ...read_distances