Thank you, Alex. I tried your syntax, first converting GFF to BED, simply using gff2bed. And then,
bedops --merge foo.bed | bedmap --count --echo-map - foo.bed | awk '($1>0)' | cut -f2- | sort-bed - | bedops -n 1 foo.bed - > unmerged.bed
I received an error message that reads:
End coordinate is too large. Max decimal digits allowed is 12 in
BEDOPS.Constants.hpp. See line 1 in -.
Perhaps my BED input file is non-standard? For example, see below:
bedops --merge foo.bed | bedmap --count --echo-map - foo.bed | awk '($1>0)' | cut -f2- | head -n 1
837036 877324 ORF68_tool_Prfl1 8 - tool_Prfl1 ORF 2 ID=ORF68_ptool_Prfl1
Error message looks like it is generate at the sort-bed using STDIN stream step...
bedops --merge foo.bed | bedmap --count --echo-map - foo.bed | awk '($1>0)' | cut -f2- | sort-bed -
So I've tried reverting back to bedtools merge and it looks like it does report BOTH merged and unmerged coords in the same output file. I am now making sure I am not mis-interpreting mergeBed with bleary eyes, using examples and real data!
I left out a
--delim '\t'
option in thebedmap
command. I edited my answer to include that option. I think that should fix it. Feel free to follow up if that doesn't help.