MassBank, MoNA and some other public databases provide msp format database of metabolites. So you can use the functions in metid to output metid format database to msp format which can be used for GNPS, MassBank and MoNA.

MassBank

msp format

Just use the write_msp_massbank() function to output metid database to msp format for MassBank.

write_msp_massbank(databasae = databasae, path = ".")

The arguments of write_msp_massbank() can be found here write_msp_massbank().

mgf format

Just use the write_mgf_massbank() function to output metid database to mgf format for MassBank.

write_mgf_massbank(databasae = databasae, path = ".")

The arguments of write_msp_massbank() can be found here write_msp_massbank().

MoNA

msp format

Just use the write_msp_mona() function to output metid database to msp format for mona.

write_msp_mona(databasae = databasae, path = ".")

The arguments of write_msp_mona() can be found here write_msp_mona().

mgf format

Just use the write_mgf_mona() function to output metid database to mgf format for mona.

write_mgf_mona(databasae = databasae, path = ".")

The arguments of write_msp_mona() can be found here write_msp_mona().

GNPS

msp format

Just use the write_msp_gnps() function to output metid database to msp format for gnps.

write_msp_gnps(databasae = databasae, path = ".")

The arguments of write_msp_gnps() can be found here write_msp_gnps().

mgf format

Just use the write_mgf_gnps() function to output metid database to mgf format for gnps.

write_mgf_gnps(databasae = databasae, path = ".")

The arguments of write_msp_gnps() can be found here write_msp_gnps().

Session information

sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur 10.16
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] rprojroot_2.0.2   digest_0.6.27     crayon_1.4.1      R6_2.5.0         
#>  [5] jsonlite_1.7.2    magrittr_2.0.1    evaluate_0.14     stringi_1.7.3    
#>  [9] rlang_0.4.11      cachem_1.0.5      fs_1.5.0          jquerylib_0.1.4  
#> [13] bslib_0.3.1       ragg_1.1.3        rmarkdown_2.9     pkgdown_2.0.1    
#> [17] textshaping_0.3.6 desc_1.3.0        tools_4.1.0       stringr_1.4.0    
#> [21] purrr_0.3.4       yaml_2.2.1        xfun_0.24         fastmap_1.1.0    
#> [25] compiler_4.1.0    systemfonts_1.0.2 memoise_2.0.0     htmltools_0.5.2  
#> [29] knitr_1.33        sass_0.4.0