Hi,
I'm learning basic data analysis with R, I'm using RStudio. I have my sequencing data in one file. It contains samples from 3 tissues from 100 individuals. I need to filter out variants within individuals, so that I can see variants unique for each tissue and common between two or all tissues.
My file is one dataset with 116 columns - after filtering variants I would like to keep all the columns. One of these columns is my individual ID (for 130 individuals) and there are separate columns with variants and tissue types.
So far, I understand that I need to create a loop that will filter within each individual by 1. sorting variants 2. apply filtering to variant presence in different tissues, so that in the end I would get: 1. 3 sets of variants unique for each tissue type, 2. 1 set of variants common to all tissue types, 3. 3 sets of variants common between 2 tissue types.
I've tried the VennDiagram package, but it sorts out variants that occur in any other individual in my dataset. I need to look into variants in a single individual.
Does anyone here know how to solve this??
Cheers,
A.
I'm learning basic data analysis with R, I'm using RStudio. I have my sequencing data in one file. It contains samples from 3 tissues from 100 individuals. I need to filter out variants within individuals, so that I can see variants unique for each tissue and common between two or all tissues.
My file is one dataset with 116 columns - after filtering variants I would like to keep all the columns. One of these columns is my individual ID (for 130 individuals) and there are separate columns with variants and tissue types.
So far, I understand that I need to create a loop that will filter within each individual by 1. sorting variants 2. apply filtering to variant presence in different tissues, so that in the end I would get: 1. 3 sets of variants unique for each tissue type, 2. 1 set of variants common to all tissue types, 3. 3 sets of variants common between 2 tissue types.
I've tried the VennDiagram package, but it sorts out variants that occur in any other individual in my dataset. I need to look into variants in a single individual.
Does anyone here know how to solve this??
Cheers,
A.