Closed ghuls closed 5 months ago
It might be a more general problem with the parsing order of the arguments.
Example 1 should give the same result as example 4. Example 2 should give the same result as example 3.
$ printf 'chr1\t123456\n'
chr1 123456
$ printf 'chr1\t123456\t123457\n'
chr1 123456 123457
# Example 1
$ bin/bedtools intersect -a <(printf 'chr1\t123456\n') -b <(printf 'chr1\t123456\t123457\n')
ERROR: file /dev/fd/63 has non positional records, which are only valid for the groupBy tool.
Tool: bedtools intersect (aka intersectBed)
Version: v2.26.0-50-gccdc919-dirty
Summary: Report overlaps between two feature files.
Usage: bedtools intersect [OPTIONS] -a <bed/gff/vcf/bam> -b <bed/gff/vcf/bam>
...
# Example 2
$ bin/bedtools intersect -b <(printf 'chr1\t123456\n') -a <(printf 'chr1\t123456\t123457\n')
ERROR: file /dev/fd/63 has non positional records, which are only valid for the groupBy tool.
Tool: bedtools intersect (aka intersectBed)
Version: v2.26.0-50-gccdc919-dirty
Summary: Report overlaps between two feature files.
Usage: bedtools intersect [OPTIONS] -a <bed/gff/vcf/bam> -b <bed/gff/vcf/bam>
...
# Example 3
$ bin/bedtools intersect -a <(printf 'chr1\t123456\t123457\n') -b <(printf 'chr1\t123456\n')
ERROR: Received illegal bin number 4294967295 from getBin call.
ERROR: Unable to add record to tree.
# Example 4
$ bin/bedtools intersect -b <(printf 'chr1\t123456\t123457\n') -a <(printf 'chr1\t123456\n')
Segmentation fault (core dumped)
After the patch for the first issue, the output of example 4 changed.
# Example 4
$ bin/bedtools intersect -b <(printf 'chr1\t123456\t123457\n') -a <(printf 'chr1\t123456\n')
***** WARNING: File has inconsistent naming convention for record:
chr1 123456
***** WARNING: File has inconsistent naming convention for record:
chr1 123456
I encountered the same error and I found that my bed files were prepared with windows type "End Of Line". Lesson learnt: make sure the bed files are prepared with linux type end of line (EOL). Solution: open the file in notepad++ How to check: View>show symbols>show end of line. CRLF -> windows and LF-> linux. How to convert: Edit>EOLconversion>Unix(LF)
the error was ERROR: file sorted_YH3K9me3.bed has non positional records, which are only valid for the groupBy tool.
Also see dos2unix
on the cli.
I think this can be closed?