TL;DR
This paper presents two Ethereum smart contract solutions for securely storing and querying pharmacogenomics data. They demonstrate that blockchain can offer efficient and practical solutions for managing sensitive biomedical data, with an optimized "fastQuery" version significantly improving query times.
What Problem Does This Paper Address?
Precision medicine relies heavily on pharmacogenomics data, which links genetic variations to drug responses. As this data becomes more integral to patient care, secure and efficient storage and sharing are paramount. Traditional databases can be vulnerable to single points of failure, corruption, or unauthorized access. The paper addresses the challenge of creating a robust, immutable, and accessible system for this sensitive data by leveraging the Ethereum blockchain and smart contracts. The 2019 iDASH competition highlighted the need for time- and space-efficient smart contracts for secure genome analysis, motivating the development of such solutions.
Methods
The authors developed two smart contract solutions on a private Ethereum blockchain using Solidity.
- Challenge Solution: This approach uses an "index-based, multi-mapping" data structure. It stores pharmacogenomics observations (gene, variant, drug, outcome, etc.) in a primary mapping, keyed by a unique index. Three additional mappings act as indexes for gene names, variant numbers, and drug names, each pointing to arrays of relevant observation indices. This allows for efficient retrieval by querying one to three fields.
- fastQuery Solution: This is an optimized version that improves query efficiency by pooling gene-variant-drug relations during insertion rather than during querying. It uses a similar index-based structure but stores a single struct for each unique gene-variant-drug combination, along with aggregated counts for outcomes and side effects. This design aims to reduce the number of indexed entries and prevent indefinite database growth.
Both solutions were tested on a private, proof-of-authority test network using the Truffle framework.
Datasets
The paper does not describe specific, pre-existing public datasets used for training or evaluation. Instead, they generated synthetic datasets for testing, simulating pharmacogenomics observations. The evaluation involved inserting up to 1000 entries into the smart contract storage, with data inserted in batches of 25, 50, 100, and 200 observations at a time.
Key Insights and Ideas
- Blockchain for Biomedical Data is Viable: The research demonstrates that blockchain technology, specifically Ethereum smart contracts, can be a practical and efficient solution for managing sensitive biomedical data like pharmacogenomics information, addressing concerns about security, immutability, and accessibility.
- Index-Based Structures are Key: The core innovation lies in using index-based, multi-mapping data structures within smart contracts. This approach significantly reduces the computational overhead for querying compared to naive linear scans.
- Trade-offs in Data Pooling: The "fastQuery" solution highlights a trade-off: pooling data during insertion (to create unique gene-variant-drug relations) leads to substantially faster queries, especially for complex queries, at the cost of potentially more complex insertion logic.
- Scalability Challenges Remain: While the solutions handle up to 1000 entries efficiently, the inherent limitations of blockchain transaction costs and processing times suggest that scaling to much larger, real-world genomic datasets would require further optimization or hybrid approaches.
Key Results
- Insertion Performance:
- The challenge solution took approximately 67 seconds to insert 1000 entries, with linear time complexity and constant memory usage (around 500 MB). Disk usage grew linearly, reaching about 80 MB for 1000 entries.
- The fastQuery solution showed a slight improvement, taking approximately 56 seconds to insert 1000 entries, with similar memory and disk usage.
- Query Performance:
- The challenge solution averaged around 300 ms for a two-AND query on 1000 entries, with linear time complexity and constant memory usage (around 5 MB).
- The fastQuery solution significantly improved query times, averaging approximately 83 ms for a two-AND query on 1000 entries, with constant query time for 1- and 2-AND queries. Memory usage remained constant at around 5 MB.
- For the challenge solution, 0-AND queries were slower (around 1.6 s) than one- or two-AND queries. The fastQuery solution showed a similar trend, with 0-AND queries taking around 400 ms.
Limitations and Future Work
- Scalability: The study was limited to datasets of up to 1000 entries. The authors acknowledge that scaling to larger, real-world datasets will require further optimization.
- Development Complexity: Developing smart contracts on Ethereum is complex and requires specialized knowledge. While external scripts can simplify usage, underlying software issues (e.g., with web3.js) were noted.
- Future Work: The authors suggest that their solution designs could be adapted for other types of clinical trial data and any field requiring high-integrity data storage and efficient access. They also acknowledge the need for more platform stability before widespread adoption for shared databases.
Summary updated