Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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?

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              Thanks again Loyal. That's just the sort of child's primer for relating SQLite and cummeRbund that I have been looking for

              Comment


              • #8
                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?

                Comment


                • #9
                  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

                  Comment


                  • #10
                    Thanks Loyal!

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Strategies for Sequencing Challenging Samples
                      by seqadmin


                      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                      03-22-2024, 06:39 AM
                    • seqadmin
                      Techniques and Challenges in Conservation Genomics
                      by seqadmin



                      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                      Avian Conservation
                      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                      03-08-2024, 10:41 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, Yesterday, 06:37 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, Yesterday, 06:07 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-22-2024, 10:03 AM
                    0 responses
                    49 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-21-2024, 07:32 AM
                    0 responses
                    67 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X