How to filter for counts in different columns
1
0
Entering edit mode
@4dbfec5b
Last seen 7 hours ago
Netherlands

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)

DESeq2 • 162 views
0
Entering edit mode
swbarnes2 ★ 1.2k
@swbarnes2-14086
Last seen 1 day ago
San Diego

Did you import TPM into DESeq? Why?

0
Entering edit mode

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.