Entering edit mode
HI,
I am working on a R script which contains genes from 2 diffrent tissues. I am searching for DEGs between these tissues but I want to identify the tissue specific ones. So what I want to filter is for the one TPM<10 and for the other TPM>100. The problem is that I have uplodaded my data together so now I want to specify the columns which I want to apply the filtering. For example for the tissue1 I want to apply TPM<10 and for tissue2 TPM>100. How do I specify the columns seperately for each tissue??
Here is what I know for filtering but this filters the entire dataset.
#filter rows with less then 10 counts------------
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
#check----------------
all(rowSums(counts(dds)) >= 10)
Yeah, maybe you could work with the TPM matrices outside of DESeq2.
One suggestion, you could import with tximeta, and then take the
abundance
assay and work with tidybulk.