How to calculate q-values in this case 
I got data for gene mutations(binary values) and gene expression level(continuous values) for several patients.
shown in two tables in the first row of the pic
for deciding whether a gene mutation truly affect function.
I need to combine it with its expression level.
So dividing people into two groups based on gene mutation
Then do a test on their gene expression levels
such test result in a P-value
Then what is the right way converting P-values to q-values for multiple tests?
Should I pool all P-values across groups or within a group together to calculate individual q-values?
It is actually the method used in 'Emerging landscape of oncogenic signatures across human cancers', which I intend to imitate.
http://www.nature.com/ng/journal/v45/n10/full/ng.2762.html
see Method-Testing for concordant mRNA and copy number changes.
 A: Multiple testing correction is all about how you want to infer and report your results. If the audience is knowledgable and you clearly report how you did your testing, you can do it either way. 
Refer to the original publication for the theory behind converting $P$-values to $q$-values. [1] I'm not sure what your programming capabilities are, but the method was implemented in R by Storey himself [2] and should be easy enough to implement in python, Matlab, or similar. 
The paper that you have referenced seems to indicate that 

genes within the same peak were scored using the corresponding combined q values.

which to me means that they calculated $q$-values for each gene. However, I'm sure that you can report this either way. 
If you wanted to calculate a combined $q$-value per gene, you could report it by saying that (for example) you controlled the FDR within each gene.  To an educated reader this indicates that you calculated $q$-values inside the genes, and that the numbers represent this. Otherwise you could say that you pooled all $P$-values and calculated $q$-values for combined FDR of all groups.  It all depends on how you want to say it, and after a certain point its just semantics. 
[1] Storey, J. D. (1995). A direct approachto false discovery rates. J. R. Statist.Soc. B.
[2] https://github.com/jdstorey/qvalue
Note: To install the qvalue package:

install.packages("devtools")
library("devtools")
install_github("jdstorey/qvalue")

