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

Error in if (fix.col) {: argument can't be used as a logical value #314

Open
EugeneAeolus opened this issue Aug 6, 2024 · 0 comments
Open

Comments

@EugeneAeolus
Copy link

Load MetaboAnalystR

library(MetaboAnalystR)

Clean global environment

rm(list = ls())

mSet<-InitDataObjects("conc", "stat", FALSE);
mSet<-Read.TextData(mSet, "https://rest.xialab.ca/api/download/metaboanalyst/human_cachexia.csv", "rowu", "disc");
mSet<-SanityCheckData(mSet);
mSet<-ReplaceMin(mSet);
mSet<-PreparePrenormData(mSet);
mSet<-Normalization(mSet, "NULL", "LogNorm", "MeanCenter", "S10T0", ratio=FALSE, ratioNum=20);
mSet<-PlotNormSummary(mSet, "norm_0_", format ="png", dpi=72, width=NA);
mSet<-PlotSampleNormSummary(mSet, "snorm_0_", format = "png", dpi=72, width=NA);

Perform fold-change analysis on uploaded data, unpaired

mSet<-FC.Anal(mSet, 2.0, 0, FALSE)
mSet<-PlotFC(mSet, "fc_0_", "png", 72, width=NA)

Perform T-test (parametric)

mSet<-Ttests.Anal(mSet, nonpar=F, threshp=0.05, paired=FALSE, equal.var=TRUE, "fdr", TRUE)

Plot of the T-test results

mSet<-PlotTT(mSet, imgName = "tt_0_", format = "png", dpi = 72, width=NA)

Perform the volcano analysis

mSet<-Volcano.Anal(mSet, FALSE, 2.0, 0, F, 0.1, TRUE, "raw")

Create the volcano plot

mSet<-PlotVolcano(mSet, "volcano_0_", 1, 0, format ="png", dpi=72, width=NA)

OPTION 1 - Heatmap specifying pearson distance and an overview

mSet<-PlotCorrHeatMap(mSet, "corr_0_", "png", 72, width=NA, "col", "pearson", "bwm", "overview", F, F, 0.0)

code is above, R version is 4.4.1.
It raised an error: Error in if (fix.col) {: argument can't be used as a logical value

it seems that code 'if(fix.col){
p <- iheatmap(corr.mat, name = "Correlation
Coefficient",
colors = colors,zmin=-1,zmid=0, zmax=1,
colorbar_grid = setup_colorbar_grid(y_start = 0.85)) %>%
add_row_labels(size = 0.2, side = "right",font = list(size = fz))%>%
add_col_labels(size = 0.2, font = list(size = fz))

}else{
p <- iheatmap(corr.mat, name = "Correlation
Coefficient" ,
colors = colors,zmin=min(corr.mat),zmid=mean(min(corr.mat),max(corr.mat)), zmax=max(corr.mat),
colorbar_grid = setup_colorbar_grid(y_start = 0.85) ) %>%
add_row_labels(size = 0.2, side = "right",font = list(size = fz))%>%
add_col_labels(size = 0.2,font = list(size = fz) )
}' can not recognize 'TRUE' and 'FALSE'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant