Skip to content

Last Bed entry not being read #25

Description

@abhinavsns

On the develop branch 1b51e2d

Consider example.bed file with 1 entry and 1 line:

chr1 1 5

Not that there is no empty line at the end

regions = open(BED.Reader, "example.bed") do reader
    IntervalCollection(reader, true)
end

collect(regions)

Output is an empty interval collection:

IntervalCollection{BED.Record} with 0 intervals:
Interval{BED.Record}[]

whereas if there is an empty line present in example.bed (1 entry, 2 lines):

chr1 1 5

Then the output is as expected:

IntervalCollection{BED.Record} with 1 intervals:
  chr1:2-5  .  chr1     1       5


1-element Vector{Interval{BED.Record}}:
 Interval{BED.Record}:
  sequence name: chr1
  leftmost position: 2
  rightmost position: 5
  strand: .
  metadata: chr1        1       5

It seems like the last entry of a file is not being read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions