Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note
titleWork in Progress

This Case Study is still under development.


Genomic and Clinical Data

For this proof of concept (PoC) we loaded all the genomic variants of about 4,700 genomes from Genomics England, variants were loaded and indexed in the development version OpenCGA 2.0.0-beta. In total we loaded about 208 million unique variants from 4,700 gVCF files accounting for about 20TB of compressed disk space. It is worth noting that these files were generated using Dragen 2.x and the are unusually big, about 5-6GB per file.

Platform

For this proof of concept (PoC) we used the development version OpenCGA v2.0.0-beta using the Hadoop Variant Storage Engine that uses Apache HBase as back-end. We also used CellBase 4.6 for the variant annotation.

For the platform we used a 10-nodes Azure HDInsight 3.6 cluster using Data Lake Storage Gen2. HDInsight 3.6 uses Hortonworks HDP 2.6.5 (with Hadoop 2.7.3 and HBase 1.1.2) and we used Azure Batch for loading concurrently all the VCF files which had been copied previously to a NFS server, you can see details here:

Node TypeNodesAzure TypeCoresMemory (GB)Storage
Hadoop Master3Standard_D12_V2428Data Lake Gen2
Hadoop Worker10Standard_DS13_V2856Data Lake Gen2
Azure Batch Queue 20Standard_D4s_v3416NFS Server


Initially, we evaluated the new HDInsight 4.0, although it worked quite well there were some few minor issue, so for this PoC we decided to use the more stable HDInsight 3.6 (HDI3.6) over Data Lake Gen2 (DL2), we will refer to this as HDI3.6+DL2. During the PoC we worked with Azure engineers to debug and fix all these issues, unfortunately we did no have time to repeat the benchmark.

As you will see below in the Analysis Benchmark section, once we completed the PoC we increased the size of HDInsight to 20 nodes and repeated some tests to study the performance improvement.

Genomic Data Loading and Indexing

In order to study the loading performance we set up a Azure Batch queue of 20 computing nodes. This allowed us to load multiple files at the same time from different servers. We configured Azure Batch to load 1 VCF file per node resulting in 20 files being loaded in HBase simultaneously. During the load we studied two different configurations:

  1. Loading VCF files vs. loading transformed files
  2. Using HDD vs. SSD disk in the NFS server 

 You can observe the results in the following plot:


Some comments:

  1. As expected loading already transformed files is much faster since we only need to load and index data in HBase. See this link for more information Indexing Genomic Variants
  2. Also, loading from SSD disks showed a better performance 

The most typical scenario when indexing genomic data is to transform+load at the same time, so assuming SSD disk the observed performance was about 380 VCF files indexed a day, or about 2TB/day. It is worth noting that:

  1. gVCF used were several times bigger than usual
  2. the number of Hadoop worker nodes was just 10
  3. we loaded up to 20 files concurrently but this could have been increased

These variables have a huge impact in the indexing performance, so the expected performance with more real gVCF files and production cluster is more than 1,000 VCF a day.

Analysis Benchmark

In this section you can find information about the performance of main variant storage engine operations, queries and analysis. Please, for data loading performance information go to section Genomic Data Load above.

Variant Storage Operations

Variant Storage operations take care of preparing the data for executing queries and analysis. Some of the most important operations include: Genotype AggregationVariant AnnotationCohort Stats Calculation and Sample Variants Indexing.

Genotype Aggregation

We executed an initial aggregation with the first batch 700 samples accounting for 74.096.015 variants. This run in about 4:10 hours without any issue, this performance is expected to be quite stable. Also, the number of worker nodes affects the performance, unfortunately, because lack of time we could only test with 10 nodes.

Variant Annotation

This operation uses the CellBase to annotate each unique variant in the database, this annotation include consequence types, population frequencies, conservation scores clinical info, ... and will be typically used for variant queries and different analysis. We executed variant annotation during the variant indexing, in OpenCGA 2.0.0 you can load variants and annotate at the same time, the performance of variant annotation is affected mainly by CellBase installation, in this PoC we used a small CellBase installation from University of Cambridge which is far from ideal. The performance observed was about 120 million variants annotated a day.

