Calculating the expression level of genes
Hi,
I have seq data in some time points. How I can plot the expression level of genes (individually or together) so that the gene is expression more, less or equal to mean of expression level??? I though about something like heat map that colours before and after mean are lighter and darker respectively. But I don't know how to deal with this
• 4,728 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Some example data would help.
Actually, I want to map the level of genes expression in each time point around the mean or central tendencies
some thing like this?
Oh thank you. I think yes.
In above image:
In OP data, most of them are zeros or near zero. I create a data frame. If you could post following information that would be great:
I simulated data frame with gene names DDB_G0267178 for 10 genes, time points for h10-16 and 12 samples (s1-12). Following are graphs using ggplot. Since you mentioned violin polots, I tried recreating violin plots. Unfortunately, simulated data set is small. Hence When I faceted, the violins are out of shape. Hence I included image without faceting. I included both mean and mean+se. Points are colored based on the mean. The colors can be customized. Change the code as you wish. Images are at the end:
Data preparation and per sample faceting code
@OP: you can also use heatmap like this:
Excuse me, what is the black dot in graphs?
black dot is mean per each sample.
Thank you, so the values pf green dots even placed under block dot, are higher than mean?
No. any dot above mean is above mean and any dot below mean is below. In this case, red dots are above mean and green dots are below mean. Seems I was plotting sample means for gene means. I have updated the code and images as well. Thank you for the question.
Sorry, in new code
in old one
when I am running new one by replacing gene_means with means gives me
When I am running new code without any change, gives me
Per gene faceting requires a data frame than above. In earlier code, I was highlighting per sample mean on per gene data. This confusion was/is due to my code. I updated the code. Now the code shows per sample faceting. I will add per gene faceting.
Sorry, ,ay you please look at this picture
I used your code for one time point and only two genes. So if I am not wrong, only in few cells (x axis) coloured by green these two genes are expressing less than mean in this time point
https://ibb.co/dcb53T
.....................................................
You already have time sample data with time points. You don't have to create that data frame. Since I do not have that data, i used it. Use the data you already have to create the data.
Thank you, you are right
Thank you, I plotted as you are plotting
I just wondering, how some people could be this much kind dedicating their precious time for helping people...
Thank you again
Thanks a lot for your immense kindness,
May I have something like this for heatmap?
The scale of colour in heat map likely shows the difference with mean well
For heat map:
Sorry, your last comment about heat map was vanished. I plotted for two genes and one time point as picture. So, only few cells (x axis) are expressing these two genes less than mean in this time point
I replaced previous heatmap pic with new one with code. There was no other text other than image. Image you have attached seems to be too busy and mean for many of them is incorrect. For mean to be in the middle of the graph, it should almost equal number of points above and below it. Please look into your code and data again.
Sorry, you are plotting 10 genes for each sample. I just plotted one gene per sample (samples are my cells, so that I have 209 samples (cells) for time point h16). If I plot more than a gene, I am not able to see which of them in a sample is expressiong above or below the mean.
I agree with you that simulated data is small and uniform. In general, real life big data (such as *omics, BFSI) is complicated and one needs several tricks to make sense of data. I can only help you with simulated data as my english is poor and cannot understand the description of data. I rather would like to see the data. I have updated the code with per gene, per sample tiling for time points. Please go through the code. Do not emulate it, rather see how a final dataframe is created for plotting. Then start plotting.
For other two points that are raised (gene expression and sample number), first issue is rather a statistical issue and second one is a non-issue.
Excuse me,
I have cells for one time point and the expression of one gene for these cells ,
...continuation of data preparation and sample faceting code post...
Thanks a lot
This is a link of this data
209, 153, 179 and 205 samples for each time point respectively.