← home
Github: datasets/clinicaltrials.py

ir_datasets: Clinical Trials

Index
  1. clinicaltrials
  2. clinicaltrials/2017
  3. clinicaltrials/2017/trec-pm-2017
  4. clinicaltrials/2017/trec-pm-2018
  5. clinicaltrials/2019
  6. clinicaltrials/2019/trec-pm-2019
  7. clinicaltrials/2021

"clinicaltrials"

Clinical trial information from ClinicalTrials.gov. Used for the Clinical Trials subtasks in TREC Precision Medicine.


"clinicaltrials/2017"

A snapshot of ClinicalTrials.gov from April 2017 for use with the clinicaltrials/2017/trec-pm-2017 and clinicaltrials/2017/trec-pm-2018 Clinical Trials subtasks.

docs

Language: en

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017')
# Index clinicaltrials/2017
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2017')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.


"clinicaltrials/2017/trec-pm-2017"

The TREC 2017 Precision Medicine clinical trials subtask.

queries

Language: en

Query type:
TrecPm2017Query: (namedtuple)
  1. query_id: str
  2. disease: str
  3. gene: str
  4. demographic: str
  5. other: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2017")
for query in dataset.queries_iter():
    query # namedtuple<query_id, disease, gene, demographic, other>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2017 queries
[query_id]    [disease]    [gene]    [demographic]    [other]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2017')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2017') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pipeline(dataset.get_topics('disease'))

You can find more details about PyTerrier retrieval here.

docs

Language: en

Note: Uses docs from clinicaltrials/2017

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2017")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2017 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2017')
# Index clinicaltrials/2017
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2017')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.

qrels
Query relevance judgment type:
TrecQrel: (namedtuple)
  1. query_id: str
  2. doc_id: str
  3. relevance: int
  4. iteration: str

Relevance levels

Rel.Definition
0not relevant
1possibly relevant
2definitely relevant

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2017")
for qrel in dataset.qrels_iter():
    qrel # namedtuple<query_id, doc_id, relevance, iteration>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2017 qrels --format tsv
[query_id]    [doc_id]    [relevance]    [iteration]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
from pyterrier.measures import *
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2017')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2017') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pt.Experiment(
    [pipeline],
    dataset.get_topics('disease'),
    dataset.get_qrels(),
    [MAP, nDCG@20]
)

You can find more details about PyTerrier experiments here.

Citation

ir_datasets.bib:

\cite{Roberts2017TrecPm}

Bibtex:

@inproceedings{Roberts2017TrecPm, title={Overview of the TREC 2017 Precision Medicine Track}, author={Kirk Roberts and Dina Demner-Fushman and Ellen M. Voorhees and William R. Hersh and Steven Bedrick and Alexander J. Lazar and Shubham Pant}, booktitle={TREC}, year={2017} }

"clinicaltrials/2017/trec-pm-2018"

The TREC 2018 Precision Medicine clinical trials subtask.

queries

Language: en

Query type:
TrecPmQuery: (namedtuple)
  1. query_id: str
  2. disease: str
  3. gene: str
  4. demographic: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2018")
for query in dataset.queries_iter():
    query # namedtuple<query_id, disease, gene, demographic>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2018 queries
[query_id]    [disease]    [gene]    [demographic]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2018')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2017') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pipeline(dataset.get_topics('disease'))

You can find more details about PyTerrier retrieval here.

docs

Language: en

Note: Uses docs from clinicaltrials/2017

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2018")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2018 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2018')
# Index clinicaltrials/2017
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2017')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.

qrels
Query relevance judgment type:
TrecQrel: (namedtuple)
  1. query_id: str
  2. doc_id: str
  3. relevance: int
  4. iteration: str

Relevance levels

Rel.Definition
0not relevant
1possibly relevant
2definitely relevant

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2017/trec-pm-2018")
for qrel in dataset.qrels_iter():
    qrel # namedtuple<query_id, doc_id, relevance, iteration>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2017/trec-pm-2018 qrels --format tsv
[query_id]    [doc_id]    [relevance]    [iteration]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
from pyterrier.measures import *
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2017/trec-pm-2018')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2017') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pt.Experiment(
    [pipeline],
    dataset.get_topics('disease'),
    dataset.get_qrels(),
    [MAP, nDCG@20]
)

You can find more details about PyTerrier experiments here.

Citation

