MatrixSeq: Definition of MatrixSeq-class

View source: R/allClasses.R

MatrixSeq-classR Documentation

Definition of MatrixSeq-class

Description

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 signature 'MatrixSeq'
show(object)

Arguments

seqs, matrix, names, aaindex, phychem, accession

See detail section

object

An object from 'MatrixSeq' class

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.

Value

Given the slot values, it defines a MatrixSeq-class.

A MatrixSeq-class object

Print/show of a MatrixSeq-class object.

Author(s)

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

## Extract the second aminoacid sequence
r1[2]

## Using the sequence given name 
r1$S1

## Extract the second aminoacid value from the first sequence
r1[1,2]

## Change the name the second sequence
names(r1) <- c('S1', 'Seq1', 'S1')
r1

## Extract the amino acid sequences
slot(r1, 'seqs')


genomaths/GenomAutomorphism documentation built on May 10, 2024, 12:11 a.m.