jbrowse-jupyter icon indicating copy to clipboard operation
jbrowse-jupyter copied to clipboard

Integration with other bioinformatics libraries

Open teresam856 opened this issue 2 years ago • 1 comments

It would be awesome to be able to not only accept local files, but except Python data objects, for example stuff from biopython, i.e. a parsed GFF, or one of the Sequence() objects.

One way to do this could be to simply save this to a temp local file and also host it to the browser using Flask.

So then, in a Jupyter cell:

# biopython code
import pprint
from BCBio.GFF import GFFExaminer

in_file = "your_file.gff"
examiner = GFFExaminer()
in_handle = open(in_file)
pprint.pprint(examiner.available_limits(in_handle))

# adding it from a variable in memory to our browser
config.add_track(examiner)

Some precedent is the data frame track in JBrowseR, where you pass a variable directly to the browser. But this would be more performant if it didn't rely on the FromConfigAdapter.

https://github.com/GMOD/dash_jbrowse/issues/6

teresam856 avatar Dec 07 '21 09:12 teresam856