Skip to main content
Topic: Using xcmsSet getting Error in R_nc4_close: NetCDF: Not a valid ID (Read 170 times) previous topic - next topic

Using xcmsSet getting Error in R_nc4_close: NetCDF: Not a valid ID

Dear Maintainers,

since a few days I'm getting the Error Message: "Error in R_nc4_close: NetCDF: Not a valid ID" using the "xcmsSet" function from {xcms} package under R-Studio Version 3.5.3 in Windows10 (64bit).

Our code for generating the chromatogramm list from raw cdf-data out of GC-MS-Analysis and getting the xcmxSet out of that list:

### List Chromatograms
lchrom <- list.files(path = "./cdf/", recursive = F, full.names = T,  pattern =".CDF")

### adjust order of chromatograms to 1, 2, 3, ...
temp <- unlist(strsplit(lchrom, c("G")))[c(FALSE, TRUE)]
temp <- unlist(strsplit(temp, c("."), fixed = TRUE))[c(TRUE, FALSE)]
temp <- as.numeric(temp)
lchrom <- lchrom[order(temp)]

### Start xcms analysis
system.time(
  xsgc <- xcmsSet(lchrom[1], method="matchedFilter", step = 0.5, fwhm = 2, snthresh = 3, max = 10000, BPPARAM = SnowParam(workers = 3) )
)


After the xcmsSet function we received the following error message:
"Error in R_nc4_close: NetCDF: Not a valid ID"

With R-Studio Version 3.4.3 and xcms 3.0.2 everything worked as always..

Our loaded packages are:
Biobase2.42.0
BiocGenerics 0.28.0
BiocParallel 1.16.6
CAMERA 1.38.1
data.table 1.12.2
MSnbase  2.8.3
mzR 2.16.2
parallel 3.5.2
ProtGenerics 1.14.0
Rcpp 1.0.1
S4 Vectors 0.20.1
stats4 3.5.2
xcms 3.4.4

Re: Using xcmsSet getting Error in R_nc4_close: NetCDF: Not a valid ID

Reply #1
Hi Dominic,

The issue you are having was recently noted on the xcms github page: NetCDF: Not a valid ID error when using CentOS with NetCDF library 4.6.2

It looks like Johannes has already fixed the issue. You can install the patched version using the command:
Code: [Select]
devtools::install_github("sneumann/xcms", ref = "RELEASE_3_8")

Hopefully that fixes the issue for you!

 

Re: Using xcmsSet getting Error in R_nc4_close: NetCDF: Not a valid ID

Reply #2
Problem solved,

thank you!!!