Skip to content

linkTCGA() fails with TENxFile error when using full catalog #48

@Eabousam

Description

@Eabousam

Reproducible example


# Load packages
library(imageFeatureTCGA)
library(curatedTCGAData)
library(dplyr)

# Load assays for Kidney Cancer
kidney_mae_all <- curatedTCGAData("KIRC", assays = "*", version = "2.1.1", dry.run = FALSE)
kidney_assays_subset <- c(
  "KIRC_RNASeq2GeneNorm-20160128",
  "KIRC_RPPAArray-20160128",
  "KIRC_mRNAArray-20160128"
)
kidney_mae <- kidney_mae_all[,, which(names(kidney_mae_all) %in% kidney_assays_subset)]

# Get the full catalog
catalog_full <- getCatalog("provgigapath") |>
  dplyr::filter(level == "slide_level", Project.ID == "TCGA-KIRC")
# nrow(catalog_full) is around 500

# use linkTCGA
# This fails
kidney_mae_emb <- linkTCGA(kidney_mae, catalog_full, redownload = FALSE, parallel = FALSE)

# Error message:
# Error in h(simpleError(msg, call)) :
#   error in evaluating the argument 'con' in selecting a method for function 'import':
#   invalid class “TENxFile” object: Path or URL to the file must be valid

# Current Workaround being used
catalog_slice <- catalog_full |> dplyr::slice(1:100)
kidney_mae_emb_works <- linkTCGA(kidney_mae, catalog_slice, redownload = FALSE, parallel = FALSE)
# This succeeds

sessionInfo()
# R version 4.5.1 (2025-06-13), imageFeatureTCGA_1.1.0, curatedTCGAData_1.32.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions