View source: R/signatureFitMultiStepLib.R
fitMerge | R Documentation |
This function is used to select candidate rare signature solutions from a result object obtained using the multi-step signature fit FitMS function.
fitMerge(
resObj,
rareCandidateSelectionCriteria = "MaxCosSim",
forceRareSigChoice = NULL
)
resObj |
result object obtained from the FitMS function |
rareCandidateSelectionCriteria |
MaxCosSim or MinError. Whenever there is more than one rare signature that passes the multiStepMode criteria, then the best candidate rare signature is automatically selected using the rareCandidateSelectionCriteria. Candidate rare signatures can be manually selected using the function fitMerge. The parameter rareCandidateSelectionCriteria is set to MaxCosSim by default. Error is computed as the mean absolute deviation of channels. |
forceRareSigChoice |
if NULL this function will select the rare signature candidate with the highest associated cosine similarity. If no rare signature is found, then the solution with only the common signatures is selected. To select specific candidates, specify them in the forceRareSigChoice list object, in the form forceRareSigChoice[["sample_name"]] <- "rareSigName". To select the solution with only the common signatures for a sample use forceRareSigChoice[["sample_name"]] <- "common" |
When running FitMS, some samples may have multiple candidate rare signatures or rare signature combinations that fit the sample reasonably well. This function selects the best rare signature for each sample based on highest cosine similarity or lowest error (mean absolute difference of channels) and returns an updated object with a summary exposures composed by each selected fit solution for each sample.
The choice of rare signature can be changed using the parameter forceRareSigChoice.
returns the updated resObj object with updated exposures and rareSigChoice objects. If bootstrap was used, bootstraps of selected solutions can be found in the variable bootstrap_exposures_samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.