Skip to content

Commit

Permalink
sa version is now an env variable in annotation lambda (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatshuvro authored and GitHub Enterprise committed Jun 2, 2021
1 parent 736043b commit a62a4f8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 3 additions & 1 deletion AnnotationLambda/AnnotationLambda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ private static AnnotationResources GetAnnotationResources(AnnotationConfig annot
var genomeAssembly = GenomeAssemblyHelper.Convert(annotationConfig.genomeAssembly);
string cachePathPrefix = LambdaUrlHelper.GetCacheFolder().UrlCombine(genomeAssembly.ToString()).UrlCombine(LambdaUrlHelper.DefaultCacheSource);
string nirvanaS3Ref = LambdaUrlHelper.GetRefUrl(genomeAssembly);
string saManifestUrl = LambdaUtilities.GetManifestUrl(annotationConfig.supplementaryAnnotations ?? "latest", genomeAssembly);
// SaVersion will be provided as an environment variable. Defaults to "latest"
string saVersion = Environment.GetEnvironmentVariable("SaVersion");
string saManifestUrl = LambdaUtilities.GetManifestUrl(string.IsNullOrEmpty(saVersion)? "latest": saVersion, genomeAssembly);
var metrics = new PerformanceMetrics();

var annotationResources = new AnnotationResources(nirvanaS3Ref, cachePathPrefix,
Expand Down
17 changes: 8 additions & 9 deletions Cloud/Messages/Annotation/AnnotationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ public sealed class AnnotationConfig
{
// ReSharper disable InconsistentNaming
// ReSharper disable NotAccessedField.Global
public string id;
public string genomeAssembly;
public string vcfUrl;
public string tabixUrl;
public S3Path outputDir;
public string outputPrefix;
public string supplementaryAnnotations;
public List<SaUrls> customAnnotations;
public string customStrUrl;
public string id;
public string genomeAssembly;
public string vcfUrl;
public string tabixUrl;
public S3Path outputDir;
public string outputPrefix;
public List<SaUrls> customAnnotations;
public string customStrUrl;
public AnnotationRange annotationRange;
// ReSharper restore NotAccessedField.Global
// ReSharper restore InconsistentNaming
Expand Down
1 change: 0 additions & 1 deletion Cloud/Messages/Nirvana/NirvanaConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public sealed class NirvanaConfig
public string vcfUrl;
public string tabixUrl;
public S3Path outputDir;
public string supplementaryAnnotations;
// ReSharper disable once UnassignedField.Global
public List<SaUrls> customAnnotations;
public string customStrUrl;
Expand Down
1 change: 0 additions & 1 deletion NirvanaLambda/NirvanaLambda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ private static string DescribeAnnotationRegion(AnnotationRange ar)
tabixUrl = config.tabixUrl,
outputDir = config.outputDir,
outputPrefix = GetIndexedPrefix(config.vcfUrl, jobIndex),
supplementaryAnnotations = config.supplementaryAnnotations,
customAnnotations = config.customAnnotations,
customStrUrl = config.customStrUrl,
annotationRange = annotationRange
Expand Down
3 changes: 1 addition & 2 deletions UnitTests/NirvanaLambda/NirvanaConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public void CheckFieldsNotNull_AsExpected()
accessKey = "1234567",
secretKey = "show me the money",
sessionToken = "a token"
},
supplementaryAnnotations = "latest"
}
};
}
}

0 comments on commit a62a4f8

Please sign in to comment.