ID-translation: Translate study identifiers from barcode to UUID and vice...

Description Usage Arguments Details Value Author(s) Examples

Description

These functions allow the user to enter a character vector of identifiers and use the GDC API to translate from TCGA barcodes to Universally Unique Identifiers (UUID) and vice versa. These relationships are not one-to-one. Therefore, a data.frame is returned for all inputs. The UUID to TCGA barcode translation only applies to file and case UUIDs. Two-way UUID translation is available from 'file_id' to 'case_id' and vice versa. Please double check any results before using these features for analysis. Case / submitter identifiers are translated by default, see the id_type argument for details. All identifiers are converted to lower case.

Usage

1
2
3
4
5
6
7
8
9
UUIDtoBarcode(id_vector, id_type = c("case_id", "file_id"),
  end_point = "cases", legacy = FALSE)

UUIDtoUUID(id_vector, to_type = c("case_id", "file_id"),
  legacy = FALSE)

barcodeToUUID(barcodes, legacy = FALSE)

filenameToBarcode(filenames, legacy = FALSE)

Arguments

id_vector

A character vector of UUIDs corresponding to either files or cases (default assumes case_ids)

id_type

Either case_id or file_id indicating the type of id_vector entered (default "case_id")

end_point

The cutoff point of the barcode that should be returned, only applies to file_id type queries. See details for options.

legacy

(logical default FALSE) whether to search the legacy archives

to_type

The desired UUID type to obtain, can either be "case_id" or "file_id"

barcodes

A character vector of TCGA barcodes

filenames

A character vector of filenames obtained from the GenomicDataCommons

Details

The end_point options reflect endpoints in the Genomic Data Commons API. These are summarized as follows:

Only these keywords need to be used to target the specific barcode endpoint. These endpoints only apply to "file_id" type translations to TCGA barcodes (see id_type argument).

Value

A data.frame of TCGA barcode identifiers and UUIDs

Author(s)

Sean Davis, M. Ramos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Translate UUIDs >> TCGA Barcode

uuids <- c("0001801b-54b0-4551-8d7a-d66fb59429bf",
"002c67f2-ff52-4246-9d65-a3f69df6789e",
"003143c8-bbbf-46b9-a96f-f58530f4bb82")

UUIDtoBarcode(uuids, id_type = "file_id", end_point = "sample")

UUIDtoBarcode("ae55b2d3-62a1-419e-9f9a-5ddfac356db4", id_type = "case_id")

## Translate file UUIDs >> case UUIDs

uuids <- c("0001801b-54b0-4551-8d7a-d66fb59429bf",
"002c67f2-ff52-4246-9d65-a3f69df6789e",
"003143c8-bbbf-46b9-a96f-f58530f4bb82")

UUIDtoUUID(uuids)

## Translate TCGA Barcode >> UUIDs

fullBarcodes <- c("TCGA-B0-5117-11A-01D-1421-08",
"TCGA-B0-5094-11A-01D-1421-08",
"TCGA-E9-A295-10A-01D-A16D-09")

sample_ids <- TCGAbarcode(fullBarcodes, sample = TRUE)

barcodeToUUID(sample_ids)

participant_ids <- c("TCGA-CK-4948", "TCGA-D1-A17N",
"TCGA-4V-A9QX", "TCGA-4V-A9QM")

barcodeToUUID(participant_ids)

library(GenomicDataCommons)

fquery <- files() %>%
    filter(~ cases.project.project_id == "TCGA-COAD" &
        data_category == "Copy Number Variation" &
        data_type == "Copy Number Segment")

fnames <- results(fquery)$file_name[1:6]

filenameToBarcode(fnames)

waldronlab/BiocInterfaces documentation built on Nov. 16, 2018, 1:19 a.m.