R/get.AASeq.R

Defines functions get.AASeq

Documented in get.AASeq

get.AASeq <-
function(filelocation){
  filedata <- readLines(filelocation, n=-1, warn = FALSE)
  AACount = 1
  AASeq <- vector()
  for(i in 1:length(filedata)){
    if(substring(filedata[i],1,1)!=">" & substring(filedata[i],1,1)!="<" & filedata[i]!="" ){
      AASeq<-c(AASeq,substring(filedata[i],seq(from=1, to =nchar(filedata[i]),by=1),seq(from=1, to =nchar(filedata[i]),by=1)))
    }
  }
   if(AASeq[length(AASeq)]=="*"){
    return.value <- AASeq[1:length(AASeq)-1]
  }else{
    return.value <- AASeq[1:length(AASeq)]
  }
  return (return.value)
}

Try the iPAC package in your browser

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

iPAC documentation built on Nov. 8, 2020, 7:48 p.m.