Skip to content

Commit b9dc2db

Browse files
authored
Merge pull request #20 from enriquea/master
Added examples
2 parents 7f0317f + 747cb64 commit b9dc2db

1 file changed

Lines changed: 42 additions & 4 deletions

File tree

README.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ get.dataset.omics(dataset)
4545

4646
```R
4747

48-
library(ddiR)
49-
5048
datasets <- search.DatasetsSummary(query = "NOTCH1")
5149

5250
sink("outfile.txt")
@@ -64,11 +62,50 @@ sink()
6462

6563
```
6664

65+
- Getting the dataset IDs and full link of 20 Genomics studies in Cancer
66+
67+
```R
68+
69+
datasets <- search.DatasetsSummary(query = "Cancer AND Genomics")
70+
71+
for(dataset in datasets@datasets){
72+
dataset = get.DatasetDetail(accession=dataset.id(dataset), database=database(dataset))
73+
print(paste(dataset.id(dataset), get.dataset.link(dataset), sep = ' '))
74+
}
75+
76+
```
77+
78+
- Print the dataset IDs and short description of 20 Proteomics studies for tumor supressor p53
79+
80+
```R
81+
82+
datasets <- search.DatasetsSummary(query = "p53 AND Proteomics")
83+
84+
for(dataset in datasets@datasets){
85+
dataset = get.DatasetDetail(accession=dataset.id(dataset), database=database(dataset))
86+
print(paste(dataset.id(dataset), get.dataset.name(dataset), sep = ' '))
87+
}
88+
89+
```
90+
91+
- Getting Proteomics studies in Heart tissue from PRIDE database
92+
93+
```R
94+
95+
datasets <- search.DatasetsSummary(query = "Heart")
96+
97+
for(dataset in datasets@datasets){
98+
dataset = get.DatasetDetail(accession=dataset.id(dataset), database=database(dataset))
99+
if(database(dataset)=='pride')
100+
print(paste(dataset.id(dataset), get.dataset.tissues(dataset), get.dataset.omics(dataset), sep = ' '))
101+
}
102+
103+
```
104+
67105
- This exmaple shows how retrieve all the metadata similarity scores by using the R-package ddiR.
68106

69107
```R
70108

71-
library(ddiR)
72109
datasets <- search.DatasetsSummary(query = "*:*")
73110
i = 0
74111
sink("outfile.txt")
@@ -86,9 +123,10 @@ for(datasetCount in seq(from = 0, to = datasets@count, by = 100)){
86123
}
87124
}
88125
sink()
126+
89127
```
90128

91-
# Maintainers
129+
### Maintainers
92130

93131
[Yasset Perez-Riverol](https://github.com/ypriverol)
94132
[Ariana Barbera Betancourt](http://github.com/abb44)

0 commit comments

Comments
 (0)