Dear Community,
I'm trying to plot the changes in gene expression due to two treatments (compared to a common baseline control) across the mouse genome space.
The way I'm envisioning the resulting graph output is the following:
- x axis indicating the genomic coordinates (i.e. the ordered chromosomes list chr1:19+y+x)
- y indicating the log fold change (I've already computed it using DESeq2).
So far I've built a GenomicRanges object from a dataframe containing my data using the makeGRangesFromDataFrame
function, which looks as follows:
- row names the ENSEMBL gene IDs
- Column1: seqnames (contains the chromosomes identifiers UCSC coded)
- Column2: start position
- Column3: end position
- Column4: width (automatically computed by makeGRangesFromDataFrame
)
- Column5: strand (contains "+" or "-" UCSC coded)
As metadata columns:
- Column6: mgi_symbol
- Column7: Treatment1 LFC
- Column8: Treatment1 LFC_SE
- Column9: Treatment1 p Adjusted
- Column10: Treatment2 LFC
- Column11: Treatment2 LFC_SE
- Column12: Treatment2 p Adjusted
Given this data structure, I thought it would be straightforward to use Gviz functionalities to generate the aforementioned plot.
However, I'm struggling into finding a suitable way of addressing the issue of plotting data coming from multiple chromosomes on the same "ordered" x axis.
Does anybody have a suggestion on how to address this task?
Thanks in advance!
Sebastiano
Dear Michael,
thank you for your prompt reply.
Yes, I'm familiar with the example in your workflow, and so far I've found it really helpful.
However, in my case the non-trivial part, is to generate a plot which displaying data coming mapped on different chromosomes.
I'm working on a way around it, I'll post it once it's done.
As usual suggestions are welcome.
Got it. I missed the chromosomes part.