Hi,
I want to extract Tissue and diagnostic slides images from TCGA. I want to obtain normal slides, tissue slides and diagnostic slides labelled separately. Using data retrieving tools, I get svs format images and I have to then extract images from it for which I cannot find a code and also, the images coming out are not labelled for the sample type.
I tried using this code in R:
query <- GDCquery(project = "TCGA-CHOL",
data.category = "Biospecimen",
data.type = "Slide Image",
data.format = "SVS",
experimental.strategy="Tissue Slide",
sample.type ="Primary Tumor")
but sample.type
gives me the error
~ Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
OR
Error in checkBarcodeDefinition(sample.type) :
Primary Solid Tumor was not found. Please select a difinition from the table above
Please explain to me how can I obtain the 3 three types of images- diagnostic, normal and tissue for each patient of TCGA-CHOL and how do I open them for analysis in R or Python and the image formats used for the same.
Thank you.
When I looked for the parameters to use for image data from TCGA-CHOL (as outlined here: https://rdrr.io/bioc/TCGAbiolinks/f/vignettes/query.Rmd), I saw that there is no
data.format
forSlide Image
:So I omitted a few params from your query to get the command to run to completion:
This is an entirely different topic. Processing SVS images in R is not a straightforward task AFAIK, you might need proprietary software from Aperio.
So what I have to do it is separately download all of these svs files and then convert them to jpg/png/tif formats separately and then run my analysis on them, there isn't a shorter way?
I don't really know. I don't think you can "convert" an SVS image to other formats without losing quite a bit of information content.
I can not speak for tcgabiolinks, but for slides in general
Aspera is a file transfer application. Are you referring to Aperio?
Oh, you are right. I had a typo. It should be Aperio Image Scope. Btw, I don't like SVS format. This format is abused by different companies adding their own touch to it. Sometimes I got surprised on why one SVS is so different from another SVS.
I think you're in a vastly better place to help OP. I've briefly tried to process SVS files with R and failed, maybe you can give them pointers on how to approach the problem?
My colleagues use python pillow package.