base_coord | R Documentation |
Given a string denoting a codon or base from the DNA (or RNA) alphabet, function base_coord return the base coordinates in the specify genetic-code Abelian group, as given in reference (1).
GRanges
of bases.Function seq2granges transform an object from
DNAStringSet
,
DNAMultipleAlignment-class
or a character into
an object from BaseSeq.
Function base_seq2string_set transforms an object from
BaseSeq into an object from DNAStringSet-class
.
base_coord(base = NULL, filepath = NULL, cube = "ACGT", group = "Z4", ...)
## S4 method for signature 'DNAStringSet_OR_NULL'
base_coord(
base = NULL,
filepath = NULL,
cube = c("ACGT", "AGCT", "TCGA", "TGCA", "CATG", "GTAC", "CTAG", "GATC", "ACTG",
"ATCG", "GTCA", "GCTA", "CAGT", "TAGC", "TGAC", "CGAT", "AGTC", "ATGC", "CGTA",
"CTGA", "GACT", "GCAT", "TACG", "TCAG"),
group = c("Z4", "Z5"),
start = NA,
end = NA,
chr = 1L,
strand = "+"
)
seq2granges(base = NULL, filepath = NULL, ...)
## S4 method for signature 'DNAStringSet_OR_NULL'
seq2granges(
base = NULL,
filepath = NULL,
start = NA,
end = NA,
chr = 1L,
strand = "+",
seq_alias = NULL,
...
)
base_seq2string_set(x, ...)
## S4 method for signature 'BaseSeq'
base_seq2string_set(x)
base_matrix(base, ...)
## S4 method for signature 'DNAStringSet_OR_NULL'
base_matrix(
base,
cube = c("ACGT", "AGCT", "TCGA", "TGCA", "CATG", "GTAC", "CTAG", "GATC", "ACTG",
"ATCG", "GTCA", "GCTA", "CAGT", "TAGC", "TGAC", "CGAT", "AGTC", "ATGC", "CGTA",
"CTGA", "GACT", "GCAT", "TACG", "TCAG"),
group = c("Z4", "Z5"),
seq_alias = NULL
)
base |
An object from a |
filepath |
A character vector containing the path to a file in fasta format to be read. This argument must be given if codon & base arguments are not provided. |
cube |
A character string denoting one of the 24 Genetic-code cubes, as given in references (2 2 3). |
group |
A character string denoting the group representation for the given base or codon as shown in reference (1). |
... |
Not in use yet. |
start , end , chr , strand |
Optional parameters required to build a
|
seq_alias |
DNA sequence alias/ID and description. |
x |
A 'BaseSeq' class object. |
Function base_coord is defined only for pairwise aligned sequences. Symbols "-" and "N" usually found in DNA sequence alignments to denote gaps and missing/unknown bases are represented by the number: '-1' on Z4 and '0' on Z5. In Z64 the symbol 'NA' will be returned for codons including symbols "-" and "N".
For the sake of brevity the metacolumns from the object returned by function 'seq2granges' are named as 'S1', 'S2', 'S3', and so on. The original DNA sequence alias are stored in the slot named 'seq_alias'. (see examples).
Depending on the function called, different object will be returned:
This function returns a BaseGroup
object
carrying the DNA sequence(s) and their respective coordinates in the
requested Abelian group of base representation (one-dimension, "Z4" or
"Z5"). Observe that to get coordinates in the set of of integer numbers
("Z") is also possible but they are not defined to integrate a Abelian
group. These are just used for the further insertion the codon set in the
3D space (R^3).
This function returns a BaseGroup object carrying the DNA sequence(s), one
base per ranges. A BaseGroup class object inherits from
GRanges-class
.
This function returns a DNAStringSet-class
.
A BaseGroup-class object.
Robersy Sanchez https://genomaths.com
Robersy Sanchez, Jesus Barreto (2021) Genomic Abelian Finite Groups. doi:10.1101/2021.06.01.446543
M. V Jose, E.R. Morgado, R. Sanchez, T. Govezensky, The 24 possible algebraic representations of the standard genetic code in six or in three dimensions, Adv. Stud. Biol. 4 (2012) 119-152.PDF.
R. Sanchez. Symmetric Group of the Genetic-Code Cubes. Effect of the Genetic-Code Architecture on the Evolutionary Process MATCH Commun. Math. Comput. Chem. 79 (2018) 527-560.
Symmetric Group of the Genetic-Code Cubes.
codon_coord
and base2int
.
Symmetric Group of the Genetic-Code Cubes.
base_coord and codon_coord.
## Example 1. Let's get the base coordinates for codons "ACG"
## and "TGC":
x0 <- c("ACG", "TGC")
x1 <- DNAStringSet(x0)
x1
## Get the base coordinates on cube = "ACGT" on the Abelian group = "Z4"
base_coord(x1, cube = "ACGT", group = "Z4")
## Example 2. Load a pairwise alignment
data("aln", package = "GenomAutomorphism")
aln
## DNA base representation in the Abelian group Z4
bs_cor <- base_coord(
base = aln,
cube = "ACGT"
)
bs_cor
## Example 3. DNA base representation in the Abelian group Z5
bs_cor <- base_coord(
base = aln,
cube = "ACGT",
group = "Z5"
)
bs_cor
## Example 4. Load a multiple sequence alignment (MSA) of primate BRCA1 DNA
## repair genes
data("brca1_aln2", package = "GenomAutomorphism")
brca1_aln2
## Get BaseSeq-class object
gr <- seq2granges(brca1_aln2)
gr
## Transform the BaseSeq-class object into a DNAStringSet-class object
str_set <- base_seq2string_set(gr)
str_set
## Recovering the original MSA
DNAMultipleAlignment(as.character(str_set))
## Example 5.
base_matrix(base = aln, cube = "CGTA", group = "Z5")
## Example 5.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.