Search
Question: error in filtering genes with rowVars(gexpr(bg_chrX)) >1
0
13 months ago by
fubeide0
fubeide0 wrote:

Hi,

I'm doing RNA-Seq data analysis following nature protocol paper (Transcript-level expression analysis of RNA-seq experiments with HISAT, StringTie and Ballgown). But after going to step 10 (bg_liver_filt=subset(bg_liver_filt,"rowVars(gexpr(bg_liver_filt))>1",genomesubset=TRUE)), I found some genes in my results with expression of 0 in all samples. just like this:

Ar.10265 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Ar.10715 0.180575 0.000000 0.160167 0.000000 0.000000 0.000000
Ar.10726 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Ar.10727 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

(got by liver_gene_expr=gexpr(bg_liver_filt))

So, I think their must be something wrong with subset .........

Thanks for any help.

Beide

modified 8 months ago by importantrubbish0 • written 13 months ago by fubeide0
0
13 months ago by
United States
James W. MacDonald47k wrote:

subset is a function from base R that has been around since the dark ages, and used by millions daily. The likelihood that there is a bug in that function is infinintesimal compared to the likelihood that you made a mistake in your code, so I would go back and re-check your code first.

Thank you for your reply. But I think I didn't give enough info about the function subset. The function subset I used is not from base R, but from package ballgown..................

I go back and checked my code and found that after using the filtering criteria (rowVars(gexpr(bg_liver_filt))>1), I got the logic variable of each gene in my ballgown object ,just like:

Ar.10265     Ar.10266

FALSE        FALSE

However,  these genes were still kept in the filtered ballgown object. I don't know why it is so wired..........

0
8 months ago by
importantrubbish0 wrote:

Hi, texpris better then gexpr I think.  The ballgown object contains the information of introns, exons and transcripts , but no genes there.  When filtering data with genes, the row names of the results may not match the right ones.