Filter out genes less than 10 count from DESeq2 does not work
1
1
Entering edit mode
2.9 years ago
synat.keam ▴ 100

Hi All,

The following code chunks, that is used to filter out genes less than 10 counts did not work at all because genes with less than 10 is still in the count matrix after running those commands. Anyone has any suggestion or could spot what was wrong there

> ## Create DESeq2 object ============================================
> 
> dds <- DESeqDataSetFromMatrix(countData = Raw.Count,
>                                   colData = Phenotype,
>                                   design = ~ Group)
> 
> 
> ## Estimate size factor ===========
> 
> dds <- estimateSizeFactors(dds)
> 
> ## Prefiltering: not necessary for DESeq, but good to reduce memory size and incrase speed of transformation =========
> 
> keep <- rowSums(counts(dds)) >= 10
> 
> dds <- dds[keep,]
> 
> ## print size factor ===========
> 
> sizeFactors(dds)
> 
> ## Normalized count 
> 
> normalized_counts <- counts(dds, normalized=TRUE)
> 
> dim(normalized_counts)
> 
> ## Write the csv file ==================
> 
> write.csv(normalized_counts, file="normalized_count.csv")

Thanks,

Synat

DESeq2 • 1.9k views
ADD COMMENT
0
Entering edit mode
2.9 years ago
jcn ▴ 30

try:

keep <- rowSums(counts(dds) >= 10)

instead of

keep <- rowSums(counts(dds)) >= 10

ADD COMMENT
1
Entering edit mode

HI jcn, thank for your help. However, it does not work.

ADD REPLY
1
Entering edit mode

No one can help you more if all you're going to say is "it does not work".

ADD REPLY
0
Entering edit mode

Sorry Admin if my response was inappropriate. please accept my apology... I guessed the count matrix i got after running those commands from DESeq2 vignette were normalized counts, not a raw count that was why I still saw lot of value less than 10 in there.

Regards,

synat

ADD REPLY

Login before adding your answer.

Traffic: 1951 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