waldronlab / TCGAutils

Toolbox package for organizing and working with TCGA data
https://bioconductor.org/packages/TCGAutils
23 stars 6 forks source link

UUIDtoBarcode Returns Only One Record #26

Closed DarioS closed 5 years ago

DarioS commented 5 years ago

Although the first parameter is id_vector, UUIDtoBarcode seems to be just taking the first element and ignoring all others because the result has only one row.

aliquots <- c("f8c7d038-1182-42d0-8787-b84b5ca57eaf", "b37ea112-340e-4613-8514-d8a8bd47410f", "4a9967bf-444c-4573-a082-121a30be7f3b")
UUIDtoBarcode(aliquots, "aliquot_ids")
          analytes.aliquots.aliquot_id analytes.aliquots.submitter_id
2 f8c7d038-1182-42d0-8787-b84b5ca57eaf   TCGA-UF-A71A-06A-11D-A390-01

Aliquot IDs other than the first are valid and return an answer if they are the only element of id_vector.

UUIDtoBarcode("4a9967bf-444c-4573-a082-121a30be7f3b", "aliquot_ids")
           analytes.aliquots.aliquot_id analytes.aliquots.submitter_id
10 4a9967bf-444c-4573-a082-121a30be7f3b   TCGA-CN-4735-01A-01D-1432-01

I thought about putting UUIDtoBarcode into a loop and passing one ID each time, but the API might block my requests if hundreds were made at the same time. A similar problem has been reported before #24

LiNk-NY commented 5 years ago

Thanks Dario for reporting the issue. My unit tests should be more robust. :sweat_smile:

DarioS commented 5 years ago

This should be ported to the release version of the package because it's a bug and not a new feature.

LiNk-NY commented 5 years ago

Yes, I'm in the process of doing that. Thanks

DarioS commented 5 years ago

Oh, good. I saw the issue was closed but there were no recent modifications to the release branch, so I thought there would never be.