/gdctools

Python and UNIX CLI utilities to simplify interaction with the NIH/NCI Genomics Data Commons

Primary LanguagePythonOtherNOASSERTION

gdctools

Python and UNIX CLI utilities to simplify search and retrieval of open-access data from the NIH/NCI Genomics Data Commons, and automate tasks that are common to most data-driven science projects. For more information and examples see the pictorial overview, Wiki pages or tests/Makefile. To get started from a Unix command line, simply pip install gdctools or clone the repo and install:

    %  git clone https://github.com/broadinstitute/gdctools
    %  cd gdctools
    %  make install

This should take only a minute or two, and may install requests, fasteners or matplotlib dependencies. *Note that if you are installing to a protected location you may need to preface the make install command with sudo. After this you should be able to easily mirror either harmonized or legacy data directly from the command line

    gdc_mirror --config tests/tcgaSmoketest.cfg

(this is what the make test target does), even for a single patient case

    gdc_mirror --cases TCGA-EE-A3J8

or just one category of data for that patient

    gdc_mirror --cases TCGA-EE-A3J8 --categories "Copy Number Variation"

or perform other operations such as seeing which NIH/NCI programs have exposed data for download

    %  gdc_list programs
    [
      "TCGA", 
      "TARGET"
    ]

or what programs have submitted data (that may not be exposed yet)

    %  gdc_list submission
    [
      "CCLE", 
      "REBC", 
      "TCGA", 
      "TARGET", 
      "CGCI", 
      "CDDP", 
      "ALCHEMIST", 
      "GDC", 
      "Exceptional_Responders", 
      "UAT08", 
      "TRIO", 
      "CPTAC"
    ]

After mirroring you may run gdc_dice on the mirror tree, followed by gdc_loadfile to generate a sample "freeze" list which identifies the data for loading into pipeline execution systems like Firehose or FireCloud. Finally, if you have matplotlib and R installed you may also run the gdc_report tool to generate an HTML samples report (similar to this) that provides an annotated description of the processed data; note that this tool will attempt to automatically install Nozzle if it is not detected within the R installation. As noted earlier, the tests/Makefile provides examples of using the dice, loadfile and report tools. GDCtools has been verified to function properly with multiple Python2 and Python3 versions, and we are grateful for the community contributions in support of this goal.