Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspershen committed Sep 10, 2024
1 parent a0a5b7b commit 25383ad
Show file tree
Hide file tree
Showing 109 changed files with 10,473 additions and 12,190 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: metid
Title: Metabolite identification based on MS1 and MS2 spectra
Version: 1.2.32
Version: 1.2.33
Date: 2024-09-10
Authors@R: c(
person(given = "Xiaotao",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,7 @@

* Add more functions for more efficient annotation.

# Version 1.2.33 (2024-09-10)

* Fix bugs.

14 changes: 5 additions & 9 deletions R/52_check_parameters_functions.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@



#' Validate Parameters for Metabolite Annotation
#'
#' This function validates the input parameters required for the metabolite annotation process. It checks the `mass_dataset` object, the annotation database, the adduct table, and various matching and weighting parameters to ensure they are correctly specified.
Expand Down Expand Up @@ -303,11 +304,6 @@ check_database <-
##check MS2 information
####if based_on has ms2, the object and database should have ms2 information
if ("ms2" %in% based_on) {
##check if object have ms2 information
if (length(object@ms2_data) == 0) {
stop("The object should have MS2 information.\n")
}

##Check if database have MS2 spectra or not
spectra_pos_number <-
database@spectra.data[['Spectra.positive']] %>%
Expand Down Expand Up @@ -461,11 +457,11 @@ check_adduct_table <-
#'
#' # Example MS2 info
#' ms2_info <- list(
#' spectrum1 = matrix(c(75, 1000, 80, 2000),
#' ncol = 2, byrow = TRUE,
#' spectrum1 = matrix(c(75, 1000, 80, 2000),
#' ncol = 2, byrow = TRUE,
#' dimnames = list(NULL, c("mz", "intensity"))),
#' spectrum2 = matrix(c(85, 3000, 90, 1500),
#' ncol = 2, byrow = TRUE,
#' spectrum2 = matrix(c(85, 3000, 90, 1500),
#' ncol = 2, byrow = TRUE,
#' dimnames = list(NULL, c("mz", "intensity")))
#' )
#'
Expand Down
108 changes: 12 additions & 96 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,90 +22,6 @@ template:
bootswatch: flatly
ganalytics: UA-000000-01

reference:
- title: Database construction
desc: Construct in-house or public MS2 spectra database.
contents:
- construct_database
- correct_database_rt
- get_ms2_spectrum
- construct_massbank_database
- construct_mona_database
- filter_adducts

- title: Metabolite identification
desc: Metabolite identification based on MS1 and MS2 databases.
contents:
- which_has_identification
- trans_to_new_style
- ms2plot
- identify_single_peak
- identify_metabolites_params
- identify_metabolites
- get_parameters
- get_ms2_spectrum_from_object
- get_identification_table
- get_identification_table_all
- get_iden_info
- filter_identification
- annotate_metabolites_mass_dataset
- annotate_single_peak_mass_dataset
- getIdentificationTable2
- getMS2spectrum
- get_parameters_metid
- identify_metabolite_all
- identify_ms2_only
- identify_peak
- metIdentify
- metIdentify_mass_dataset
- ms2_plot_mass_dataset
- mzIdentify
- mzIdentifyParam
- mzIdentify_mass_dataset
- mzIdentify_mass_dataset2

- title: Data
desc: Some data embed in metid
contents:
- hilic.pos
- hilic.neg
- rp.pos
- rp.neg
- msDatabase_hilic0.0.2
- msDatabase_rplc0.0.2
- orbitrap_database0.0.3
- snyder_database_hilic0.0.3
- snyder_database_rplc0.0.3

- title: Other functions
desc: Other usefull functions in metid
contents:
- readMGF
- readMSP
- readMZXML
- metid
- metid_conflicts
- metid_logo
- metid_packages
- readMSP_MoNA
- read_mgf_experiment
- read_mgf_gnps
- read_mgf_mona
- read_msp
- read_msp_database
- read_msp_gnps
- read_msp_mona
- colnames.databaseClass
- summary_annotation_table
- databaseClass-class
- metIdentifyClass-class
- write_mgf_gnps
- write_mgf_massbank
- write_mgf_mona
- write_msp_gnps
- write_msp_massbank
- write_msp_mona

navbar:
title: "sparklyr"
# type: inverse
Expand All @@ -132,7 +48,15 @@ navbar:
- text: Correct retention times in database according to internal standards
href: articles/rt_correction.html
- text: -------
- text: "Metabolite identification"
- text: "metid for mass_dataset class object"
- text: "Annotate metabolites"
href: articles/work_with_mass_dataset.html
- text: "Annotate single peak"
href: articles/annotate_single_peak_mass_dataset.html
- text: "MS2 plot"
href: articles/ms2_plot_mass_dataset.html
- text: -------
- text: "Old pipeline"
- text: Metabolite identification using MS1 database
href: articles/metabolite_annotation_using_MS1.html
- text: Metabolite identification using MS2 database
Expand All @@ -145,14 +69,6 @@ navbar:
- text: "Others"
- text: Other usefull tools
href: articles/other_tools.html
- text: -------
- text: "metid for mass_dataset class object"
- text: "Work with mass_dataset class object"
href: articles/work_with_mass_dataset.html
- text: "Annotate single peak in mass_dataset"
href: articles/annotate_single_peak_mass_dataset.html
- text: "MS2 plot in mass_dataset"
href: articles/ms2_plot_mass_dataset.html
twitter:
icon: "fab fa-twitter fa-lg"
href: https://twitter.com/xiaotaoshen1990
Expand All @@ -177,10 +93,10 @@ footer:
left: [package, developed_by, from]
right: [contact, email, wechat, tidymass]
components:
from: <br> from <i class="fa fa-university"></i> Stanford University <br> <i class="fa fa-clinic-medical"></i>School of Medicine <br> <i class="fa fa-dna"></i> Genetics Department
from: <br> from <i class="fa fa-university"></i> Nanyang Technological University Singapore <br> <i class="fa fa-clinic-medical"></i>Lee Kong Chian School of Medicine <br> <i class="fa fa-dna"></i> Genetics Department
contact: <b>Contact Us:</b> <br>
email: <i class="fa fa-envelope"></i> shenxt1990@outlook.com <br>
wechat: <i class="fa fa-weixin"></i> [shenxt1990](https://www.shenxt.info/files/wechat_QR.jpg) <br>
email: <i class="fa fa-envelope"></i> xiaotao.shen@outlook.com <br>
wechat: <i class="fa fa-weixin"></i> [jaspershen1990](https://jaspershen.github.io/image/wechat_QR.jpg) <br>
tidymass: <i class="fa fa-network-wired"></i> [A part of tidymass](https://www.tidymass.org/)


Expand Down
54 changes: 27 additions & 27 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 25383ad

Please sign in to comment.