waldronlab / waldronlab/imageFeatureTCGA

Convert provgigapath embeddings to parquet by slide/tile

Open
#32 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
R
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The current prov-gigapath files are formatted as CSV files with embedded text representations of python classes. This format makes the data very difficult to access and use.

Proposal

Convert all the tile-level and slide-level prov-gigapath to a parquet-format file with one or more metadata columns (slide id, tile location, image name) and one column with the actual tensor data (14 x 768 array).

Advantages

  • Much easier data management: one file for tile-level data and one for slide-level data gets ALL of TCGA.
  • Dataset becomes more AI-ready
  • Language-agnostic representation (any language can read parquet files)
  • Data access code becomes trivial (read parquet file)

Pseudocode

  1. Read in embeddings for each per-sample CSV file
  2. Develop metadata for each CSV file and collect in data.frame
  3. Convert each CSV file embedding to a matrix and include as a new column in the dataframe from step 2.
  4. Write out full dataframe as parquet file

Result

  1. tile-level provgigapath embeddings in a parquet file
  2. slide-level provgigapath embeddings in a parquet file

Fully language-agnostic and AI/ML ready...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the per-sample prov-gigapath CSV inputs and the existing code that reads their embeddings. Verify how tile-level and slide-level metadata and the 14 x 768 arrays are represented before choosing the parquet layout. Done means one tile-level and one slide-level parquet output containing the requested metadata and tensor data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, r
Domain
data-engineering, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.