Closed fossilfriend closed 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})
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.
all files are in a bedX+Y (e.g., bed4+12 means chr, start, end, name+ 12 more non-standard BED fields)
igv.js
decodeBed
decoder, but logs a message to indicate that the custom decoder is calledresolveDecoder
) to the custom bed decoder when resolving tracks, if format matches bedX+Y regexpdecode functions only take
tokens
andheader
, 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 fieldsit looks like we can use the
header
, which is assigned aformat
: seefeatureParser.js
line 62header.format
and then modify code to dynamically propagate standard & optional fields based on X,Y values