KM analysis: Filtering to One Sample Per Patient
Have you ever noticed this icon in the top corner of a KM plot?
This means that some patients have more than one sample in the plot. This can happen when a patient has both a tumor and normal sample or when a patient has a metastasis that is part of the dataset.
To filter down to one sample per patient, start with your column of data that you wish to perform a KM analysis on. For this example we're going to use IDH1 mutation status in TCGA Lower Grade Glioma.
To start, click the '+Data' button and choose 'Phenotype' and then select 'sample type'. Note that different datasets may call this phenotype data something slightly different. We are just trying to add a column of data that indicates the sample type such as 'Primary Tumor', 'Normal', etc.
We can see here that some patients have both Primary and Recurrent Tumors. To filter out the samples that are 'Recurrent Tumor', type 'primary' into the filter search box.
Next, click the filter icon next to the filter search box. This will create a new filter that is listed in the top row.
Voila! Run your KM analysis by clicking the caret menu at the top of the column and choosing 'Kaplan-Meier plot' It will now only have primary tumor samples in it!