SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
cummeRbund gene tracking stephenhart Bioinformatics 3 12-20-2014 12:25 PM
avoid cummeRbund "getGenes" automatically sorting geneIDs GuiFF Bioinformatics 1 07-07-2014 10:05 AM
gene tracking in cummeRbund stephenhart Bioinformatics 1 03-19-2013 12:09 PM
CummeRbund specify sample order, selecting specific chromosome AgaricX Bioinformatics 0 02-10-2013 11:51 AM
CummeRbund changing sample order, only examining singlle chromosomes AgaricX Bioinformatics 0 02-10-2013 11:38 AM

Reply
 
Thread Tools
Old 07-08-2013, 10:16 AM   #1
Enrique Zudaire
Member
 
Location: DC

Join Date: Feb 2013
Posts: 10
Default cummeRbund getGenes gene order

Hi all,

I'm using cummeRbund expressionBarplot to plot genes that I retrieve using getGenes

Code:
myGeneIds<-c('Atg12', 'Atg16l1','Atg4a')
myGenes<-getGenes(cuff, myGeneIds)
expressionBarplot(myHematopoieticGenes, showErrorbars=TRUE)
The bar plot shows the genes but not in the order I specified in the string vector but in ascending order of gene Ids (ENSMUSG000000XXXXX). Is there a way to keep the same order I had in the string vector?

Thanks in advance for the help
K
Enrique Zudaire is offline   Reply With Quote
Old 07-07-2014, 10:06 AM   #2
millerma1
Junior Member
 
Location: USA

Join Date: Jun 2014
Posts: 6
Default

Did you ever figure it out? I'm having the same problem with no idea how to fix it.
millerma1 is offline   Reply With Quote
Old 07-08-2014, 09:53 AM   #3
Enrique Zudaire
Member
 
Location: DC

Join Date: Feb 2013
Posts: 10
Default

I kind of forgot about this, but yes, I believe I figured something using ggplot2.

I ended up writing a small function like this:

Code:
genesExpressionBarPlot<-expressionBarplot(

      genes, showErrorbars=myShowErrorBars, replicates=myReplicates)  +
      
      ...

      scale_x_discrete(limits=genesTable[,1], 
                        labels=genesTable[,3])
      ...
   }
I believe the trick is to have the gene_id from the cuff database (my genesTable[,1]) be "limits". The "labels" are optional but useful for further customization.

Let me know if it works, I haven't used this in a while.
Enrique Zudaire is offline   Reply With Quote
Old 07-08-2014, 11:58 AM   #4
millerma1
Junior Member
 
Location: USA

Join Date: Jun 2014
Posts: 6
Default

I just tried it but I'm obviously missing the object 'genesTable' what did you use for this?

Also, I thought that the reordering of the genes happened in the getGenes step. Did you bypass or change this in some way?
millerma1 is offline   Reply With Quote
Old 07-08-2014, 02:12 PM   #5
Enrique Zudaire
Member
 
Location: DC

Join Date: Feb 2013
Posts: 10
Default

geneTable is a table I build with info I need from the cuff database and other sources. In the example above geneTable [,1] contains gene_id and geneTable[,3] contains gene labels.
In the example above genes is the result of getGenes() and goes before building the plot.

K
Enrique Zudaire 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 11:01 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO