needwunsQS: (Deprecated) Needleman-Wunsch Global Alignment

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Simple gap implementation of Needleman-Wunsch global alignment algorithm.

Usage

1
needwunsQS(s1, s2, substmat, gappen = 8)

Arguments

s1, s2

an R character vector of length 1 or an XString object.

substmat

matrix of alignment score values.

gappen

penalty for introducing a gap in the alignment.

Details

Follows specification of Durbin, Eddy, Krogh, Mitchison (1998). This function has been deprecated and is being replaced by pairwiseAlignment.

Value

An instance of class "PairwiseAlignments".

Author(s)

Vince Carey (stvjc@channing.harvard.edu) (original author) and H. Pag<c3><a8>s (current maintainer).

References

R. Durbin, S. Eddy, A. Krogh, G. Mitchison, Biological Sequence Analysis, Cambridge UP 1998, sec 2.3.

See Also

pairwiseAlignment, PairwiseAlignments-class, substitution.matrices

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
  ## This function has been deprecated
  ## Use 'pairwiseAlignment' instead.

  ## nucleotide alignment
  mat <- matrix(-5L, nrow = 4, ncol = 4)
  for (i in seq_len(4)) mat[i, i] <- 0L
  rownames(mat) <- colnames(mat) <- DNA_ALPHABET[1:4]
  s1 <- DNAString(paste(sample(DNA_ALPHABET[1:4], 1000, replace=TRUE), collapse=""))
  s2 <- DNAString(paste(sample(DNA_ALPHABET[1:4], 1000, replace=TRUE), collapse=""))
  nw0 <- needwunsQS(s1, s2, mat, gappen = 0)
  nw1 <- needwunsQS(s1, s2, mat, gappen = 1)
  nw5 <- needwunsQS(s1, s2, mat, gappen = 5)

  ## amino acid alignment
  needwunsQS("PAWHEAE", "HEAGAWGHEE", substmat = "BLOSUM50")

## End(Not run)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Warning message:
'XString.needwunsQS' is deprecated.
Use 'pairwiseAlignment' instead.
See help("Deprecated") 
Warning message:
'XString.needwunsQS' is deprecated.
Use 'pairwiseAlignment' instead.
See help("Deprecated") 
Warning message:
'XString.needwunsQS' is deprecated.
Use 'pairwiseAlignment' instead.
See help("Deprecated") 
Global PairwiseAlignments (1 of 1)
pattern: --P-AW-HEAE
subject: HEAGAWGHE-E
score: 81 
Warning message:
'XString.needwunsQS' is deprecated.
Use 'pairwiseAlignment' instead.
See help("Deprecated") 

Biostrings documentation built on Nov. 8, 2020, 11:12 p.m.