Skip to content

Commit

Permalink
update code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Jun 18, 2024
1 parent 8860991 commit 556e470
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/components/CodeSnippet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
{
label: "gemma.R",
language: "r",
instructions: `Install the [gemma.R](https://github.com/PavlidisLab/gemma.R) package from GitHub and run the following code in an R console:`
instructions: `Install the [gemma.R](https://bioconductor.org/packages/release/bioc/html/gemma.R.html) package from GitHub and run the following code in an R console:`
},
{
label: "curl",
Expand Down Expand Up @@ -142,19 +142,11 @@ export default {
if (sort !== undefined) {
queryGemmapy.push(`, sort=${this.escapePythonString(sort)}`);
}
queryGemmapy.push(", offset=offset, limit=limit)");
queryGemmapy.unshift(`import gemmapy\n` +
`api_instance = gemmapy.GemmaPy()\n` +
`all_datasets = []\n` +
`limit = ${MAX_DATASETS}\n` +
`for offset in range(0, ${this.totalNumberOfExpressionExperiments}, limit):\n` +
`\tapi_response = api_instance.get_datasets_by_ids([], `);
queryGemmapy.push(`)\n` +
`\tif api_response.data:\n` +
`\t\tall_datasets.extend(api_response.data)\n` +
`\telse:\n` +
`\t\tbreak`);
`api = gemmapy.GemmaPy()\n` +
`data = api.get_all_pages(api.get_datasets,`);
queryGemmapy.push(`)\n`)
}
tabs[0].content = queryGemmapy.join("");
Expand All @@ -173,7 +165,7 @@ export default {
if (sort !== undefined) {
queryGemmaR.push(`, sort = ${this.escapeRString(sort)}`);
}
queryGemmaR.unshift(`devtools::install_github("PavlidisLab/gemma.R")\n` +
queryGemmaR.unshift(`BiocManager::install("gemma.R")\n` +
`library(gemma.R)\n` +
`library(dplyr)\n` +
`data <- get_datasets(`);
Expand Down

0 comments on commit 556e470

Please sign in to comment.