Hi,
Am new to programming and need your help on this:
I have a list of 800 genes/targets for which I need clinical trail study information. How to do it using R program?
e.g., I have done it for one target, but how can I get information on all the list I have at one go?
Code tried is as below:
clinicaltrials_search(query = "PI3K", count = 20)
and got the below output:
score nct_id url title status.text condition_summary intervention_summary last_changed
0.99384 NCT01723800 http://ClinicalTrials.gov/show/NCT01723800 PI3K Inhibitor BKM120, Active, not recruiting Adenocarcinoma of the Lung; Drug: PI3K inhibitor BKM120; May 5, 2015
Carboplatin, and Pemetrexed Bronchoalveolar Cell Lung Cancer; Drug: pemetrexed disodium;
Disodium in Treating Patients Large Cell Lung Cancer; Drug: carboplatin;
With Stage IV Non-Small Recurrent Non-small Cell Lung Cancer; Other: laboratory biomarker analysis;
Cell Lung Cancer Stage IV Non-small Cell Other: pharmacological study;
Lung Cancer Procedure: quality-of-life assessment
0.99273 NCT01540253 http://ClinicalTrials.gov/show/NCT01540253 PI3K Inhibitor BKM120 Active, not recruiting Unspecified Adult Solid Tumor, Drug: PI3K inhibitor BKM120; April 23, 2015
and Docetaxel in Protocol Specific Drug: docetaxel;
Treating Patients Other: pharmacological study;
With Advanced Solid Other: questionnaire administration;
Tumor That is Locally Other: laboratory biomarker analysis
Advanced, Cannot Be
Removed By Surgery,
or Metastatic
Kindly need help.
1 answer
Hi,
Following Sean's suggestion, I wrote you this piece of code.
Please note: in clinicaltrials_search, you set "count" to 20, so it only returns the 20 best matches for each gene. If you want to get more, change the value. :)
Edited
I just read that your gene list has 800 members... therefore it is better if you import if from a file. The following script will work with a txt file (called gene_list.txt), where all the gene identifiers are listed in the first column.
Code:
library(rclinicaltrials)
# Imports the gene list as a char vector
genes = as.character(read.table("gene_list.txt")[, 1])
# Gets the corresponding clinical trials
results = NULL
for(gene in genes){
results = rbind(results, clinicaltrials_search(query = gene, count = 20))
}
print(results)
Log in to answer this question.
Is there any reason a loop over the genes would not suffice?
Dear Davis,
I haven't tried looping yet. Kindly help me with it.
Try using a "for" loop. You'll need to do a little reading to learn how to apply that to your situation.