Recent Releases of clintrialx
clintrialx - clintrialx 0.1.0
ClinTrialX
The goal of {clintrialx} is to fetch clinical trials data from freely
available registries. Currently, it supports querying the
ClinicalTrials.gov registry using its V2 API and
CTTI AACT (Public Access to Aggregate Content of ClinicalTrials.gov).
Installation
You can install this package from GitHub with:
``` r
install.packages("devtools")
devtools::install_github("ineelhere/clintrialx") ```
Check installation
r
library(clintrialx)
Setup AACT account
Only if you wish to use AACT as a source for the data
Sign up and create an account. It’s free.
The
usernameandpasswordwill be needed to fetch data using this package.Save it in a
.Renvironfile, for example-
r
user = "random_name"
password = "random_password"
Now that the file is created, load the variable with the command
readRenviron("path/to/.Renviron)You’re all set!
Query the ClinicalTrials.gov Registry
Based on NCT IDs
Fetch one or multiple trial records based on NCT IDs. You can opt to fetch some specific fields or all fields available at source (default).
r
library(clintrialx)
ctg_get_nct(c("NCT02967965", "NCT04000165", "NCT01007279", "NCT02376244", "NCT01179776"),
fields = c("NCT Number", "Study Title", "Study Status", "Sponsor"))
Based on fileds
Supports filtering by condition, location, title keywords, intervention, and overall status.
r
ctg_get_fields(
condition = "Cancer",
location = "Kolkata",
title = NULL,
intervention = "Drug",
status = c("ACTIVE_NOT_RECRUITING", "RECRUITING"),
page_size = 10
)
Based on fileds - Bulk download
Download all available data for your query. No limits!
Supports filtering by condition, location, title keywords, intervention, and overall status.
r
df <- ctg_bulk_fetch(location="india")
Query the CTTI AACT
Run Custom Queries
``` r
Set environment variables for database credentials in .Renviron and load it
readRenviron(".Renviron")
Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
Run a custom query
query <- "SELECT nctid, source, enrollment, overallstatus FROM studies LIMIT 5;" results <- aactcustomquery(con, query)
Print the results
print(results) ```
Trial Data HTML Reports
Currently works for data from ClinicalTrials.Gov
``` r
first get the data in a R dataframe
myclinicaltrialdata <- ctgbulk_fetch(condition="cancer")
now pass it to the reports function
ctgdatareport( ctgdata = myclinicaltrialdata, title = "Clinical Trials Analysis", author = "Indra", outputfile = "reports/clinicaltrials.html", theme = "flatly", colorpalette = c("#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F", "#EDC948"), includedataquality = TRUE, includeinteractiveplots = TRUE, customfooter = "Proprietary report generated by SomeGreatOrg Inc." ) ```
Check the path reports/clinical_trials.html on your local. It will
have the html report file.
Cool stuff - It also has the codes to the plots!
Data Sources
You can fetch version information directly from the package:
r
version_info(source = "clinicaltrials.gov")
Get Involved
🚀 Ready to contribute? Lets makeclintrialx even better. Check out
the contributing
guidelines
to get started.
💬 Questions or Feedback? Feel free to open an issue on GitHub Issues page.
🌟 Enjoying clintrialx? Please consider giving it a star on
GitHub! Your support helps
this project grow and improve.
More updates to come. Happy coding! 🎉
- R
Published by ineelhere over 1 year ago
clintrialx - clintrialx 0.1.0
ClinTrialX
The goal of {clintrialx} is to fetch clinical trials data from freely
available registries. Currently, it supports querying the
ClinicalTrials.gov registry using its V2 API and
CTTI AACT (Public Access to Aggregate Content of ClinicalTrials.gov).
Installation
You can install this package from GitHub with:
``` r
install.packages("devtools")
devtools::install_github("ineelhere/clintrialx") ```
Check installation
r
library(clintrialx)
Setup AACT account
Only if you wish to use AACT as a source for the data
Sign up and create an account. It’s free.
The
usernameandpasswordwill be needed to fetch data using this package.Save it in a
.Renvironfile, for example-
r
user = "random_name"
password = "random_password"
Now that the file is created, load the variable with the command
readRenviron("path/to/.Renviron)You’re all set!
Query the ClinicalTrials.gov Registry
Based on NCT IDs
Fetch one or multiple trial records based on NCT IDs. You can opt to fetch some specific fields or all fields available at source (default).
r
library(clintrialx)
ctg_get_nct(c("NCT02967965", "NCT04000165", "NCT01007279", "NCT02376244", "NCT01179776"),
fields = c("NCT Number", "Study Title", "Study Status", "Sponsor"))
Based on fileds
Supports filtering by condition, location, title keywords, intervention, and overall status.
r
ctg_get_fields(
condition = "Cancer",
location = "Kolkata",
title = NULL,
intervention = "Drug",
status = c("ACTIVE_NOT_RECRUITING", "RECRUITING"),
page_size = 10
)
Based on fileds - Bulk download
Download all available data for your query. No limits!
Supports filtering by condition, location, title keywords, intervention, and overall status.
r
df <- ctg_bulk_fetch(location="india")
Query the CTTI AACT
Run Custom Queries
``` r
Set environment variables for database credentials in .Renviron and load it
readRenviron(".Renviron")
Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
Run a custom query
query <- "SELECT nctid, source, enrollment, overallstatus FROM studies LIMIT 5;" results <- aactcustomquery(con, query)
Print the results
print(results) ```
Data Sources
You can fetch version information directly from the package:
r
version_info(source = "clinicaltrials.gov")
Get Involved
🚀 Ready to contribute? Lets makeclintrialx even better. Check out
the contributing
guidelines
to get started.
💬 Questions or Feedback? Feel free to open an issue on GitHub Issues page.
🌟 Enjoying clintrialx? Please consider giving it a star on
GitHub! Your support helps
this project grow and improve.
More updates to come. Happy coding! 🎉
- R
Published by ineelhere over 1 year ago
clintrialx - clintrialx 0.1.0
ClinTrialX
The goal of {clintrialx} is to fetch clinical trials data from freely
available registries. Currently, it supports querying the
ClinicalTrials.gov registry using its V2 API and
CTTI AACT (Public Access to Aggregate Content of ClinicalTrials.gov).
Installation
You can install this package from GitHub with:
``` r
install.packages("devtools")
devtools::install_github("ineelhere/clintrialx") ```
Check installation
r
library(clintrialx)
Query the ClinicalTrials.gov Registry
Based on NCT IDs
Fetch one or multiple trial records based on NCT IDs. You can opt to fetch some specific fields or all fields available at source (default).
``` r library(clintrialx)
> Loading required package: httr
> Loading required package: lubridate
>
> Attaching package: 'lubridate'
> The following objects are masked from 'package:base':
>
> date, intersect, setdiff, union
> Loading required package: readr
> Loading required package: dplyr
>
> Attaching package: 'dplyr'
> The following objects are masked from 'package:stats':
>
> filter, lag
> The following objects are masked from 'package:base':
>
> intersect, setdiff, setequal, union
> Loading required package: progress
> Loading required package: RPostgreSQL
> Loading required package: DBI
ctggetnct(c("NCT02967965", "NCT04000165", "NCT01007279", "NCT02376244", "NCT01179776"), fields = c("NCT Number", "Study Title", "Study Status", "Sponsor"))
>
> [=================>--------------------------] 2/5 ( 40%) Fetching
> NCT04000165[=========================>------------------] 3/5 ( 60%) Fetching
> NCT01007279[==================================>---------] 4/5 ( 80%) Fetching
> NCT02376244[============================================] 5/5 (100%) Fetching
> NCT01179776
> # A tibble: 5 × 4
> NCT Number Study Title Study Status Sponsor
>
> 1 NCT02967965 CARdioprotection in Myocardial Infarction ACTIVENOTRE… EZUS-L…
> 2 NCT04000165 A Dose-Finding Study of AG-348 in Sickle … COMPLETED Nation…
> 3 NCT01007279 Rosuvastatin in Preventing Myonecrosis in… COMPLETED Univer…
> 4 NCT02376244 The Health Impact of High Intensity Exerc… COMPLETED Liverp…
> 5 NCT01179776 Ilomedin Treatment for Patients Having Un… COMPLETED Thromb…
```
Based on fileds
Supports filtering by condition, location, title keywords, intervention, and overall status.
``` r ctggetfields( condition = "Cancer", location = "Kolkata", title = NULL, intervention = "Drug", status = c("ACTIVENOTRECRUITING", "RECRUITING"), page_size = 10 )
> The Query matches 82 trial records in the ClinicalTrials.gov records.
> Your query returned 10 trial records.
> # A tibble: 10 × 30
> NCT Number Study Title Study URL Acronym Study Status Brief Summary
>
> 1 NCT01932125 An Intervent… https://cl… ACTIVENOTRE… "This multicen…
> 2 NCT06472076 A Study of B… https://cl… RECRUITING "The goal of t…
> 3 NCT04821622 Study of Tal… https://cl… ACTIVENOTRE… "The purpose o…
> 4 NCT04884360 D9319C00001-… https://cl… MONO-O… RECRUITING "This is a Pha…
> 5 NCT03110562 Bortezomib, … https://cl… BOSTON ACTIVENOTRE… "This Phase 3,…
> 6 NCT04487080 A Study of A… https://cl… MARIPO… ACTIVENOTRE… "The purpose o…
> 7 NCT02763566 A Study of A… https://cl… MONARC… ACTIVENOTRE… "The main purp…
> 8 NCT05687266 Phase III, O… https://cl… AVANZAR RECRUITING "This is a Pha…
> 9 NCT05894239 A Study to E… https://cl… RECRUITING "This study wi…
> 10 NCT05501886 Gedatolisib … https://cl… VIKTOR… RECRUITING "This is a Pha…
> # ℹ 24 more variables: Study Results , Conditions ,
> # Interventions , Primary Outcome Measures ,
Primary Outcome Measures > # Secondary Outcome Measures , Other Outcome Measures ,
Other Outcome Measures > # Sponsor , Collaborators , Sex , Age , Phases ,
> # Enrollment , Funder Type , Study Type ,
Funder Type Study Type > # Study Design , Other IDs , Start Date ,
Other IDs Start Date > # Primary Completion Date , Completion Date , …
Completion Date ```
Query the CTTI AACT
Run Custom Queries
``` r
Set environment variables for database credentials in .Renviron and load it
readRenviron(".Renviron")
Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
Run a custom query
query <- "SELECT nctid, source, enrollment, overallstatus FROM studies LIMIT 5;" results <- aactcustomquery(con, query)
Print the results
print(results)
> nct_id source
> 1 NCT04592120 The University of Texas Health Science Center, Houston
> 2 NCT02079857 NYU Langone Health
> 3 NCT03276312 University of Modena and Reggio Emilia
> 4 NCT06099899 Sun Yat-Sen Memorial Hospital of Sun Yat-Sen University
> 5 NCT01843842 Materia Medica Holding
> enrollment overall_status
> 1 68 ENROLLINGBYINVITATION
> 2 183 COMPLETED
> 3 112 COMPLETED
> 4 20 NOTYETRECRUITING
> 5 306 COMPLETED
```
Data Sources
You can fetch version information directly from the package:
``` r version_info(source = "clinicaltrials.gov")
> API version: 2.0.3
> Timestamp: 2024-07-23 11:12:33
```
Get Involved
🚀 Ready to contribute? We welcome contributions to make
clintrialx even better. Check out our contributing
guidelines
to get started.
💬 Questions or Feedback? Feel free to open an issue on our GitHub Issues page.
🌟 Enjoying clintrialx? Please consider giving us a star on
GitHub! Your support helps us
grow and improve.
More updates to come. Happy coding! 🎉
- R
Published by ineelhere over 1 year ago
clintrialx - clintrialx 0.1.0
ClinTrialX
The goal of {clintrialx} is to fetch clinical trials data from freely
available registries. Currently, it supports the ClinicalTrials.gov
registry using its V2 API.
Installation
You can install this package from GitHub with:
``` r
install.packages("devtools")
devtools::install_github("ineelhere/clintrialx") ```
Check installation
r
library(clintrialx)
Query Data based on NCT IDs
Fetch one or multiple trial records based on NCT IDs. You can opt to fetch some specific fields or all fields available at source (default).
``` r library(clintrialx)
> Loading required package: httr
> Loading required package: lubridate
>
> Attaching package: 'lubridate'
> The following objects are masked from 'package:base':
>
> date, intersect, setdiff, union
> Loading required package: readr
> Loading required package: dplyr
>
> Attaching package: 'dplyr'
> The following objects are masked from 'package:stats':
>
> filter, lag
> The following objects are masked from 'package:base':
>
> intersect, setdiff, setequal, union
> Loading required package: progress
ctggetnct(c("NCT02967965", "NCT04000165", "NCT01007279", "NCT02376244", "NCT01179776"), fields = c("NCT Number", "Study Title", "Study Status", "Sponsor"))
>
> [=================>--------------------------] 2/5 ( 40%) Fetching
> NCT04000165[=========================>------------------] 3/5 ( 60%) Fetching
> NCT01007279[==================================>---------] 4/5 ( 80%) Fetching
> NCT02376244[============================================] 5/5 (100%) Fetching
> NCT01179776
> # A tibble: 5 × 4
> NCT Number Study Title Study Status Sponsor
>
> 1 NCT02967965 CARdioprotection in Myocardial Infarction ACTIVENOTRE… EZUS-L…
> 2 NCT04000165 A Dose-Finding Study of AG-348 in Sickle … COMPLETED Nation…
> 3 NCT01007279 Rosuvastatin in Preventing Myonecrosis in… COMPLETED Univer…
> 4 NCT02376244 The Health Impact of High Intensity Exerc… COMPLETED Liverp…
> 5 NCT01179776 Ilomedin Treatment for Patients Having Un… COMPLETED Thromb…
```
Query Data based on fileds
Supports filtering by condition, location, title keywords, intervention, and overall status.
``` r ctggetfields( condition = "Cancer", location = "Kolkata", title = NULL, intervention = "Drug", status = c("ACTIVENOTRECRUITING", "RECRUITING"), page_size = 10 )
> The Query matches 82 trial records in the ClinicalTrials.gov records.
> Your query returned 10 trial records.
> # A tibble: 10 × 30
> NCT Number Study Title Study URL Acronym Study Status Brief Summary
>
> 1 NCT05348876 A Study to L… https://cl… RECRUITING "Researchers a…
> 2 NCT05952557 An Adjuvant … https://cl… CAMBRI… RECRUITING "This is a Pha…
> 3 NCT05687266 Phase III, O… https://cl… AVANZAR RECRUITING "This is a Pha…
> 4 NCT02763566 A Study of A… https://cl… MONARC… ACTIVENOTRE… "The main purp…
> 5 NCT04821622 Study of Tal… https://cl… ACTIVENOTRE… "The purpose o…
> 6 NCT03875235 Durvalumab o… https://cl… TOPAZ-1 ACTIVENOTRE… "Durvalumab or…
> 7 NCT03110562 Bortezomib, … https://cl… BOSTON ACTIVENOTRE… "This Phase 3,…
> 8 NCT06120491 Saruparib (A… https://cl… EvoPAR… RECRUITING "The intention…
> 9 NCT04884360 D9319C00001-… https://cl… MONO-O… RECRUITING "This is a Pha…
> 10 NCT04873362 A Study Eval… https://cl… Astefa… RECRUITING "This is a Pha…
> # ℹ 24 more variables: Study Results , Conditions ,
> # Interventions , Primary Outcome Measures ,
Primary Outcome Measures > # Secondary Outcome Measures , Other Outcome Measures ,
Other Outcome Measures > # Sponsor , Collaborators , Sex , Age , Phases ,
> # Enrollment , Funder Type , Study Type ,
Funder Type Study Type > # Study Design , Other IDs , Start Date ,
Other IDs Start Date > # Primary Completion Date , Completion Date , …
Completion Date ```
Data Sources
You can fetch version information directly from the package:
``` r version_info(source = "clinicaltrials.gov")
> Clinicaltrials.gov API version: 2.0.3
> Timestamp: 2024-07-19 11:12:14
```
Get Involved
🚀 Ready to contribute? We welcome contributions to make
clintrialx even better. Check out our contributing
guidelines
to get started.
💬 Questions or Feedback? Feel free to open an issue on our GitHub Issues page.
🌟 Enjoying clintrialx? Please consider giving us a star on
GitHub! Your support helps us
grow and improve.
More updates to come. Happy coding! 🎉
- R
Published by ineelhere over 1 year ago