@@ -46,8 +46,8 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
46
46
47
47
snsTopicArn = LambdaUtilities . GetEnvironmentVariable ( LambdaUtilities . SnsTopicKey ) ;
48
48
49
- string vcfUrl = config . vcfUrl ;
50
-
49
+ string vcfUrl = config . vcfUrl ;
50
+ int variantCount = 0 ;
51
51
using ( var annotationResources = GetAnnotationResources ( config ) )
52
52
{
53
53
if ( annotationResources . InputStartVirtualPosition == - 1 ) return GetSuccessOutput ( result ) ;
@@ -60,7 +60,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
60
60
}
61
61
62
62
Logger . WriteLine ( "Scan for positions to preload complete." ) ;
63
-
63
+
64
64
using ( var aes = new AesCryptoServiceProvider ( ) )
65
65
{
66
66
FileMetadata jsonMetadata , jasixMetadata ;
@@ -84,7 +84,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
84
84
85
85
using ( var jsonCompressStream = new BlockGZipStream ( jsonMd5Stream , CompressionMode . Compress ) )
86
86
{
87
- StreamAnnotation . Annotate ( headerStream , inputVcfStream , jsonCompressStream , jasixMd5Stream , annotationResources , vcfFilter , true ) ;
87
+ variantCount = StreamAnnotation . Annotate ( headerStream , inputVcfStream , jsonCompressStream , jasixMd5Stream , annotationResources , vcfFilter , true ) . variantCount ;
88
88
}
89
89
90
90
Logger . WriteLine ( "Annotation done." ) ;
@@ -107,6 +107,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
107
107
LambdaUtilities . DeleteTempOutput ( ) ;
108
108
if ( string . IsNullOrEmpty ( result . filePath ) ) throw new FileNotFoundException ( ) ;
109
109
110
+ result . variantCount = variantCount ;
110
111
return GetSuccessOutput ( result ) ;
111
112
}
112
113
catch ( Exception exception )
@@ -155,7 +156,9 @@ private static AnnotationResources GetAnnotationResources(AnnotationConfig annot
155
156
var genomeAssembly = GenomeAssemblyHelper . Convert ( annotationConfig . genomeAssembly ) ;
156
157
string cachePathPrefix = LambdaUrlHelper . GetCacheFolder ( ) . UrlCombine ( genomeAssembly . ToString ( ) ) . UrlCombine ( LambdaUrlHelper . DefaultCacheSource ) ;
157
158
string nirvanaS3Ref = LambdaUrlHelper . GetRefUrl ( genomeAssembly ) ;
158
- string saManifestUrl = LambdaUtilities . GetManifestUrl ( annotationConfig . supplementaryAnnotations ?? "latest" , genomeAssembly ) ;
159
+ // SaVersion will be provided as an environment variable. Defaults to "latest"
160
+ string saVersion = Environment . GetEnvironmentVariable ( "SaVersion" ) ;
161
+ string saManifestUrl = LambdaUtilities . GetManifestUrl ( string . IsNullOrEmpty ( saVersion ) ? "latest" : saVersion , genomeAssembly ) ;
159
162
var metrics = new PerformanceMetrics ( ) ;
160
163
161
164
var annotationResources = new AnnotationResources ( nirvanaS3Ref , cachePathPrefix ,
0 commit comments