R/ExchangeableAmides.R

Defines functions ExchangeableAmides

Documented in ExchangeableAmides

ExchangeableAmides <- function(sequence) {
    n <- length(sequence)
    x <- vector(mode = "numeric", length = n)
    for(i in 1:n) {
        seq_vector <- strsplit(as.character(sequence[i]), split = "")[[1]]
        x[i] <- length(na.omit(sub("P", NA, seq_vector))) - 1
    }
    return(x)	
}

Try the OrgMassSpecR package in your browser

Any scripts or data that you put into this service are public.

OrgMassSpecR documentation built on May 31, 2017, 5 a.m.