Get identification table from a metIdentifyClass object. [Maturing]

get_identification_table(..., candidate.num = 3, type = c("old", "new"))

Arguments

...

One or multiple metIdentifyClass objects.

candidate.num

The number of candidates.

type

The type of identification table.

Value

A identification table (data.frame).

See also

The example and demo data of this function can be found https://jaspershen.github.io/metID/articles/metID.html

Author

Xiaotao Shen shenxt1990@163.com

Examples

data("annotate_result", package = "metID")
annotation_table <-
get_identification_table(annotate_result, candidate.num = 3, type = "old")
annotation_table
#> # A tibble: 100 × 6
#>    name          mz    rt MS2.spectra.name       Candidate.number Identification
#>    <chr>      <dbl> <dbl> <chr>                             <dbl> <chr>         
#>  1 pRPLC_376   472. 773.  NA                                    0 NA            
#>  2 pRPLC_391   466. 747.  NA                                    0 NA            
#>  3 pRPLC_603   162.  33.7 mz162.112442157672rt3…                1 Compound.name…
#>  4 pRPLC_629   181.  36.4 NA                                    0 NA            
#>  5 pRPLC_685   230. 158.  NA                                    0 NA            
#>  6 pRPLC_722   181. 228.  mz181.072050304971rt2…                1 Compound.name…
#>  7 pRPLC_778   289. 286.  mz289.227264404297rt2…                0 NA            
#>  8 pRPLC_1046  181. 201.  mz181.072050673093rt1…                3 Compound.name…
#>  9 pRPLC_1112  209.  57.4 mz209.092155077047rt5…                1 Compound.name…
#> 10 pRPLC_1148  283.  40.9 NA                                    0 NA            
#> # … with 90 more rows
annotation_table <-
get_identification_table(annotate_result, candidate.num = 3, type = "new")
annotation_table
#> # A tibble: 115 × 19
#>    name          mz    rt MS2.spectra.name Candidate.number Compound.name CAS.ID
#>    <chr>      <dbl> <dbl> <chr>                       <int> <chr>         <chr> 
#>  1 pRPLC_376   472. 773.  NA                             NA NA            NA    
#>  2 pRPLC_391   466. 747.  NA                             NA NA            NA    
#>  3 pRPLC_603   162.  33.7 mz162.112442157…                1 L-Carnitine   541-1…
#>  4 pRPLC_629   181.  36.4 NA                             NA NA            NA    
#>  5 pRPLC_685   230. 158.  NA                             NA NA            NA    
#>  6 pRPLC_722   181. 228.  mz181.072050304…                1 Theophylline  NA    
#>  7 pRPLC_778   289. 286.  NA                             NA NA            NA    
#>  8 pRPLC_1046  181. 201.  mz181.072050673…                3 Theophylline  611-5…
#>  9 pRPLC_1046   NA   NA   mz181.072050673…                3 Paraxanthine  611-5…
#> 10 pRPLC_1046   NA   NA   mz181.072050673…                3 Theophylline  NA    
#> # … with 105 more rows, and 12 more variables: HMDB.ID <chr>, KEGG.ID <chr>,
#> #   Lab.ID <chr>, Adduct <chr>, mz.error <dbl>, mz.match.score <dbl>,
#> #   RT.error <dbl>, RT.match.score <dbl>, CE <chr>, SS <dbl>,
#> #   Total.score <dbl>, Database <chr>