Making GenomicDataCommons less daunting to use for the average user
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
Review the existing vignette and the query/result entry points mentioned here, including files(), select(), and results_all(), alongside the nested result structure in the issue. Add clear examples showing how suitable query results can be represented as data frames and explain when multiple queries and joins are needed.
索引モデルが issue の本文から書いたものです。
説明
GenomicDataCommons is a very powerful library and can query pretty much anything at the GDC, though many users prefer other libraries like e.g.,TCGAbiolinks because the GenomicDataCommons query results data structure, a deeply nested list of recursive lists of data frames of lists (an R representation of JSON), can be quite daunting for the average user to work with.
Users generally want to get and look at data frames. While all query results cannot easily be transformed into a single data frame, many can. It would help users a lot to show how to do this.
I use rrapply to recursively alter anything I need inside the query results data structure (which is a nice library made for dealing with things like GenomicDataCommons recursive data structures), then make a data frame like e.g.:
stopifnot(GenomicDataCommons::status()$status == "OK")
gdc_query <-
files() %>%
GenomicDataCommons::filter(
cases.project.project_id %in% project_ids
& cases.samples.sample_type %in% sample_types
& analysis.workflow_type == workflow_type
) %>%
GenomicDataCommons::select(c(
"file_name",
"analysis.workflow_type",
"cases.project.project_id",
"cases.case_id",
"cases.submitter_id",
"cases.samples.sample_id",
"cases.samples.submitter_id",
"cases.samples.sample_type",
"cases.samples.is_ffpe",
"cases.samples.portions.is_ffpe",
"cases.samples.portions.analytes.aliquots.aliquot_id",
"cases.samples.portions.analytes.aliquots.submitter_id"
))
gdc_results <- results_all(gdc_query)
gdc_results <- rrapply(
gdc_results, f=function(x) NA, condition=is.null, how="replace"
)
gdc_df <- data.frame(
file_uuid=gdc_results$file_id,
file_name=gdc_results$file_name,
workflow_type=gdc_results$analysis$workflow_type,
project_id=vapply(
sapply(gdc_results$cases, `[[`, "project"), `[`, "project_id"
),
case_uuid=sapply(gdc_results$cases, `[[`, "case_id"),
case_submitter_id=sapply(gdc_results$cases, `[[`, "submitter_id"),
sample_uuid=sapply(
sapply(gdc_results$cases, `[[`, "samples"), `[[`, "sample_id"
),
sample_submitter_id=sapply(
sapply(gdc_results$cases, `[[`, "samples"), `[[`, "submitter_id"
),
sample_type=sapply(
sapply(gdc_results$cases, `[[`, "samples"), `[[`, "sample_type"
),
sample_is_ffpe=sapply(
sapply(gdc_results$cases, `[[`, "samples"), `[[`, "is_ffpe"
),
portion_is_ffpe=sapply(
sapply(
sapply(
gdc_results$cases, `[[`, "samples"
), `[[`, "portions"
), `[[`, "is_ffpe"
),
aliquot_uuid=sapply(
sapply(
sapply(
sapply(
sapply(
gdc_results$cases, `[[`, "samples"
), `[[`, "portions"
), `[[`, "analytes"
), `[[`, "aliquots"
), `[[`, "aliquot_id"
),
aliquot_submitter_id=sapply(
sapply(
sapply(
sapply(
sapply(
gdc_results$cases, `[[`, "samples"
), `[[`, "portions"
), `[[`, "analytes"
), `[[`, "aliquots"
), `[[`, "submitter_id"
),
row.names=gdc_results$file_id,
stringsAsFactors=FALSE
)
For single query results that cannot be easily transformed back to a data frame using the above method (due to GDC DB key relationship structure), I make multiple queries, transform them to individual data frames like above, and then do joining of the data frames to get a single one the way I need it.
Anyway, this is probably a bit challenging for the average user? Maybe there is an easier way to work with GenomicDataCommons that I've totally missed. But if not, and what I'm doing is generally a good way, maybe it's worth adding to the vignette some examples of how to make data frames from query results.
- 主要言語
- R
- スター
- 90
- フォーク
- 25
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Bioconductor/GenomicDataCommons のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
-
add blurb regarding potential conflicts when loading dplyr再び着手できるかも @bd4everyone が 611 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
Bioconductor/GenomicDataCommons#118 · コメント 1 件 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Bioconductor/GenomicDataCommons#97 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
Add TSV return format support再び着手できるかも @seandavi が 2455 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
Bioconductor/GenomicDataCommons#75 · 担当者 1 名 ·
Bioconductor/GenomicDataCommons の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mlr-org/mlr3cmprsk#42 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
tidymodels/orbital#192 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
mitchelloharawild/ggtime#38 ·