NIAGADS / niagads-igv-webapp

Standalone webapp for NIAGADS customized IGV Genome Browser
GNU General Public License v3.0
1 stars 1 forks source link

correctly parse FILER "bed"-like files #24

Closed fossilfriend closed 1 year ago

fossilfriend commented 1 year ago

all files are in a bedX+Y (e.g., bed4+12 means chr, start, end, name+ 12 more non-standard BED fields)

decode functions only take tokens and header, and cannot see the track config, so need to figure out how to pass X+Y to decoder so it can determine how to interpret fields

it looks like we can use the header, which is assigned a format: see featureParser.js line 62

fossilfriend commented 1 year ago

will need to expose UCSCBedFeature in NIAGADS/igv.js so that it can be imported by the decoder; error is caused by the following line of code in decodeBedXY:

const feature = new igv.UCSCBedFeature({chr: chr, start: start, end: end, score: 1000})

image

fossilfriend commented 1 year ago

in bedDecoder.tsx define a new Feature class BedXYFeature to use instead of UCSCBedFeature.

Should be modeled after UCSCBedFeature, but modifies the getAttributeValue function to check info field instead of attributes field and returns null on key errors.

decodeBedXY should return a BedXYFeature instead of a UCSCBedFeature. Also, update to build properties in entirety before creating the feature object.

fossilfriend commented 1 year ago

closed by https://github.com/NIAGADS/niagads-igv-webapp/pull/30