SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some cummeRbund questions rvaerle RNA Sequencing 53 12-24-2013 07:19 PM
Galaxy -> cummeRbund How? ekimmike Bioinformatics 4 10-30-2013 12:19 AM
CummeRbund questions glados Bioinformatics 13 07-24-2013 09:13 PM
cummeRbund installation m_elena_bioinfo Bioinformatics 3 08-02-2012 01:42 AM
getSig function in cummerBund shurjo Bioinformatics 3 04-25-2012 11:57 AM

Reply
 
Thread Tools
Old 04-27-2012, 11:05 AM   #1
Starr_Hazard
Member
 
Location: South Carolina

Join Date: Nov 2010
Posts: 16
Default cummeRbund ANDing in getSig

Folks,

getSig can select a set based on alpha level eg

mySigGenes<-getSig(cuff,x='Control',y='Experiment',alpha=0.01,level='genes')

Is there a way to get alpha=0.01 AND ,say, FPKM greater or lesser than some value?

Is there an "AND" syntax?

Thanks,
Starr
Starr_Hazard is offline   Reply With Quote
Old 04-27-2012, 01:16 PM   #2
lgoff
Member
 
Location: Cambridge, MA

Join Date: Feb 2008
Posts: 73
Default

Hi Starr,
This is something that is not implemented in getSig, or any of the other retrieval functions at this point. The problem is that there are numerous fields for which we could create arguments against which to query. And this would unnecessarily burden the function. One suggestion, if you are familiar with SQL querying, would be to directly query the cuffData.db database (either directly from SQLite or within R using the RSQLite package) to generate the list of tracking ids you are interested in and then use this list as input to getGenes.

Cheers,
Loyal
lgoff is offline   Reply With Quote
Old 04-29-2012, 10:24 AM   #3
billstevens
Senior Member
 
Location: Baltimore

Join Date: Mar 2012
Posts: 120
Default

Hi Loyal,

So I've been using MS Access to query my tables, but I'd much rather use cummeRbund. I know how to use SQL within MS Access (syntax, querying, etc.), but I don't know how to get the CuffSet down to just the isoform or cds table, which I could then query. Sorry for the basic question.
billstevens is offline   Reply With Quote
Old 05-07-2012, 12:33 PM   #4
billstevens
Senior Member
 
Location: Baltimore

Join Date: Mar 2012
Posts: 120
Default

Hey guys,

So I'm really working on this cummeRbund stuff, trying to get good at it.

My goal is to create a heatmap with some of my significant genes across 3 samples. I want to do a join from significant gene IDs which I got from the getSig function to my genes table. But genes(cuff_data) is an object. How do I get it to be a data.frame? I can do this in Access, but I want to know how to do this in R. I can do the queries; I just can't figure out how to get down to something I can query.

Help?
billstevens is offline   Reply With Quote
Old 05-07-2012, 05:31 PM   #5
lgoff
Member
 
Location: Cambridge, MA

Join Date: Feb 2008
Posts: 73
Default

Quote:
Originally Posted by billstevens View Post
Hey guys,

So I'm really working on this cummeRbund stuff, trying to get good at it.

My goal is to create a heatmap with some of my significant genes across 3 samples. I want to do a join from significant gene IDs which I got from the getSig function to my genes table. But genes(cuff_data) is an object. How do I get it to be a data.frame? I can do this in Access, but I want to know how to do this in R. I can do the queries; I just can't figure out how to get down to something I can query.

Help?
Hi bill,
If you have a list of gene_id values that you have generated from your merges, you can use the getGenes() function as follows:

cuff<-readCufflinks()
myGenes<-getGenes(cuff,myGeneIds)

This will create a 'CuffGeneSet' object. To generate a heatmap from this all you would have to do is:

csHeatmap(myGenes)

If you want access to the raw FPKM values:

fpkm(myGenes) #returns a data.frame

Differential expression values:

diffData(myGenes) #again, a data.frame

Associated annotation:

annotation(myGenes)

Also, if you can generate an appropriate SQL query to get the data that you like, you can do something like the following:

cuff<-readCufflinks()

mySQL<-'SELECT * FROM <some_table> etc, etc, etc'

res<-dbGetQuery(DB(cuff),mySQL)

#This should return the results of your query if designed appropriately against the tables in the cuffData.db.

Hope this helps!

Cheers,
Loyal
lgoff is offline   Reply With Quote
Old 05-07-2012, 05:33 PM   #6
lgoff
Member
 
Location: Cambridge, MA

Join Date: Feb 2008
Posts: 73
Default

Quote:
Originally Posted by billstevens View Post
Hi Loyal,

So I've been using MS Access to query my tables, but I'd much rather use cummeRbund. I know how to use SQL within MS Access (syntax, querying, etc.), but I don't know how to get the CuffSet down to just the isoform or cds table, which I could then query. Sorry for the basic question.
Hi Bill,
Also, you can always retrieve the FPKM, differential expression data, and annotation for any of the sub-level features by doing something like the following:

cuff<-readCufflinks()

fpkm(genes(cuff))

fpkm(isoforms(cuff))

diffData(TSS(cuff))

annotation(CDS(cuff))

etc, etc, etc.

Cheers,
Loyal
lgoff is offline   Reply With Quote
Old 05-08-2012, 06:56 AM   #7
Starr_Hazard
Member
 
Location: South Carolina

Join Date: Nov 2010
Posts: 16
Default

Thanks again Loyal. That's just the sort of child's primer for relating SQLite and cummeRbund that I have been looking for
Starr_Hazard is offline   Reply With Quote
Old 07-26-2012, 04:26 AM   #8
billstevens
Senior Member
 
Location: Baltimore

Join Date: Mar 2012
Posts: 120
Default

Quote:
Originally Posted by lgoff View Post
Also, if you can generate an appropriate SQL query to get the data that you like, you can do something like the following:

cuff<-readCufflinks()

mySQL<-'SELECT * FROM <some_table> etc, etc, etc'

res<-dbGetQuery(DB(cuff),mySQL)

#This should return the results of your query if designed appropriately against the tables in the cuffData.db.

Hope this helps!

Cheers,
Loyal
So I keep trying this and I cannot get it to find the database. It tells me that DB is not a valid function. When I use readCufflinks, the second line says it creates a database at C:/Users..... but that does not respond either. How do I specify the database?
billstevens is offline   Reply With Quote
Old 07-26-2012, 05:57 AM   #9
lgoff
Member
 
Location: Cambridge, MA

Join Date: Feb 2008
Posts: 73
Default

Hi Bill,
Thanks for pointing this out to me. It turns out that I did not add the function DB() to the namespace for the package which is why R doesn't recognize it as a valid function. I have fixed this for future releases, but in the meantime, you can do either of the following:

instead of
Code:
DB(cuff)
(which will ultimately be the 'preferred' way of accessing the database directly) you can do:

Code:
cummeRbund:::DB(cuff)
OR

Code:
cuff@DB
(this is not recommended, but will give you direct access to the @DB slot of the cuff object)

Sorry for that! and thanks again for bringing this to my attention!

Cheers,
Loyal
lgoff is offline   Reply With Quote
Old 07-26-2012, 12:29 PM   #10
billstevens
Senior Member
 
Location: Baltimore

Join Date: Mar 2012
Posts: 120
Default

Thanks Loyal!
billstevens is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:34 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.