Answers.Body: <p>Have a look at the <a href="http://bioconductor.org/packages/GSVA" rel="noreferrer">GSVA</a> package. It allows to convert a matrix with <code>genes x Samples</code> to a <code>pathways x Samples</code> using several methods ssgsea, gage, gsva...</p>
  
  <p>Afterwards you can use that matrix as input for differential expression of pathways or classification algorithms or whatever. </p>
  
  <hr>
  
  <p>However it depends on the input of the "pathways" you give it. Make sure that the pathways are correct. Also consider that the pathway topology might change with conditions.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-27T14:28:54.310Z
Answers.LastActivityDate: 2018-02-27T14:28:54.310Z
Answers.UserDisplayName: llrs
Body: <p>I was wondering if there is any way to apply classification algorithms (e.g random forest) on microarray data but not using the genes as predictors/features but the pathway they belong to.</p>
  
  <p>The thing is that the expressions of the genes that belong to the same pathway should somehow, grouped together and transformed into a new value that will describe that pathway for each specific sample.</p>
  
  <p>Let me give an example.</p>
  
  <p>Assuming that we have <code>g1, g2, g3, g4, g5, g6, g7, g8, g9, g10</code> as genes
  and <code>p1, p2, p3</code> as pathways.</p>
  
  <p>And <code>g1, g2, g3</code> belong to <code>p1</code> while <code>g3, g4, g5, g6</code>belong to <code>p2</code> and <code>g2, g6, g7, g8, g9, g10</code> belong to <code>p3</code></p>
  
  <p>One thought is to calculate the mean expression of the above gene groups per sample and then run the classification algorithm on top of these values. But I would like to hear/read your opinion on such an approach and also your suggestions on using a different method to do this.</p>
  
  <p>The final goal would be the extraction of the most significant classification predictors (pathways). </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T10:34:08.473Z
Comments.Text: Do you assume that expression of genes are similar in pathways? Because in a real experiment they are not.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T10:59:46.200Z
Comments.Text: No, I don't want to assume something like that but I mentioned the mean in order to group the genes of each pathway. This approach might be totally wrong but that's why I posted here. To get feedback and different opinions.
Comments.UserDisplayName: J. Doe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T11:23:01.617Z
Comments.Text: My point is, that I haven't seen an algorithm that can transform the expression values of different genes into one value that represents a given pathway.
Comments.UserDisplayName: benn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T11:32:04.770Z
Comments.Text: Oh ok. I see...
Comments.UserDisplayName: J. Doe
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T12:51:52.260Z
Comments.Text: It looks like you're trying to incorrectly reinvent the activation Z-score produced by IPA or similar tools. I suggest you simply use that instead.
Comments.UserDisplayName: Devon Ryan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-27T13:35:46.893Z
Comments.Text: IPA is commercial. Isn't it? Can you provide me with free R-based ones to understand what exactly you suggest?
Comments.UserDisplayName: J. Doe
Tags: <microarray><pathway>
Title: Classification (supervised learning) of expression data on pathway level
ThreadText: # Classification (supervised learning) of expression data on pathway level
  
  (Asked by: username_0 on 2018-02-27)
  
  I was wondering if there is any way to apply classification algorithms (e.g random forest) on microarray data but not using the genes as predictors/features but the pathway they belong to.
  
  The thing is that the expressions of the genes that belong to the same pathway should somehow, grouped together and transformed into a new value that will describe that pathway for each specific sample.
  
  Let me give an example.
  
  Assuming that we have `g1, g2, g3, g4, g5, g6, g7, g8, g9, g10` as genes
  and `p1, p2, p3` as pathways.
  
  And `g1, g2, g3` belong to `p1` while `g3, g4, g5, g6`belong to `p2` and `g2, g6, g7, g8, g9, g10` belong to `p3`
  
  One thought is to calculate the mean expression of the above gene groups per sample and then run the classification algorithm on top of these values. But I would like to hear/read your opinion on such an approach and also your suggestions on using a different method to do this.
  
  The final goal would be the extraction of the most significant classification predictors (pathways).
  
  **Tags:** microarray, pathway
  
  > **Comments:**
  > **username_1**: Do you assume that expression of genes are similar in pathways? Because in a real experiment they are not.  
  > **username_0**: No, I don't want to assume something like that but I mentioned the mean in order to group the genes of each pathway. This approach might be totally wrong but that's why I posted here. To get feedback and different opinions.  
  > **username_1**: My point is, that I haven't seen an algorithm that can transform the expression values of different genes into one value that represents a given pathway.  
  > **username_0**: Oh ok. I see...  
  > **username_2**: It looks like you're trying to incorrectly reinvent the activation Z-score produced by IPA or similar tools. I suggest you simply use that instead.  
  > **username_0**: IPA is commercial. Isn't it? Can you provide me with free R-based ones to understand what exactly you suggest?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-02-27. Score: 6 | Accepted answer
  
  Have a look at the [GSVA](http://bioconductor.org/packages/GSVA) package. It allows to convert a matrix with `genes x Samples` to a `pathways x Samples` using several methods ssgsea, gage, gsva...
  
  Afterwards you can use that matrix as input for differential expression of pathways or classification algorithms or whatever.
  
  ---
  
  However it depends on the input of the "pathways" you give it. Make sure that the pathways are correct. Also consider that the pathway topology might change with conditions.
  
  
  ---
  
  