Closed xtr1222 closed 3 years ago
`> library(xcms)
library(faahKO) library(RColorBrewer) library(pander) library(magrittr) library(pheatmap) library(SummarizedExperiment) cdfs <- dir(system.file("cdf", package = "faahKO"), full.names = TRUE, recursive = TRUE)[c(1, 2, 5, 6, 7, 8, 11, 12)] pd <- data.frame(sample_name = sub(basename(cdfs), pattern = ".CDF", replacement = "", fixed = TRUE), sample_group = c(rep("KO",4), rep("WT", 4)), stringsAsFactors = FALSE) raw_data <- readMSData(files = cdfs, pdata = new("NAnnotatedDataFrame", pd), mode = "onDisk") Polarity can not be extracted from netCDF files, please set manually the polarity with the 'polarity' method. raw_data <- filterRt(raw_data, c(2500, 3500)) head(rtime(raw_data)) F1.S0001 F1.S0002 F1.S0003 F1.S0004 F1.S0005 F1.S0006 2501.378 2502.943 2504.508 2506.073 2507.638 2509.203 mzs <- mz(raw_data) Warning messages: 1: In serialize(data, node$con) : 载入时'package:stats'可能无用 2: In serialize(data, node$con) : 载入时'package:stats'可能无用 mzs_by_file <- split(mzs, f = fromFile(raw_data)) length(mzs_by_file) [1] 8 bpis <- chromatogram(raw_data, aggregationFun = "max") group_colors error:not found 'group_colors' names(group_colors) <- c("KO", "WT") Error in names(group_colors) <- c("KO", "WT") : 找不到对象'group_colors' plot(bpis, col = group_colors[raw_data$sample_group]) Error in .plotChromatogramList(x[i, , drop = TRUE], col = col, lty = lty, : error:not found 'group_colors'`
library(faahKO) library(RColorBrewer) library(pander) library(magrittr) library(pheatmap) library(SummarizedExperiment) cdfs <- dir(system.file("cdf", package = "faahKO"), full.names = TRUE,
group_colors error:not found 'group_colors' names(group_colors) <- c("KO", "WT") Error in names(group_colors) <- c("KO", "WT") : 找不到对象'group_colors' plot(bpis, col = group_colors[raw_data$sample_group]) Error in .plotChromatogramList(x[i, , drop = TRUE], col = col, lty = lty, : error:not found 'group_colors'`
Please have a look at issue #537 - the answer is given there.
I'm closing this issue now, feel free to reopen if needed.
`> library(xcms)