Skip to content

Conversation

nawatts
Copy link
Contributor

@nawatts nawatts commented Jan 19, 2022

Some users may always prefer to use the AWS or Azure copies of gnomAD resources. This allows them to set a default source in an environment variable instead of having to configure it in every pipeline.

Once hail-is/hail#11230 is merged, get_default_public_resource_source can be extended to use Hail's guess for the current cloud provider to set the default resource source.

Related to #433

@nawatts nawatts force-pushed the default-resource-source branch from 7be7634 to ad35a8a Compare January 19, 2022 15:21
@nawatts nawatts requested review from a team and jkgoodrich and removed request for a team January 19, 2022 15:24
Copy link
Contributor

@jkgoodrich jkgoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you so much for adding, just a small note, and question. Is there somewhere that we should specify that GNOMAD_DEFAULT_PUBLIC_RESOURCE_SOURCE can now be used like in https://github.com/broadinstitute/gnomad_methods/blob/8bffc35b8101a6095276331f7a1fa9edcec4e86f/docs/resource_sources.rst?

try:
default_source = GnomadPublicResourceSource(default_source_from_env)
return default_source
except ValueError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we throw a warning that the environment variable defines a source that is not one of those in GnomadPublicResourceSource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated about this. Users can provide their own source, such as gs://my-bucket/gnomad-resources, so this is (potentially) valid. I'll add some logging here.

@nawatts
Copy link
Contributor Author

nawatts commented Jan 19, 2022

Is there somewhere that we should specify that GNOMAD_DEFAULT_PUBLIC_RESOURCE_SOURCE can now be used like in https://github.com/broadinstitute/gnomad_methods/blob/8bffc35b8101a6095276331f7a1fa9edcec4e86f/docs/resource_sources.rst?

Good point. I'll add some docs.

@nawatts nawatts force-pushed the default-resource-source branch from ba8db66 to 22fcba8 Compare January 19, 2022 18:22
Copy link
Contributor

@jkgoodrich jkgoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the doc/logger additions!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants