plot the rows of dataset in R
I have the following data:
gene sample1 sample2 sample3 ......
A1BG 87.9 255.13 31.44
A1CF 0.26 2.3618 0
and so on about 20,000 rows, and 1098 columns
I would like to plot each row to see the distribution of each gene in R
any help?
• 11,400 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Since this is not a bioinformatics question it may be closed. You may want to search stackoverflow for answers. Here is one.
I would like to know how to plot each row separately , not using ggpot
This is an R programming question. The basic option would be to use a loop but depending on the exact output you want, there may be other ways like using apply().
I think the question is bioinformatics or at least bioinformatics related, the OP asks how to plot 20,000 genes, probably expression data.
If you want to make 20,000 plots it is possible in R with for loop or with apply function, suggested by Jean-Karim Heriche, but would it be feasible to interpret these 20k plots? How much time would you spend before looking at all 20k plots?
You might be better of with a heatmap, or if you are really interested in distribution, you might wanna give edgeR's bcv plot a try.
There is no single plot (expect some based on data reduction like PCA) that would be useful for plotting 20000 genes separately. It just doesn't make sense.
Hello mms140130!
We believe that this post does not fit the main topic of this site.
Not strictly bioinformatics, try stackoverflow.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
sorry about the Question, actually I figured it out but I didn't know how to delete the question
Thanks all for all you suggestions
In the interest of helping someone else if you figured out a solution then post it here as a comment. That way it will save someone else time/effort.
where geneexp is the gene expression data col 1 is the gene name