Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htsget auth support #86

Open
brainstorm opened this issue Jan 19, 2022 · 4 comments
Open

htsget auth support #86

brainstorm opened this issue Jan 19, 2022 · 4 comments

Comments

@brainstorm
Copy link

brainstorm commented Jan 19, 2022

Hello @cmdcolin,

We are deploying JBrowse2 @umccr, primarily for the htsget support, so that different web-based clients work fine using one data access interface (htsget).

Unfortunately we hit a snag with the Bearer token support, which would allow our users to access private data via htsget, namely:

bam-js/src/htsget.ts

Lines 65 to 68 in 25ba6e8

const base = `${this.baseUrl}/${this.trackId}`
const url = `${base}?referenceName=${chr}&start=${min}&end=${max}&format=BAM`
const chrId = this.chrToIndex && this.chrToIndex[chr]
const result = await fetch(url, { ...opts })

Do you have plans to add Bearer token support to htsget in JBrowse2?

@andrewpatto @victorskl

/cc @ohofmann @mlin

@brainstorm
Copy link
Author

I suspect that was the plan with issue GMOD/jbrowse#1142 ?

@cmdcolin
Copy link
Collaborator

cmdcolin commented Jan 19, 2022

cool! glad to have interest

there is likely a bit of nuance to some of this, so i'll try to mention a couple of various related things

  1. we have some support of htsget in jbrowse 2. this is a little driver that I use to test out htsget loading data from a dnanexus endpoint http://s3.amazonaws.com/jbrowse.org/code/jb2/main/index.html?config=test_data%2Fconfig_demo.json&session=share-06G4abghy6&password=bwLI5 we still have a bit of work with Htsget unable to fetch header from some endpoints #67 to make the

  2. this is the track config for that https://github.com/GMOD/jbrowse-components/blob/607_stats_estimation_v3/test_data/config_demo.json#L1545-L1555

  3. the code for htsget in this library uses a plain fetch. if someone wanted to supply extra headers they could, in principle, use the "opts" argument to supply e.g. an opts.headers.Authorization field, however, the jbrowse code is not hooked up to do this

  4. the jbrowse 2 codebase created a concept for accessing authenticated resources (called internet accounts, which can be configured or added to via plugins), but this is not hooked up to htsget.

  5. in general actually, the htsget support in jbrowse 2 is quite basic e.g. we don't let users input htsget:// urls yet but with interest, we could definitely add stuff like this

@cmdcolin
Copy link
Collaborator

if you have any more info about your needs let us know:)

@brainstorm
Copy link
Author

Thanks @cmdcolin! @jb-adams will be tilting the GA4GH htsget server back by the end of this week so you can tackle that issue.

Points 3&4: Understood, our team has its hands a bit full with other tasks, so it might take some time to cobble it up, test and submit a PR for that but we definitely would like to see that in place at some point :-S

Point 5: The htsget:// scheme is still under debate on whether it's standard or not (see samtools/hts-specs#581).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants