oxbow icon indicating copy to clipboard operation
oxbow copied to clipboard

Add bed12 reader

Open GarrettNg opened this issue 7 months ago • 0 comments

This PR handles spec compliant BED12 files, so it won't work as is with BED3-9 and optional fields. Handling the other types of bed files could require creating separate reader structs for each one that build off the previous and impl different record column sizes as noodles does with BedN and Record. There may be a simpler solution. In the interim, it is still easier to read bed files with a csv reader (delimited by \t), especially given the variety of column arrangements.

Of note are 2 types of arrow builders used in the BedBatchBuilder that have not been used elsewhere in oxbow:

  • StructBuilder for Struct Arrays
    • used for the color field
  • ListBuilder for lists
    • used for the block_sizes and block_starts fields

These builders could potentially be used for the nested fields of other readers in oxbow.

GarrettNg avatar Nov 22 '23 19:11 GarrettNg