Search in sources :

Example 1 with GATKGCSOptions

use of org.broadinstitute.hellbender.utils.gcs.GATKGCSOptions in project gatk by broadinstitute.

the class ReferenceAPISourceUnitTest method setupPipeline.

private Pipeline setupPipeline() {
    // We create GATKGCSOptions instead of DataflowPipelineOptions to keep track of the secrets
    // so we can read the reference.
    final GATKGCSOptions options = PipelineOptionsFactory.as(GATKGCSOptions.class);
    options.setProject(getGCPTestProject());
    if (getGCPTestApiKey() != null) {
        options.setApiKey(getGCPTestApiKey());
        // put a serialized version of the credentials in the pipelineOptions, so we can get to it later.
        try {
            GenomicsFactory.OfflineAuth auth = GCSOptions.Methods.createGCSAuth(options);
            GATKGCSOptions.Methods.setOfflineAuth(options, auth);
        } catch (Exception x) {
            throw new GATKException("Error with credentials", x);
        }
    }
    // We don't use GATKTestPipeline because we need specific options.
    return TestPipeline.create(options);
}
Also used : GenomicsFactory(com.google.cloud.genomics.utils.GenomicsFactory) GATKGCSOptions(org.broadinstitute.hellbender.utils.gcs.GATKGCSOptions) GATKException(org.broadinstitute.hellbender.exceptions.GATKException) GATKException(org.broadinstitute.hellbender.exceptions.GATKException) UserException(org.broadinstitute.hellbender.exceptions.UserException)

Aggregations

GenomicsFactory (com.google.cloud.genomics.utils.GenomicsFactory)1 GATKException (org.broadinstitute.hellbender.exceptions.GATKException)1 UserException (org.broadinstitute.hellbender.exceptions.UserException)1 GATKGCSOptions (org.broadinstitute.hellbender.utils.gcs.GATKGCSOptions)1