I am having trouble with putting a p-value frequency graph/ histogram from ballgown. Is there a ballgown package for this? Or do I have to do it on LibreOffice ( from the table of fold changes and p-values that I already obtained from the HISAT, Stringtie and some ballgown packages)
[edited by Eloi – c/p question from duplicated thread]
As far as I know, Ballgown does not have a built-in function to do what you are asking. However, the plot you are describing is relatively straightforward to make in R using the
hist() function, just pass it the p-value column you wish to plot, and R will produce the histogram. To adjust the bin size of the histogram, you can use
hist(DATA, breaks=X), where
DATA corresponds to your column of p-values and
X corresponds to your desired bin width. For the full documentation of the
hist() function, look here.
I just want to end with an observation: a histogram of p-values is not very informative. Usually, for RNA-seq results, a more common approach is to use a volcano plot. Once again, ballgown does not provide a built-in function to do this. But when you call the ballgown function
stattest(), you can add the flag
getFC=TRUE and obtain the estimated fold change for each feature. Then, you can follow a tutorial like this one to produce a volcano plot, which will contrast p-values and fold-change.
I hope it helps!