Cohort Stats Calculation

We pre-computed the variants stats for the 200 million variants across the 4,700 samples, this operation includes the calculation and indexing of the variant stats. We run this few times with 10 nodes and 20 nodes. The observed performance was:

  • With 10-nodes: 1:50 hours
  • With 20-nodes: 53 min

As expected the performance improves linearly (2.07x speed-up) with the number of nodes.

Sample Variant Indexing

This operation plays a crucial role when querying by sample genotype. This is also one of the most complex and intensive operation since we index here all the genotypes loaded, all the variants for each sample is indexed, in this PoC we have about 20 billion variants across the 4,700 samples. We run this few times with 10 nodes and 20 nodes. The observed performance was:

  • With 10-nodes4:53 hours
  • With 20-nodes2:37 min

As expected the performance improves linearly (1.86x speed-up) with the number of nodes. Note: this operation is incremental so if we load new samples we only need to index variants from these samples, the runtime above was obtained indexing all sample genotypes in one single execution.

Query Benchmark

To study the query performance we tried different configurations:

  • Variants table compression - Either GZ (2.9TB) or SNAPPY (4,7TB)
  • Bucket cache size per node - Using the 1TB premium disk to improve writes to extend the bucket size
  • Cache compression - HBASE-11331
  • Cache warmup - Custom MR job to read the whole hbase table and warm up the caches

Queries

  • filter=PASS,region,sample(1, OR)
  • filter=PASS,region,sample(2, OR)
  • filter=PASS,region,sample(3, OR)
  • filter=PASS,region,sample(4, OR)
  • filter=PASS,region,sample(5, OR)
  • filter=PASS,region,sample(1, AND)
  • filter=PASS,region,sample(2, AND)
  • filter=PASS,region,sample(3, AND)
  • filter=PASS,region,sample(4, AND)
  • filter=PASS,region,sample(5, AND)
  • filter=PASS,region=15,sample(3, AND)
  • filter=PASS,region=15,sample(3, OR)
  • filter=PASS,region,ct=(lof,missense_variant),sample(1, OR)
  • filter=PASS,region,ct=(lof,missense_variant),sample(2, OR)
  • filter=PASS,region,ct=(lof,missense_variant),sample(3, OR)
  • filter=PASS,region,ct=(lof,missense_variant),sample(4, OR)
  • filter=PASS,region,ct=(lof,missense_variant),sample(5, OR)
  • filter=PASS,region,ct(6),sample(1, OR)
  • filter=PASS,region,ct(6),sample(2, OR)
  • filter=PASS,region,ct(6),sample(3, OR)
  • filter=PASS,region,ct(6),sample(4, OR)
  • filter=PASS,region,ct(6),sample(5, OR)
  • filter=PASS,region,ct=(lof,missense_variant),biotype=protein_coding,sample(1, OR)
  • filter=PASS,region,ct(9),biotype=protein_coding,sample(1, OR)

Scenarios

IDVariants Table CompressionBucket Cache size (GB/node)Cache compressionCache warmup
Average Query Time (s)

Speed-up

1GZ45NoNo5.487NA
2GZ45NoYes5.1261.1x
3GZ300NoYes3.6281.5x
4GZ300YesYes2.1152.6x
5SNAPPY300YesNo2.4122.3x
6SNAPPY300YesYes1.8163.0x
7SNAPPY45NoNo3.7501.5x

Results







AZURENative on-prem
HDI3HDI4HDP2.6
GZSNAPPYSNAPPYSNAPPY
45GB300GB300GB45GB500GB10GB
UncompressedUncomp.Comp.CompressedComp.CompressedUncomp.
ColdWarmWarmWarmColdWarmColdColdWarmRD37RD38CG38

