Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional analysis: MCA - add distance method #28

Open
ChristinaSchmidt1 opened this issue Jun 20, 2023 · 2 comments
Open

Functional analysis: MCA - add distance method #28

ChristinaSchmidt1 opened this issue Jun 20, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request Future Implementation will be done once priority issues are closed

Comments

@ChristinaSchmidt1
Copy link
Member

I will add clustering based on distance and double check the clustering we have now between the two conditions (and potentially update it for more functionality).

@ChristinaSchmidt1 ChristinaSchmidt1 self-assigned this Jun 20, 2023
@ChristinaSchmidt1 ChristinaSchmidt1 added the enhancement New feature or request label Jun 20, 2023
@ChristinaSchmidt1
Copy link
Member Author

ChristinaSchmidt1 commented Jun 21, 2023

Add to MCA_CoRe:

  • rename Consumed by Cond1 and Released by Cond2 or vice versa into Consumed/Released to fit with terminology I use.
  • Write a helper function to import the clustering overview DFs
  • Include labelling function here, that based on sign (release./consumed) and Log2FC labels columns in the way we need it if user has not started from our DMA output

Add to MCA_2Cond:

  • rename Cond1 and Cond2 to use the name the user has given for this column

Add MCA_Distance:

  • Give the parameter to either provide distance value cutoff or to do it based on data distribution?
  • cluster metabolites in buckets based on their distance of change --> the higest distance of change would lead to great lollipop graphs

Generally:

  • Put results into one excel file with multiple sheets
  • enable user to add vector to rename clusters
  • Make extra function to run ORA on each individual cluster and plot results

@ChristinaSchmidt1 ChristinaSchmidt1 changed the title MCA - different clustering methods MCA - add distance method Jul 14, 2023
@ChristinaSchmidt1
Copy link
Member Author

ChristinaSchmidt1 commented Aug 21, 2023

#' MCA_Distance
#'
#' This script allows you to perform metabolite clustering analysis and computes clusters of metabolites based on regulatory rules between two conditions.
#'
#' @param Cond1_File DF for your data (results from e.g. DMA) containing metabolites in rows with corresponding Log2FC and stat (p-value, p.adjusted) value columns.
#' @param Cond2_File DF for your data (results from e.g. DMA) containing metabolites in rows with corresponding Log2FC and stat (p-value, p.adjusted) value columns.
#' @param MetaboliteID Column name of Column including the Metabolite identifiers. This MUST BE THE SAME in each of your Input files.
#' @param Cond1ValueCol Column name of Log2FC in Cond1File
#' @param Cond1PadjCol Column name of adjusted p-value in Cond1File. Can also be you p-value column if you want to use this instead.
#' @param Cond2ValueCol  Column name of Log2FC in Cond2File
#' @param Cond2PadjCol Column name of adjusted p-value in Cond2File. Can also be you p-value column if you want to use this instead.
#' @param Cond1_padj_cutoff  \emph{Optional: } adjusted p-value cutoff for Cond1File. \strong{Default=0.05}
#' @param Cond2_padj_cutoff \emph{Optional: } adjusted p-value cutoff for Cond2File. \strong{Default=0.05}
#' @param backgroundMethod \emph{Optional: } Background method C1|C2, C1&C2, C2, C1 or * \strong{Default="C1&C2"}
#' @param outputFileName \emph{Optional: } Output filename \strong{Default=SiRCle_RCM.csv}
#' @return MCA an instance of the MetaProViz package
#' @export
#'

##################################################
### ### ### Metabolite Clustering Analysis ### ### ###
##################################################

#MCA_Distance <- function(Cond1_File, Cond2_File, MetaboliteID= "Metabolite", Cond1ValueCol="Log2FC",Cond1PadjCol="p.adj", Cond2ValueCol="Log2FC", Cond2PadjCol="p.adj",Cond1_padj_cutoff= 0.05, Cond2_padj_cutoff = 0.05, backgroundMethod="C1&C2", OutputFileName = "MCA_Distance_")

@ChristinaSchmidt1 ChristinaSchmidt1 changed the title MCA - add distance method Functional analysis: MCA - add distance method Aug 22, 2023
@ChristinaSchmidt1 ChristinaSchmidt1 added the Future Implementation will be done once priority issues are closed label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Future Implementation will be done once priority issues are closed
Projects
None yet
Development

No branches or pull requests

1 participant