Skip to content

Instantly share code, notes, and snippets.

View AmyOlex's full-sized avatar

Amy Olex AmyOlex

  • Virginia Commonwealth University
  • Richmond, VA
View GitHub Profile
@AmyOlex
AmyOlex / GDC_Payload_UUID-to-TCGABarcode
Created April 25, 2017 19:52
Example Payload file to convert a file UUID to the corresponding TCGA Barcode. This example was obtained from lwaldron at https://github.com/waldronlab/TCGAutils/issues/4
{
"filters":{
"op":"in",
"content":{
"field":"files.file_id",
"value":[
"0001801b-54b0-4551-8d7a-d66fb59429bf",
"0001801b-54b0-4551-8d7a-d66fb59429bf",
"0001801b-54b0-4551-8d7a-d66fb59429bf",
"002c67f2-ff52-4246-9d65-a3f69df6789e"
@AmyOlex
AmyOlex / Postman API Call Examples
Created April 20, 2017 19:58
Example URLs entered into Postman to retrieve information about GDC data files.
URL for a BRCA BAM File: https://gdc-api.nci.nih.gov/files/7661179f-df6c-4a57-adca-224b62d98348?pretty=true&fields=file_id,file_name,downstream_analyses.output_files.file_name,downstream_analyses.output_files.file_id,downstream_analyses.workflow_type,analysis.metadata.read_groups.target_capture_kit_name,analysis.metadata.read_groups.sequencing_center,analysis.metadata.read_groups.library_preparation_kit_name,cases.case_id
This returns JSON output that includes the Target Capture Kit
URL for a downstream VCF File: https://gdc-api.nci.nih.gov/files/001f8fe1-444d-446b-b324-081e5f45e22f?pretty=true&fields=file_id,file_name,downstream_analyses.output_files.file_name,downstream_analyses.output_files.file_id,downstream_analyses.workflow_type,analysis.metadata.read_groups.target_capture_kit_name,analysis.metadata.read_groups.sequencing_center,analysis.metadata.read_groups.library_preparation_kit_name,cases.case_id
This return JSON output for the VCF file. This output does NOT include the Target C
@AmyOlex
AmyOlex / submit_payload_file_to_GDC_API
Created April 20, 2017 19:41
Command line that posts the Payload file to the GDC API
curl --request POST --header "Content-Type: application/json" --data @Payload.txt 'https://gdc-api.nci.nih.gov/files'
@AmyOlex
AmyOlex / get_file_meta_data
Created April 18, 2017 17:21
Example Payload file for searching and filtering GDC via the API using a list of file UUIDs.
{
"filters":{
"op":"and",
"content":[
{
"op":"in",
"content":{
"field":"files.file_id",
"value":[
"af5085c1-5b4e-4b88-9f5f-3c049cdd981f",
@AmyOlex
AmyOlex / get_gdc_data_mappings
Created April 18, 2017 17:17
GDC API call to obtain all data field mappings in the GDC database. Use these commands when you are looking for an available field to search on.
## Just enter the following into the terminal
## The API call to get all mappings for the files endpoint
>> curl https://gdc-api.nci.nih.gov/files/_mapping
## The API call to get all mappings for the cases endpoint
>> curl https://gdc-api.nci.nih.gov/cases/_mapping
## The API call to get all mappings for the projects endpoint
>> curl https://gdc-api.nci.nih.gov/projects/_mapping
@AmyOlex
AmyOlex / jitter_boxplot_example.R
Last active March 1, 2017 14:35
Boxplots with Jitter
## Amy Olex
## 2/28/17
## This code came from my script localted at /Users/alolex/Desktop/CCTR/Data/ChuckHarrell_BrainMetastasis_12-2016/SigDEG_Analysis_WHIM2-WHIM30-PT52-HCI10_2-28-17.R
## I don't import the data here in this gist, so it is not runnable.
## The "data2" object is a data.frame with genes as rows (40 genes) and cell types as columns (5 cell types).
library("gplots")
library("plyr")
##### IMPORT DATA HERE TO CREATE data2 MATRIX #######