Question: Filtering very low genes counts across all libraries
0
gravatar for humberto_munoz
3.0 years ago by
humberto_munoz0 wrote:

I am trying to filter low genes counts across all libraries with the suggested commands from edgeR, but an error in the type of comparison appears. Any help will be appreciated.

 

> files <- dir(pattern="*\\.csv$")
> group<- c(1,2,2,3,3,4,4,5,5,6,6,7,7)
> RG<- readDGE(files, group=group, labels=NULL)
> RG$samples
                                    files group lib.size norm.factors
CO21Hour                     CO21Hour.csv     1 11198927            1
CO224Hours                 CO224Hours.csv     2 11294624            1
Light1Hour                 Light1Hour.csv     2 12454641            1
Light24Hours             Light24Hours.csv     3  8668049            1
NaCl1Hour                   NaCl1Hour.csv     3  6550245            1
NaCl24Hours               NaCl24Hours.csv     4 11475584            1
NaNO31Hour                 NaNO31Hour.csv     4 10521157            1
NaNO324Hours             NaNO324Hours.csv     5  9045265            1
pH1Hour                       pH1Hour.csv     5 11850679            1
pH24Hours                   pH24Hours.csv     6  9275761            1
Reference1                 Reference1.csv     6  2911654            1
Temperature1Hour     Temperature1Hour.csv     7 11726524            1
Temperature24Hours Temperature24Hours.csv     7  8120990            1
> keep <-rowSums(cpm(RG)>1) >=2
> RG<= RG[keep, , keep.lib.sizes=FALSE]
Error in RG <= RG[keep, , keep.lib.sizes = FALSE] : 
  comparison of these types is not implemented

gene filtering • 361 views
ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by humberto_munoz0
Answer: Filtering very low genes counts across all libraries
0
gravatar for James W. MacDonald
3.0 years ago by
United States
James W. MacDonald50k wrote:

Your last line is

RG <= RG[keep, , keep.lib.sizes=FALSE]

instead of

RG <- RG[keep, , keep.lib.sizes=FALSE]

 

ADD COMMENTlink written 3.0 years ago by James W. MacDonald50k
Answer: Filtering very low genes counts across all libraries
0
gravatar for humberto_munoz
3.0 years ago by
humberto_munoz0 wrote:

Thanks a lot

ADD COMMENTlink written 3.0 years ago by humberto_munoz0
Answer: Filtering very low genes counts across all libraries
0
gravatar for humberto_munoz
3.0 years ago by
humberto_munoz0 wrote:

BTY how I can delete the repeated sample names in RG$samples?  

ADD COMMENTlink written 3.0 years ago by humberto_munoz0

If you want to add a comment, click on the ADD COMMENT button and add in the box that appears. The Add your answer box below is intended for answers, not comments.

As to your question, I don't see any repeated sample names. And you wouldn't want to delete repeated sample names in RG$samples, because they pertain to the samples in your DGEList.

ADD REPLYlink written 3.0 years ago by James W. MacDonald50k

Thank you again. My DGEList has 13 samples, ( 6 conditions with 1HR and 24 HRs and a reference), and I am trying to create the design matrix using and additive linear model, but  I got an error with the object Time using the below commands. How I can overcome this error? 

> design <-model.matrix(~Time+Treat)
Error in eval(expr, envir, enclos) : object 'Time' not found
> rownames(design)<-colnames(RG)
Error in rownames(design) <- colnames(RG) : object 'design' not found
> design
Error: object 'design' not found

ADD REPLYlink written 3.0 years ago by humberto_munoz0

You need to tell model.matrix where to find the Time and Treat variables

design <- model.matrix(~ Time + Treat, RG$samples)

Please don't take offense, but it also seems like you would benefit from boning up on some of your basic R chops, too. There are many online tutorials available now to help, too.

ADD REPLYlink written 3.0 years ago by Steve Lianoglou12k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 222 users visited in the last hour