VCF and image files available for the same patients¶
I'm a cancer researcher, and I have a hypothesis that I can correlate a specific mutation with a specific kidney cancer morphology. I'm looking for subjects that have kidney cancer with both CT and sequencing data that I might be able to incorporate into my research.
First, decide what column to search. I'm looking for columns that have to do with file type:
columns(table="file")
Loading ITables v2.8.1 from the init_notebook_mode cell...
(need help?)
|
column_values("file_type")
Loading ITables v2.8.1 from the init_notebook_mode cell...
(need help?)
|
CT image storage and annotated somatic mutation files should give me the data I want. Now to find a column to seperate out the kidney cancer subjects:
columns()
Loading ITables v2.8.1 from the init_notebook_mode cell...
(need help?)
|
column_values("anatomic_site", filters= "*kidney*" )
Loading ITables v2.8.1 from the init_notebook_mode cell...
(need help?)
|
Looks like there are lots of kidney patients, however kidney has been specified a few different ways, so I'll have to search with a wildcard. This makes my three search parameters:
'anatomic_site = *kidney'(the*means match anything that ends with kidney no matter what words or letters are after it.)'file_type = CT Image Storage''file_type = Annotated Somatic Mutation'
But if I run a search with file_type in it twice, it will only give me back files that are both a CT Image Storage AND an Annotated Somatic Mutation. No one file can be both of those things, so what I will really want is to do two searches, one for kidney and CT:
get_subject_data(match_all=['anatomic_site = *kidney', 'file_type = CT Image Storage'])
and one for kidney and mutation:
get_subject_data(match_all=['anatomic_site = *kidney', 'file_type = Annotated Somatic Mutation'])
and then combine the results.
I want subject data, so I'll search by subject, and I'll add the file data on so I know where to get the files. Again * means "anything" so doing add_columns = "file.*" will add all the file columns.
So all together we have
Get the results for each search and save them in variables:
CT = get_subject_data(match_all=['anatomic_site = *kidney', 'file_type = CT Image Storage'], add_columns="file.*")
mutation = get_subject_data(match_all=['anatomic_site = *kidney', 'file_type = Annotated Somatic Mutation'], add_columns="file.*")
get the intersection of the results:
CTmutation = intersect_subject_results(CT, mutation)
CTmutation
Loading ITables v2.8.1 from the init_notebook_mode cell...
(need help?)
|