3
$\begingroup$

I want to compare RNA-Seq datasets obtained from the TCGA to investigate how my gene of interest is implicated in different types of cancer.

I'm trying to download the data from the GDC Data Portal (https://portal.gdc.cancer.gov), but it is not user-friendly.

Can somebody give me some initial directions? I found a bioconductor package that facilitates access to the TCGA (https://bioconductor.org/packages/release/bioc/html/TCGAbiolinks.html), but first of all, I would like to understand how the files are organized, the nomenclature and how to inspect them.

thank you very much, Fabiano

$\endgroup$
2
  • $\begingroup$ When it comes to user-friendliness, I found the FireBrowse portal (firebrowse.org) much easier to navigate than the GDC one. $\endgroup$
    – vuzun
    Feb 19, 2020 at 11:44
  • $\begingroup$ thank you very much, vuzun. In my opinion, firebrowse is interesting to have some preliminary results, but for a deeper analysis and a high-quality publication TCGAbiolinks is still the best option. $\endgroup$
    – FPS
    Feb 20, 2020 at 5:14

2 Answers 2

3
$\begingroup$

The GDC API user guide (https://docs.gdc.cancer.gov/API/PDF/API_UG.pdf) provides some guidance on the structure of GDC data. So for getting RNA-Seq data from GDC, you would provide this filter to get the 551 text files with workflow_type set as "HTSeq - FPKM-UQ" and "TCGA-LUSC" for the project. There are other workflow types as well:

cases.project.program.name in ["TCGA"]
and cases.project.project_id in ["TCGA-LUSC"]
and files.access in ["open"]
and files.analysis.workflow_type in ["HTSeq - FPKM-UQ"]
and files.data_format in ["txt"]
and files.data_type in ["Gene Expression Quantification"]
and files.experimental_strategy in ["RNA-Seq"]

(You don’t need all those filters to get the 551 files; I included them to show what is available.) The txt files are returned as gzipped tar files that hold text files with rows of the form:

ENSG00000158486.12 5341.21601153

The above filters provide all the FPKM-UQ files for TCGA-LUSC. If you wanted to just get the data for normal samples as controls, that would require filtering on sample type as well, adding in the additional filter:

and cases.samples.sample_type in [“solid tissue normal”]

That will return 49 files. If you instead wished to get only the tumor files, the additional filter would instead be:

and cases.samples.sample_type in [“primary tumor”] 

and that returns 502 files. Note that there are several different sample types for tumor and normal tissues; those just happen to be the ones used here. (Note that if you are using the GDC Repository portal, adding that additional filter requires you to select “Add a Case/Biospecimen Filter” on the “Cases” filter tab.)

Since GDC is part of the NCI Cancer Research Data Commons (CRDC), instead of downloading the data, you can actually work with it in the cloud using the various CRDC Cloud Resources such as the ISB-CGC: https://www.isb-cgc.org/. In fact, all the RNA-Seq data for TCGA is in an ISB-CGC Google BigQuery table: (https://console.cloud.google.com/bigquery?p=isb-cgc&d=TCGA_hg38_data_v0&t=RNAseq_Gene_Expression&page=table) And the above count data can be pulled using the query:

SELECT HTSeq__FPKM_UQ
FROM `isb-cgc.TCGA_hg38_data_v0.RNAseq_Gene_Expression`
WHERE Ensembl_gene_id_v = "ENSG00000158486.12" AND project_short_name = "TCGA-LUSC"

If you want to discriminate between normal and tumor expression levels, the ISB-CGC BQ tables make it pretty easy to tag the expression values with the type of tissue involved. The sample type can be assigned by joining the previous query with the biospecimen table:

WITH bio as (
SELECT sample_barcode, sample_type_name
FROM `isb-cgc.TCGA_bioclin_v0.Biospecimen`
),
expr as (SELECT sample_barcode, HTSeq__FPKM_UQ
FROM `isb-cgc.TCGA_hg38_data_v0.RNAseq_Gene_Expression`
WHERE Ensembl_gene_id_v = "ENSG00000158486.12" AND project_short_name = "TCGA-LUSC")
SELECT bio.sample_type_name, expr.HTSeq__FPKM_UQ
FROM expr
JOIN bio
ON bio.sample_barcode = expr.sample_barcode

The GDC has listed some of the available sample types on this page: https://gdc.cancer.gov/resources-tcga-users/tcga-code-tables/sample-type-codes Also, BigQuery has a user interface that makes exploring data sets and writing queries easy, but you need to log in with a Google ID, so the ISB-CGC has a BigQuery Table Search (https://isb-cgc.appspot.com/bq_meta_search/) that allows you to explore the available tables without logging in. If you want to run queries, Google offers a free tier that you can use to try things out and run small jobs (https://cloud.google.com/free/) and ISB-CGC offers free credits too. ISB-CGC also has examples of working in R with BigQuery within the Community Notebook Repository (https://isb-cancer-genomics-cloud.readthedocs.io/en/latest/sections/HowTos.html). A few useful notebooks would be 'How do I create cohorts of patients?', 'How do I plot a heatmap using data in BigQuery?', and 'How do I get started fast?'.

$\endgroup$
6
  • $\begingroup$ thank you very much for your great feedback, Lauren. It seems an excellent option to work in the cloud. The only problem is that I only know how to program in R. $\endgroup$
    – FPS
    Feb 20, 2020 at 22:05
  • $\begingroup$ and a little in Bash.. $\endgroup$
    – FPS
    Feb 20, 2020 at 22:19
  • 1
    $\begingroup$ Yeah, writing SQL can take some getting used to, but you can do quite a bit of stuff with simple queries. I added some more information to the answer for working in R with BigQuery. $\endgroup$
    – Lauren H.
    Feb 21, 2020 at 23:18
  • $\begingroup$ many thanks, Lauren. great answers! $\endgroup$
    – FPS
    Feb 22, 2020 at 7:03
  • 1
    $\begingroup$ The tissue type labels are in the biospecimen table. I updated the answer to include a query for joining the biospecimen table with the RNA sequencing table. Also, I changed the original project ID from TCGA-OV to TCGA-LUSC in the answer, since it turns out that TCGA-OV has no RNA-Seq data for normal samples. $\endgroup$
    – Lauren H.
    Feb 29, 2020 at 1:21
0
$\begingroup$

I find UCSC Xena to be well-organized and easy to use: https://xenabrowser.net/datapages/

Plain text files that are clearly labeled for all TCGA data (that is not protected).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.