123456789101112
filter=PASS,region,ct(6),sample(1, OR)5.1725.7294.2631.7922.9501.5343.5614.4461.4950.8292.7291.246
filter=PASS,region,ct(6),sample(2, OR)6.4885.9054.0352.1163.2562.0073.9265.3382.0810.841.6442.27
filter=PASS,region,ct(6),sample(3, OR)7.6575.3664.3832.7153.2992.7254.3556.4272.2851.9472.2051.99
filter=PASS,region,ct(6),sample(4, OR)9.0396.4025.0982.1243.5622.3385.2635.1082.5220.9963.011.88
filter=PASS,region,ct(6),sample(5, OR)8.6888.5464.8803.1613.4322.4555.7787.0063.0671.6281.9611.962
filter=PASS,region,ct(9),biotype=protein_coding,sample(1, OR)4.1386.0902.8911.8372.5442.6053.906NA*NA*1.431.3451.345
filter=PASS,region,ct=(lof,missense_variant),biotype=protein_coding,sample(1, OR)3.9085.0603.2841.7951.8041.5883.6193.7581.7140.8021.5491.443
filter=PASS,region,ct=(lof,missense_variant),sample(1, OR)5.9053.8563.3942.3042.7371.4223.2834.1361.9130.851.781.461
filter=PASS,region,ct=(lof,missense_variant),sample(2, OR)7.7625.6863.9962.5613.3482.0173.9124.2092.3751.7652.5334.981
filter=PASS,region,ct=(lof,missense_variant),sample(3, OR)7.0696.6684.1452.1213.5882.1734.5685.7242.5391.1472.0191.959
filter=PASS,region,ct=(lof,missense_variant),sample(4, OR)6.9186.4884.9083.0003.8672.6225.0135.9873.0651.2292.011.754
filter=PASS,region,ct=(lof,missense_variant),sample(5, OR)8.9179.0434.7992.2023.2512.5695.9966.642.9811.6532.7322.115
filter=PASS,region,sample(1, AND)3.6782.8822.5631.6971.4051.2621.7892.5891.6950.8082.1271.533
filter=PASS,region,sample(1, OR)3.3813.0522.9461.9591.2651.3121.7402.1921.6670.8322.5951.915
filter=PASS,region,sample(2, AND)4.2203.6822.8521.8641.7851.4432.6653.0881.9801.0463.1611.802
filter=PASS,region,sample(2, OR)3.9973.6572.4012.1701.5321.3272.2552.9631.7260.9251.8271.529
filter=PASS,region,sample(3, AND)5.5604.4183.2872.4612.4181.8103.3073.8882.0981.1542.2192.388
filter=PASS,region,sample(3, OR)4.4304.2183.4011.9141.4851.4813.1483.3392.0680.9232.2511.945
filter=PASS,region,sample(4, AND)4.9875.2354.9182.5552.0411.9734.1224.8052.5381.373.1932.145
filter=PASS,region,sample(4, OR)4.3474.8163.2292.2561.7361.8233.2163.9892.2381.0621.9471.661
filter=PASS,region,sample(5, AND)6.6955.5564.7792.7832.9962.4524.8355.7933.0871.7142.7792.553
filter=PASS,region,sample(5, OR)5.0675.3953.9102.5182.2171.7894.3584.4952.6391.5992.0531.781
filter=PASS,region=15,sample(3, AND)1.8942.7141.5390.4630.8410.4603.0704.7681.5350.9041.7161.616
filter=PASS,region=15,sample(3, OR)1.7712.5501.1630.3840.5210.4082.3114.4821.7010.8651.5531.454













Average5.4875.1263.6282.1152.4121.8163.7504.5732.2181.1802.2061.947
Speed-up1.01.11.52.62.33.01.51.22.54.72.52.8













Average – no region 155.8194.8793.8352.2682.5691.9423.8464.5682.2751.2072.2581.984
Speed-up1.01.21.52.62.33.01.51.32.64.82.62.9



* Apache Phoenix not working in H

GWAS

We defined two cohorts of 100 samples each and run a GWAS analysis over the 208 million variants. The performance observed was very similar to Cohort Stats Calculation. About 2 hours with 10 nodes and about 1 hour with 20 nodes.



Table of Contents:

Table of Contents
indent20px