Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Stromberg committed Jun 3, 2021
2 parents 985c538 + a8b2bac commit a730317
Show file tree
Hide file tree
Showing 242 changed files with 6,737 additions and 2,228 deletions.
13 changes: 8 additions & 5 deletions AnnotationLambda/AnnotationLambda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)

snsTopicArn = LambdaUtilities.GetEnvironmentVariable(LambdaUtilities.SnsTopicKey);

string vcfUrl = config.vcfUrl;

string vcfUrl = config.vcfUrl;
int variantCount = 0;
using (var annotationResources = GetAnnotationResources(config))
{
if (annotationResources.InputStartVirtualPosition == -1) return GetSuccessOutput(result);
Expand All @@ -60,7 +60,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
}

Logger.WriteLine("Scan for positions to preload complete.");

using (var aes = new AesCryptoServiceProvider())
{
FileMetadata jsonMetadata, jasixMetadata;
Expand All @@ -84,7 +84,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)

using (var jsonCompressStream = new BlockGZipStream(jsonMd5Stream, CompressionMode.Compress))
{
StreamAnnotation.Annotate(headerStream, inputVcfStream, jsonCompressStream, jasixMd5Stream, annotationResources, vcfFilter, true);
variantCount = StreamAnnotation.Annotate(headerStream, inputVcfStream, jsonCompressStream, jasixMd5Stream, annotationResources, vcfFilter, true).variantCount;
}

Logger.WriteLine("Annotation done.");
Expand All @@ -107,6 +107,7 @@ public AnnotationResult Run(AnnotationConfig config, ILambdaContext context)
LambdaUtilities.DeleteTempOutput();
if (string.IsNullOrEmpty(result.filePath)) throw new FileNotFoundException();

result.variantCount = variantCount;
return GetSuccessOutput(result);
}
catch (Exception exception)
Expand Down Expand Up @@ -155,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
14 changes: 7 additions & 7 deletions AnnotationLambda/AnnotationLambda.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
<OutputPath>bin\$(Configuration)</OutputPath>
<OutputPath>bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.7.0" />
<PackageReference Include="AWSSDK.Lambda" Version="3.3.106.4" />
<PackageReference Include="AWSSDK.S3" Version="3.3.109.4" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.3.101.100" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.Lambda" Version="3.7.0.15" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cloud\Cloud.csproj" />
Expand Down
18 changes: 0 additions & 18 deletions AnnotationLambda/Properties/launchSettings.json

This file was deleted.

10 changes: 5 additions & 5 deletions CacheUtils/CacheUtils.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<Import Project="..\CommonAssemblyInfo.props" />
Expand All @@ -12,9 +12,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\CommandLine.csproj" />
Expand Down
49 changes: 0 additions & 49 deletions CacheUtils/Properties/launchSettings.json

This file was deleted.

