This is a very simple flexible class to store DNA and aminoacid aligned sequences together with their physicochemical properties. That is, a place where each aminoacid or codon from the sequence is represented by numerical value from a physicochemical index.
Usage
MatrixSeq(seqs, matrix, names, aaindex, phychem, accession)
# S4 method for MatrixSeq
show(object)
Arguments
- seqs, matrix, names, aaindex, phychem, accession
See detail section
- object
An object from 'MatrixSeq' class
Value
Given the slot values, it defines a MatrixSeq-class.
A MatrixSeq-class object
Print/show of a MatrixSeq-class object.
Details
- seqs:
A string character vector of DNA or aminoacid sequences.
- matrix:
A numerical matrix or a numerical vector (in the constructor) carrying the specified aminoacid physicochemical indices for aminoacid in the DNA or aminoacid sequence(s).
- names:
Alias/names/IDs DNA or aminoacid sequences.
- aaindex:
Aminoacid index database where the physicochemical index can be found.
- phychem:
Description of the physicochemical index applied to represent the DNA or aminoacid sequences.
- accession:
Accession number or ID of the applied physicochemical index in the database.
Author
Robersy Sanchez https://genomaths.com
Examples
aln <- c(S1 = "ATGCGGATTAGA", S2 = "ATGACGATCACA", S3 = "ATGAGATCACAG")
cd <- DNAMultipleAlignment(aln)
r1 <- peptide_phychem_index(unmasked(cd), acc = "EISD840101")
r1
#> MatrixSeq with 3 rows (sequences) and 4 columns (aminoacids/codons):
#> -------
#> A1 A2 A3 A4
#> S1 0.26 -1.76 0.73 -1.76
#> S2 0.26 -0.18 0.73 -0.18
#> S3 0.26 -1.76 -0.26 -0.69
#> -------
#> Slots: 'seqs', 'matrix', 'names', 'aaindex', 'phychem', 'accession
## Extract the second aminoacid sequence
r1[2]
#> MatrixSeq with 4 rows (aminoacids/codons) and 1 column (sequence):
#> -------
#> S2
#> A1 0.26
#> A2 -0.18
#> A3 0.73
#> A4 -0.18
#> -------
#> Slots: 'seqs', 'matrix', 'names', 'aaindex', 'phychem', 'accession
## Using the sequence given name
r1$S1
#> MatrixSeq with 4 rows (aminoacids/codons) and 1 column (sequence):
#> -------
#> S1
#> A1 0.26
#> A2 -1.76
#> A3 0.73
#> A4 -1.76
#> -------
#> Slots: 'seqs', 'matrix', 'names', 'aaindex', 'phychem', 'accession
## Extract the second aminoacid value from the first sequence
r1[1,2]
#> -------
#> A2
#> S1 -1.76
#> -------
#> Slots: 'seqs', 'matrix', 'names', 'aaindex', 'phychem', 'accession
## Change the name the second sequence
names(r1) <- c('S1', 'Seq1', 'S1')
r1
#> MatrixSeq with 3 rows (sequences) and 4 columns (aminoacids/codons):
#> -------
#> A1 A2 A3 A4
#> S1 0.26 -1.76 0.73 -1.76
#> Seq1 0.26 -0.18 0.73 -0.18
#> S1 0.26 -1.76 -0.26 -0.69
#> -------
#> Slots: 'seqs', 'matrix', 'names', 'aaindex', 'phychem', 'accession
## Extract the amino acid sequences
slot(r1, 'seqs')
#> S1 Seq1 S1
#> "MRIR" "MTIT" "MRSQ"