Hello everyone, I am new in this field. I have used STAR and featurecounts followed by DEse2 for my RNAseq analysis. I want to remove X and Y chromosome genes from my bulk seq data. I don't know how to proceed with that. Do I need to remove the genes from the counts after featurecounts or using the Deseq2? I have made a list of X&Y chromosomes Gene_id using Biomart. Can I remove the Gene_id's of X and Y chromosomes from my count data? Will this be the correct way of doing it? Any help is appreciated. Thanks
Question: How to remove X & Y chromosome genes from RNAseq data
0
archit22684 • 0 wrote:
2
Barry Digby • 630 wrote:
Yep you're pretty much there.
Assuming counts
is your counts matrix containing all samples, something to the effect of:
subset <- counts[which(rownames(counts) != biomart_list$Gene),]
edit: !=
must be dataframes of equal length
Hi Barry, I am getting a warning "Warning message: In rownames(countdata) != X_Y$Geneid : longer object length is not a multiple of shorter object length".
1
Try !(rownames(counts) %in% X_Y$Geneid)
. I don't see how !=
would work comparing 2 vectors of incompatible sizes.
My bad, I'm used to biomaRt df's derived from count rownames. Feel free to change yours to an answer and ill remove mine. .
Hi Barry, sorry for delay in replying. I tried !(rownames(countdata) %in% X_Y$Geneid)
.
I am not getting any error but it is also not removing Geneid.
What is the output to:
head(rownames(countdata))
head(X_Y$Geneid)
Please log in to add an answer.
Use of this site constitutes acceptance of our User
Agreement
and Privacy
Policy.
Powered by Biostar
version 2.3.0
Traffic: 2656 users visited in the last hour