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: add samples query parameter, principally to select subset of VCF columns #430

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mlin
Copy link
Member

@mlin mlin commented Jul 10, 2019

e.g.

GET /htsget/1000genomes/variants?format=VCF&samples=NA12878,NA12877

Previously I circulated a different version of this with a repeated sample=x query parameter. This single, comma separated list is more consistent with the existing fields & tags query parameters.

@mlin mlin added this to Next in htsget Jul 10, 2019
@mlin
Copy link
Member Author

mlin commented Jul 10, 2019

Can a sample name have a comma in it? (@daviesrob)

@mlin
Copy link
Member Author

mlin commented Jul 10, 2019

Correct me if wrong, but it is not forbidden for a VCF sample name to contain a comma.

One possibility is to specify URI encoding of each element in the comma-separated list, so any comma within the sample name would be percent-encoded. A comma-separated list of individually URI-encoded elements seems like it would be a slightly tortured construct, though.

Another possibility is reverting to the first straw man idea of providing the list through repeated query parameters, where each individual parameter would then be query string encoded as usual, e.g.

GET /htsget/1000genomes/variants?format=VCF&samples=NA12878&samples=NA12877&samples=quick%2C%20brown%20fox

The wart is that it's dissimilar from the existing fields & tags parameters.

@nh13
Copy link
Member

nh13 commented Jul 11, 2019

Another idea: the default delimiter be comma and then have a parameter to control the delimiter?

@mlin mlin moved this from Next to Now in htsget Sep 4, 2019
@mlin
Copy link
Member Author

mlin commented Sep 4, 2019

@daviesrob suggestion: percent-encoded tab delimiter

@yfarjoun
Copy link
Contributor

Also, can sampleID be empty?

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

Successfully merging this pull request may close these issues.

None yet

4 participants