Question: Plot association between genotype and splicing ratio using ggplot
gravatar for waqaskhokhar999
19 months ago by
waqaskhokhar999100 wrote:

I want to see the association between genotype and splicing ratio, for this i can use ggplot after generating matrix like this:

sample      ratio     isoform    geno
sample1    0.2        T01            AA
sample2    0.6        T01            GG
sample1    0.3        T02            AA
sample2    0.4        T02            GG

# ploting

enter image description here

In this, I am repeating sample, isoform and genotype name, again and again, To remover redundacny, I have generated two separate matrices like these:

splicing ratio matrix:

Transcripts      sample1     sample2    
T01                      0.2        0.6             
T02                      0.3        0.4

Genotype matrxi:

snp                 sample1     sample2    
snp_3_214472            AA        GG

How can we pass these matrices in ggplot to generate the above image

rna-seq snp ggplot • 407 views
ADD COMMENTlink modified 19 months ago • written 19 months ago by waqaskhokhar999100

Please see How to add images to a Biostars post to add your images properly. You need the direct link to the image, not the link to the webpage that has the image embedded (which is what you have used here)

EDIT: You've also pasted a mark-up anchor tag in a box that asked for a direct link to the file. It's gonna need some HTML parsing to get to the original link from that mess.

ADD REPLYlink modified 19 months ago • written 19 months ago by _r_am32k

ggplot is designed to work on "long" format matrices such as you have used in your working example. Its much easier to just use a very large and "Redundant" long matrix than it is to try to do it using two separate matrices. Why are you concerned about redundancy?? I'm currently working on a table w/ 12 columns and 12 million rows and it works reasonably fast for plotting in ggplot.

ADD REPLYlink written 19 months ago by reilly.brian.m60
Please log in to add an answer.


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