Newbie: can somebody try to load the gff module

I tried to load the gff module that can be found here: https://github.com/GMOD/gff-js
but even after reading all posts on loading npm module i can’t get it to work. Since I’m rather new to javascript+observable I might oversee something.

gff = require('gff') Error: invalid module
gff = require('@gmod/gff').default Error: undefined
gff = require('https://raw.githubusercontent.com/GMOD/gff-js/master/src/index.js') Error: unable to load module

In the end I would like to read a gzipped file from i.e.:
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/003/008/175/GCA_003008175.1_ASM300817v1/GCA_003008175.1_ASM300817v1_genomic.gff.gz and visualize some content
Any help is appreciated.

That module doesn’t have any browser-compatible file included in it, so the best option is to use bundle.run:

gff = require('https://bundle.run/@gmod/gff')

You can try out the module debugger that can identify which patterns work.

For that .gz file, it should work - though be sure to confirm that the server you’re loading the file from supports CORS and is https. Loading a file from FTP, for example, won’t work directly, because of basic security limitations on the browser level.

1 Like