ir_datasets.bib:

\cite{Roberts2018TrecPm}

Bibtex:

@inproceedings{Roberts2018TrecPm, title={Overview of the TREC 2018 Precision Medicine Track}, author={Kirk Roberts and Dina Demner-Fushman and Ellen M. Voorhees and William R. Hersh and Steven Bedrick and Alexander J. Lazar}, booktitle={TREC}, year={2018} }

"clinicaltrials/2019"

A snapshot of ClinicalTrials.gov from May 2019 for use with the clinicaltrials/2019/trec-pm-2019 Clinical Trials subtask.

docs

Language: en

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2019")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2019 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2019')
# Index clinicaltrials/2019
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2019')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.


"clinicaltrials/2019/trec-pm-2019"

The TREC 2019 Precision Medicine clinical trials subtask.

queries

Language: en

Query type:
TrecPmQuery: (namedtuple)
  1. query_id: str
  2. disease: str
  3. gene: str
  4. demographic: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2019/trec-pm-2019")
for query in dataset.queries_iter():
    query # namedtuple<query_id, disease, gene, demographic>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2019/trec-pm-2019 queries
[query_id]    [disease]    [gene]    [demographic]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2019/trec-pm-2019')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2019') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pipeline(dataset.get_topics('disease'))

You can find more details about PyTerrier retrieval here.

docs

Language: en

Note: Uses docs from clinicaltrials/2019

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2019/trec-pm-2019")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2019/trec-pm-2019 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2019/trec-pm-2019')
# Index clinicaltrials/2019
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2019')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.

qrels
Query relevance judgment type:
TrecQrel: (namedtuple)
  1. query_id: str
  2. doc_id: str
  3. relevance: int
  4. iteration: str

Relevance levels

Rel.Definition
0not relevant
1possibly relevant
2definitely relevant

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2019/trec-pm-2019")
for qrel in dataset.qrels_iter():
    qrel # namedtuple<query_id, doc_id, relevance, iteration>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2019/trec-pm-2019 qrels --format tsv
[query_id]    [doc_id]    [relevance]    [iteration]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
from pyterrier.measures import *
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2019/trec-pm-2019')
index_ref = pt.IndexRef.of('./indices/clinicaltrials_2019') # assumes you have already built an index
pipeline = pt.BatchRetrieve(index_ref, wmodel='BM25')
# (optionally other pipeline components)
pt.Experiment(
    [pipeline],
    dataset.get_topics('disease'),
    dataset.get_qrels(),
    [MAP, nDCG@20]
)

You can find more details about PyTerrier experiments here.

Citation

ir_datasets.bib:

\cite{Roberts2019TrecPm}

Bibtex:

@inproceedings{Roberts2019TrecPm, title={Overview of the TREC 2019 Precision Medicine Track}, author={Kirk Roberts and Dina Demner-Fushman and Ellen Voorhees and William R. Hersh and Steven Bedrick and Alexander J. Lazar and Shubham Pant and Funda Meric-Bernstam}, booktitle={TREC}, year={2019} }

"clinicaltrials/2021"

A snapshot of ClinicalTrials.gov from April 2021 for use with the TREC Clinical Trials 2021 Track.

Queries for the TREC Clinical Trials 2021 Track will be released later.

docs

Language: en

Document type:
ClinicalTrialsDoc: (namedtuple)
  1. doc_id: str
  2. title: str
  3. condition: str
  4. summary: str
  5. detailed_description: str
  6. eligibility: str

Examples:

Python API
import ir_datasets
dataset = ir_datasets.load("clinicaltrials/2021")
for doc in dataset.docs_iter():
    doc # namedtuple<doc_id, title, condition, summary, detailed_description, eligibility>

You can find more details about the Python API here.

CLI
ir_datasets export clinicaltrials/2021 docs
[doc_id]    [title]    [condition]    [summary]    [detailed_description]    [eligibility]
...

You can find more details about the CLI here.

PyTerrier
import pyterrier as pt
pt.init()
dataset = pt.get_dataset('irds:clinicaltrials/2021')
# Index clinicaltrials/2021
indexer = pt.IterDictIndexer('./indices/clinicaltrials_2021')
index_ref = indexer.index(dataset.get_corpus_iter(), fields=['title', 'condition', 'summary', 'detailed_description', 'eligibility'])

You can find more details about PyTerrier indexing here.