View source: R/grabMSdataCode.R
grabAccessionData | R Documentation |
Get arbitrary metadata from an mzML file by accession number
grabAccessionData(filename, accession_number)
filename |
The name of the file for which metadata is requested. Both absolute and relative paths are acceptable. |
accession_number |
The HUPO-PSI accession number for the metadata to be extracted. These accession numbers are typically of the form MS:####### and the full list can be found and searched at https://raw.githubusercontent.com/HUPO-PSI/psi-ms-CV/master/psi-ms.obo. |
A data frame with the name and value of the parameter requested, as deduced from the XML tag attributes corresponding to the accession number.
library(RaMS) sample_dir <- system.file("extdata", package = "RaMS") sample_file <- list.files(sample_dir, full.names=TRUE)[3] # Get ion injection time iit_df <- grabAccessionData(sample_file, "MS:1000927") # Manually create TIC int_df <- grabAccessionData(sample_file, "MS:1000285") rt_df <- grabAccessionData(sample_file, "MS:1000016") tic <- data.frame(rt=rt_df$value, int=int_df$value) plot(tic$rt, tic$int, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.