% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/desc-15-PSSMAcc.R
\name{extractPSSMAcc}
\alias{extractPSSMAcc}
\title{Profile-based protein representation derived by PSSM
(Position-Specific Scoring Matrix) and auto cross covariance}
\usage{
extractPSSMAcc(pssmmat, lag)
}
\arguments{
\item{pssmmat}{The PSSM computed by \code{\link{extractPSSM}}.}

\item{lag}{The lag parameter. Must be less than the number of amino acids
in the sequence (i.e. the number of columns in the PSSM matrix).}
}
\value{
A length \code{lag * 20^2} named numeric vector,
the element names are derived by the amino acid name abbreviation
(crossed amino acid name abbreviation) and lag index.
}
\description{
This function calculates the feature vector based on the PSSM
by running PSI-Blast and auto cross covariance tranformation.
}
\examples{
if (Sys.which("makeblastdb") == "" | Sys.which("psiblast") == "") {
  cat("Cannot find makeblastdb or psiblast. Please install NCBI Blast+")
} else {
  x <- readFASTA(system.file(
    "protseq/P00750.fasta",
    package = "protr"
  ))[[1]]
  dbpath <- tempfile("tempdb", fileext = ".fasta")
  invisible(file.copy(from = system.file(
    "protseq/Plasminogen.fasta",
    package = "protr"
  ), to = dbpath))

  pssmmat <- extractPSSM(seq = x, database.path = dbpath)
  pssmacc <- extractPSSMAcc(pssmmat, lag = 3)
  tail(pssmacc)
}
}
\references{
Wold, S., Jonsson, J., Sj\"{o}rstr\"{o}m, M., Sandberg,
M., & R\"{a}nnar, S. (1993).
DNA and peptide sequences and chemical processes multivariately modelled
by principal component analysis and partial least-squares projections
to latent structures.
\emph{Analytica chimica acta}, 277(2), 239--253.
}
\seealso{
\link{extractPSSM} \link{extractPSSMFeature}
}
\author{
Nan Xiao <\url{https://nanx.me}>
}
