I need to merge them in a way to have the shared chromosome location.
Is there a way to do that ?
Bioinformatics Stack Exchange is a question and answer site for researchers, developers, students, teachers, and end users interested in bioinformatics. It only takes a minute to sign up.Sign up to join this community
Strip out the Microsoft line endings, strip the header, and sort each of the N files:
$ tr -d '\r' < fileN.tsv | tail -n+2 - | sort-bed - > fileN.bed
Merge the files:
$ bedops --merge file1.bed file2.bed ... fileN.bed > answer.bed
answer.bed will contain all merged regions from files
fileN.bed. Merging will be done on intervals for each unique chromosome name.