lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
478 stars 132 forks source link

SamViewWithMate: width one regions using BED file #154

Closed daynefiler closed 4 years ago

daynefiler commented 4 years ago

First, thank you for sharing all of your work.

Subject of the issue

When trying to subset a bam file with a BED file containing single nucleotide regions, the program skips those regions.

[WARN][BedLineCodec]cannot use empty BED interval NC_000022.11 50283705 50283705 ("NC_000022.11(tab)50283705(tab)50283705"=. Skipping.

Your environment

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core) CentOS Linux release 7.4.1708 (Core)



### Steps to reproduce
`java -jar ~/jvarkit/dist/samviewwithmate.jar -b some.bed some.bam`
where `some.bed` contains a single nucleotide region, e.g.  NC_000022.1:50283705-50283705
lindenb commented 4 years ago

thanks

a BED record like 'contig(tab)50283705(tab)50283705' is EMPTY . A bed record is an open-ended interval. see https://www.biostars.org/p/84686/

a one base bed would be 'contig(tab)50283704(tab)50283705"'

daynefiler commented 4 years ago

Thanks for your quick response!