How to filter for counts in different columns
1
0
Entering edit mode
@4dbfec5b
Last seen 22 months 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 • 1.0k views
ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.4k
@swbarnes2-14086
Last seen 6 hours ago
San Diego

Did you import TPM into DESeq? Why?

ADD COMMENT
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.

ADD REPLY

Login before adding your answer.

Traffic: 963 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6