'merge mates on file to create unique file

I would to merge the position of the mates to create s file for visualisation of unique reads

I consider start and end of the pair with longest size ( eg: pair1 : chr1 1000 2000 ; pair2: chr 1500 2500 ; then I would a file with chr1 1000 2500



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source