remap_accessions-method: Changes accessions from one protein id to another

Description Usage Arguments Value Author(s) See Also Examples

Description

Changes accessions from one protein id to another.

Usage

1
2
3
4
5
6
    remap_accessions(object, 
                     conversion_table, 
                     extraction_pttrn=c("\\|([^|-]+)(-\\d+)?\\|",
                                        "([A-Z]P_\\d+)",
                                        "(ENS[A-Z0-9]+)"), 
                     path_to_FASTA=NULL)

Arguments

object

An instance of class "MSnID".

conversion_table

(data.frame) first column in the data frame corresponds to identifiers in the FASTA file. Second column is the new identifier.

extraction_pttrn

(string) regex pattern that extract protein identifier from FASTA entry name as first group (that is "\\1"). The most common patterns are the one corresponding to UniProt "\\|([^|-]+)(-\\d+)?\\|", RefSeq "^([A-Z]P_\\d+)" and ENSEMBL "^(ENS[A-Z0-9]+)". Other regex patterns can be accepted as well. Defaul is UniProt pattern.

path_to_FASTA

(string) path to FASTA file. If provided only accessions present in the given FASTA file will be retained.

Value

Returns an instance of "MSnID" with updated accessions.

Author(s)

Vladislav A Petyuk vladislav.petyuk@pnnl.gov

See Also

remap_fasta_entry_names

Examples

1
2
3
4
5
6
7
8
m <- MSnID(".")
mzids <- system.file("extdata","phospho.mzid.gz",package="MSnID")
m <- read_mzIDs(m, mzids)
head(m$accessions)
conv_tab <- fetch_conversion_table("Homo sapiens", "UNIPROT", "SYMBOL")
m2 <- remap_accessions(m, conv_tab, "\\|([^|-]+)(-\\d+)?\\|")
head(m2$accessions)
unlink(".Rcache", recursive=TRUE)

MSnID documentation built on Nov. 8, 2020, 8:03 p.m.