8 changes: 4 additions & 4 deletions CacheUtils/TranscriptCache/TranscriptCacheUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public static List<ITranscript> GetTranscripts(DataBundle bundle, IChromosomeInt

public static IntervalArray<T>[] ToIntervalArrays<T>(this IEnumerable<T> items, int numRefSeqs) where T : IChromosomeInterval
{
var intervalArrays = new IntervalArray<T>[numRefSeqs];
var itemsByRef = items.GetMultiValueDict(x => x.Chromosome.Index);
var intervalArrays = new IntervalArray<T>[numRefSeqs];
Dictionary<ushort, List<T>> itemsByRef = items.GetMultiValueDict(x => x.Chromosome.Index);

foreach (ushort refIndex in itemsByRef.Keys.OrderBy(x => x))
{
var unsortedItems = itemsByRef[refIndex];
var intervals = unsortedItems.OrderBy(x => x.Start).ThenBy(x => x.End).ToIntervals(unsortedItems.Count);
List<T> unsortedItems = itemsByRef[refIndex];
Interval<T>[] intervals = unsortedItems.OrderBy(x => x.Start).ThenBy(x => x.End).ToIntervals(unsortedItems.Count);
intervalArrays[refIndex] = new IntervalArray<T>(intervals);
}

Expand Down
12 changes: 6 additions & 6 deletions Cloud/Cloud.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.7.0" />
<PackageReference Include="AWSSDK.S3" Version="3.3.109.4" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.3.101.100" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.0" />
<PackageReference Include="AWSSDK.S3" Version="3.7.0.17" />
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Genome\Genome.csproj" />
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
2 changes: 2 additions & 0 deletions Cloud/Messages/Annotation/AnnotationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public sealed class AnnotationResult
public string status;
public string filePath;
public ErrorCategory? errorCategory;

public int variantCount;
// ReSharper restore UnassignedField.Global
// ReSharper restore InconsistentNaming
}
Expand Down
9 changes: 6 additions & 3 deletions Cloud/Messages/Custom/CustomConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ namespace Cloud.Messages.Custom
{
public sealed class CustomConfig
{
public string id;
public string tsvUrl;
public S3Path outputDir;
public string id;
public string tsvUrl;
public S3Path outputDir;
public JwtFields jwtFields;

public bool skipGeneIdValidation;
public bool skipRefBaseValidation;
}
}
12 changes: 7 additions & 5 deletions Cloud/Messages/Custom/CustomResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
// ReSharper disable InconsistentNaming
public sealed class CustomResult
{
public string id;
public string status;
public string genomeAssembly;
public FileList created;
public bool noValidEntries;
public string id;
public string status;
public string genomeAssembly;
public FileList created;
public bool noValidEntries;
public JwtFields jwtFields;
public int variantCount;
}
// ReSharper restore InconsistentNaming
// ReSharper restore NotAccessedField.Global
Expand Down
12 changes: 12 additions & 0 deletions Cloud/Messages/JwtFields.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Cloud.Messages
{
public class JwtFields
{
// ReSharper disable InconsistentNaming
public string authorizedParty;
public string subject;
public string tenantId;

// ReSharper restore InconsistentNaming
}
}
5 changes: 3 additions & 2 deletions Cloud/Messages/Nirvana/NirvanaConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ 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;
public string customStrUrl;
public JwtFields jwtFields;

// ReSharper restore InconsistentNaming

internal void CheckRequiredFieldsNotNull()
Expand Down
9 changes: 6 additions & 3 deletions Cloud/Messages/Nirvana/NirvanaResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ public sealed class NirvanaResult
{
// ReSharper disable InconsistentNaming
// ReSharper disable NotAccessedField.Global
public string id;
public string status;
public FileList created;
public string id;
public string status;
public FileList created;
public JwtFields jwtFields;
public int variantCount;

// ReSharper restore NotAccessedField.Global
// ReSharper restore InconsistentNaming
}
Expand Down
2 changes: 1 addition & 1 deletion CommandLine/CommandLine.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions CommonAssemblyInfo.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Company>Illumina</Company>
<Copyright2020 Illumina, Inc.</Copyright>
<FileVersion>3.13.0</FileVersion>
<AssemblyVersion>3.13.0</AssemblyVersion>
<Version>3.13.0</Version>
<Copyright2021 Illumina, Inc.</Copyright>
<FileVersion>3.15.0</FileVersion>
<AssemblyVersion>3.15.0</AssemblyVersion>
<Version>3.15.0</Version>
<Authors>Stromberg, Roy, Lajugie, Jiang, Li, and Kang</Authors>
</PropertyGroup>
</Project>
7 changes: 2 additions & 5 deletions Compression/Compression.csproj
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>..\bin\$(Configuration)</OutputPath>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -12,9 +12,6 @@
<None Include="Packages\BlockCompression\BlockCompression.dll" Link="BlockCompression.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Packages\BlockCompression\BlockCompression.pdb" Link="BlockCompression.pdb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Packages\BlockCompression\libBlockCompression.so" Link="libBlockCompression.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand All @@ -23,4 +20,4 @@
</None>
</ItemGroup>
<Import Project="..\CommonAssemblyInfo.props" />
</Project>
</Project>
Binary file modified Compression/Packages/BlockCompression/BlockCompression.dll
Binary file not shown.
Binary file not shown.
Binary file modified Compression/Packages/BlockCompression/libBlockCompression.dylib
Binary file not shown.
Binary file modified Compression/Packages/BlockCompression/libBlockCompression.so
Binary file not shown.
Loading

0 comments on commit a730317

Please sign in to comment.