Public Documentation
Documentation for BioSymbols.jl
's public interface.
See Internal Documentation for internal package docs.
Contents
Index
BioSymbols.BioSymbols
BioSymbols.AA_A
BioSymbols.AA_B
BioSymbols.AA_C
BioSymbols.AA_D
BioSymbols.AA_E
BioSymbols.AA_F
BioSymbols.AA_G
BioSymbols.AA_Gap
BioSymbols.AA_H
BioSymbols.AA_I
BioSymbols.AA_J
BioSymbols.AA_K
BioSymbols.AA_L
BioSymbols.AA_M
BioSymbols.AA_N
BioSymbols.AA_O
BioSymbols.AA_P
BioSymbols.AA_Q
BioSymbols.AA_R
BioSymbols.AA_S
BioSymbols.AA_T
BioSymbols.AA_Term
BioSymbols.AA_U
BioSymbols.AA_V
BioSymbols.AA_W
BioSymbols.AA_X
BioSymbols.AA_Y
BioSymbols.AA_Z
BioSymbols.ACGT
BioSymbols.ACGTN
BioSymbols.ACGU
BioSymbols.ACGUN
BioSymbols.DNA_A
BioSymbols.DNA_B
BioSymbols.DNA_C
BioSymbols.DNA_D
BioSymbols.DNA_G
BioSymbols.DNA_Gap
BioSymbols.DNA_H
BioSymbols.DNA_K
BioSymbols.DNA_M
BioSymbols.DNA_N
BioSymbols.DNA_R
BioSymbols.DNA_S
BioSymbols.DNA_T
BioSymbols.DNA_V
BioSymbols.DNA_W
BioSymbols.DNA_Y
BioSymbols.RNA_A
BioSymbols.RNA_B
BioSymbols.RNA_C
BioSymbols.RNA_D
BioSymbols.RNA_G
BioSymbols.RNA_Gap
BioSymbols.RNA_H
BioSymbols.RNA_K
BioSymbols.RNA_M
BioSymbols.RNA_N
BioSymbols.RNA_R
BioSymbols.RNA_S
BioSymbols.RNA_U
BioSymbols.RNA_V
BioSymbols.RNA_W
BioSymbols.RNA_Y
BioSymbols.AminoAcid
BioSymbols.BioSymbol
BioSymbols.DNA
BioSymbols.NucleicAcid
BioSymbols.RNA
BioSymbols.alphabet
BioSymbols.alphabet
BioSymbols.alphabet
BioSymbols.compatbits
BioSymbols.compatbits
BioSymbols.complement
BioSymbols.gap
BioSymbols.isGC
BioSymbols.isambiguous
BioSymbols.isambiguous
BioSymbols.iscertain
BioSymbols.iscertain
BioSymbols.iscompatible
BioSymbols.isgap
BioSymbols.ispurine
BioSymbols.ispyrimidine
BioSymbols.stringbyte
Public Interface
BioSymbols.BioSymbols
— ModuleA package to define types for amino acids and nucleic acids and to perform operations on these types. For more information see:
- Amino Acid Symbols: https://github.com/BioJulia/BioSymbols.jl/blob/master/docs/src/aminoacids.md
- Nucleic Acid Symbols: https://github.com/BioJulia/BioSymbols.jl/blob/master/docs/src/nucleicacids.md
- Creating Sequences: https://github.com/BioJulia/BioSymbols.jl/blob/master/docs/src/sequences.md
Functions:
alphabet
compatbits
gap
isGC
isambiguous
iscertain
iscompatible
isgap
ispurine
ispyrimidine
BioSymbols.AA_A
— ConstantAlanine
BioSymbols.AA_B
— ConstantAspartic Acid or Asparagine
BioSymbols.AA_C
— ConstantCysteine
BioSymbols.AA_D
— ConstantAspartic Acid
BioSymbols.AA_E
— ConstantGlutamic Acid
BioSymbols.AA_F
— ConstantPhenylalanine
BioSymbols.AA_G
— ConstantGlycine
BioSymbols.AA_Gap
— ConstantAmino Acid Gap
BioSymbols.AA_H
— ConstantHistidine
BioSymbols.AA_I
— ConstantIsoleucine
BioSymbols.AA_J
— ConstantLeucine or Isoleucine
BioSymbols.AA_K
— ConstantLysine
BioSymbols.AA_L
— ConstantLeucine
BioSymbols.AA_M
— ConstantMethionine
BioSymbols.AA_N
— ConstantAsparagine
BioSymbols.AA_O
— ConstantPyrrolysine
BioSymbols.AA_P
— ConstantProline
BioSymbols.AA_Q
— ConstantGlutamine
BioSymbols.AA_R
— ConstantArginine
BioSymbols.AA_S
— ConstantSerine
BioSymbols.AA_T
— ConstantThreonine
BioSymbols.AA_Term
— ConstantTerminal
BioSymbols.AA_U
— ConstantSelenocysteine
BioSymbols.AA_V
— ConstantValine
BioSymbols.AA_W
— ConstantTryptophan
BioSymbols.AA_X
— ConstantUnspecified or Unknown Amino Acid
BioSymbols.AA_Y
— ConstantTyrosine
BioSymbols.AA_Z
— ConstantGlutamine or Glutamic Acid
BioSymbols.ACGT
— ConstantACGT
Unambiguous DNA.
Examples
julia> ACGT
(DNA_A, DNA_C, DNA_G, DNA_T)
BioSymbols.ACGTN
— ConstantACGTN
Unambiguous DNA and DNA_N
.
Examples
julia> ACGTN
(DNA_A, DNA_C, DNA_G, DNA_T, DNA_N)
BioSymbols.ACGU
— ConstantACGU
Unambiguous RNA.
Examples
julia> ACGU
(RNA_A, RNA_C, RNA_G, RNA_U)
BioSymbols.ACGUN
— ConstantACGUN
Unambiguous RNA and RNA_N
.
Examples
julia> ACGUN
(RNA_A, RNA_C, RNA_G, RNA_U, RNA_N)
BioSymbols.DNA_A
— ConstantDNA Adenine
BioSymbols.DNA_B
— ConstantDNA Cytosine, Guanine or Thymine
BioSymbols.DNA_C
— ConstantDNA Cytosine
BioSymbols.DNA_D
— ConstantDNA Adenine, Guanine or Thymine
BioSymbols.DNA_G
— ConstantDNA Guanine
BioSymbols.DNA_Gap
— ConstantDNA Gap
BioSymbols.DNA_H
— ConstantDNA Adenine, Cytosine or Thymine
BioSymbols.DNA_K
— ConstantDNA Guanine or Thymine
BioSymbols.DNA_M
— ConstantDNA Adenine or Cytosine
BioSymbols.DNA_N
— ConstantDNA Adenine, Cytosine, Guanine or Thymine
BioSymbols.DNA_R
— ConstantDNA Adenine or Guanine
BioSymbols.DNA_S
— ConstantDNA Cytosine or Guanine
BioSymbols.DNA_T
— ConstantDNA Thymine
BioSymbols.DNA_V
— ConstantDNA Adenine, Cytosine or Guanine
BioSymbols.DNA_W
— ConstantDNA Adenine or Thymine
BioSymbols.DNA_Y
— ConstantDNA Cytosine or Thymine
BioSymbols.RNA_A
— ConstantRNA Adenine
BioSymbols.RNA_B
— ConstantRNA Cytosine, Guanine or Uracil
BioSymbols.RNA_C
— ConstantRNA Cytosine
BioSymbols.RNA_D
— ConstantRNA Adenine, Guanine or Uracil
BioSymbols.RNA_G
— ConstantRNA Guanine
BioSymbols.RNA_Gap
— ConstantRNA Gap
BioSymbols.RNA_H
— ConstantRNA Adenine, Cytosine or Uracil
BioSymbols.RNA_K
— ConstantRNA Guanine or Uracil
BioSymbols.RNA_M
— ConstantRNA Adenine or Cytosine
BioSymbols.RNA_N
— ConstantRNA Adenine, Cytosine, Guanine or Uracil
BioSymbols.RNA_R
— ConstantRNA Adenine or Guanine
BioSymbols.RNA_S
— ConstantRNA Cytosine or Guanine
BioSymbols.RNA_U
— ConstantRNA Uracil
BioSymbols.RNA_V
— ConstantRNA Adenine, Cytosine or Guanine
BioSymbols.RNA_W
— ConstantRNA Adenine or Uracil
BioSymbols.RNA_Y
— ConstantRNA Cytosine or Uracil
BioSymbols.AminoAcid
— TypeAn amino acid type.
BioSymbols.BioSymbol
— TypeThe BioSymbol type is an abstract type that represents any kind of biological symbol that may appear in data such as biological sequences, SNP datasets and more.
Every abstract or concrete subtype of BioSymbol is expected to have the following methods defined:
isterm
bytemask
prefix
type_text
BioSymbols.DNA
— TypeA deoxyribonucleic acid type.
BioSymbols.NucleicAcid
— TypeAn abstract nucleic acid type.
BioSymbols.RNA
— TypeA ribonucleic acid type.
BioSymbols.alphabet
— Methodalphabet(AminoAcid)
Get all symbols of AminoAcid
in sorted order.
Examples
julia> alphabet(AminoAcid)
(AA_A, AA_R, AA_N, AA_D, AA_C, AA_Q, AA_E, AA_G, AA_H, AA_I, AA_L, AA_K, AA_M, AA_F, AA_P, AA_S, AA_T, AA_W, AA_Y, AA_V, AA_O, AA_U, AA_B, AA_J, AA_Z, AA_X, AA_Term, AA_Gap)
julia> issorted(alphabet(AminoAcid))
true
BioSymbols.alphabet
— Methodalphabet(DNA)
Get all symbols of DNA
in sorted order.
Examples
julia> alphabet(DNA)
(DNA_Gap, DNA_A, DNA_C, DNA_M, DNA_G, DNA_R, DNA_S, DNA_V, DNA_T, DNA_W, DNA_Y, DNA_H, DNA_K, DNA_D, DNA_B, DNA_N)
julia> issorted(alphabet(DNA))
true
BioSymbols.alphabet
— Methodalphabet(RNA)
Get all symbols of RNA
in sorted order.
Examples
julia> alphabet(RNA)
(RNA_Gap, RNA_A, RNA_C, RNA_M, RNA_G, RNA_R, RNA_S, RNA_V, RNA_U, RNA_W, RNA_Y, RNA_H, RNA_K, RNA_D, RNA_B, RNA_N)
julia> issorted(alphabet(RNA))
true
BioSymbols.compatbits
— Methodcompatbits(aa::AminoAcid)
Return the compatibility bits of aa
as UInt32
.
Examples
julia> compatbits(AA_A)
0x00000001
julia> compatbits(AA_J)
0x00000600
BioSymbols.compatbits
— Methodcompatbits(nt::NucleicAcid)
Return the compatibility bits of nt
as UInt8
.
Examples
julia> compatbits(DNA_A)
0x01
julia> compatbits(DNA_C)
0x02
julia> compatbits(DNA_N)
0x0f
BioSymbols.complement
— Methodcomplement(nt::NucleicAcid)
Return the complementary nucleotide of nt
.
This function returns the union of all possible complementary nucleotides.
Examples
julia> complement(DNA_A)
DNA_T
julia> complement(DNA_N)
DNA_N
julia> complement(RNA_U)
RNA_A
BioSymbols.gap
— Functiongap(::Type{T})::T
Return the gap (indel) representation of T
. By default, gap
is defined for DNA
, RNA
, AminoAcid
and Char
.
Examples
julia> gap(RNA)
RNA_Gap
julia> gap(Char)
'-': ASCII/Unicode U+002D (category Pd: Punctuation, dash)
BioSymbols.isGC
— MethodisGC(nt::NucleicAcid)
Test if nt
is surely either guanine or cytosine.
BioSymbols.isambiguous
— Methodisambiguous(aa::AminoAcid)
Test if aa
is an ambiguous amino acid.
BioSymbols.isambiguous
— Methodisambiguous(nt::NucleicAcid)
Test if nt
is an ambiguous nucleotide.
BioSymbols.iscertain
— Methodiscertain(aa::AminoAcid)
Test if aa
is a non-ambiguous amino acid.
BioSymbols.iscertain
— Methodiscertain(nt::NucleicAcid)
Test if nt
is a non-ambiguous nucleotide e.g. ACGT.
BioSymbols.iscompatible
— Methodiscompatible(x::S, y::S) where S <: BioSymbol
Test if x
and y
are compatible with each other.
Examples
julia> iscompatible(AA_A, AA_R)
false
julia> iscompatible(AA_A, AA_X)
true
julia> iscompatible(DNA_A, DNA_A)
true
julia> iscompatible(DNA_C, DNA_N) # DNA_N can be DNA_C
true
julia> iscompatible(DNA_C, DNA_R) # DNA_R (A or G) cannot be DNA_C
false
BioSymbols.isgap
— Methodisgap(symbol::BioSymbol)
Test if symbol
is a gap.
BioSymbols.ispurine
— Methodispurine(nt::NucleicAcid)
Test if nt
is surely a purine.
BioSymbols.ispyrimidine
— Methodispyrimidine(nt::NucleicAcid)
Test if nt
is surely a pyrimidine.
BioSymbols.stringbyte
— Functionstringbyte(::BioSymbol)::UInt8
For biosymbol types that can be represented as ASCII characters, stringbyte(x)
returns the printable ASCII byte that represents the character in a string.
Examples
julia> stringbyte(DNA_A) == UInt8('A')
true
julia> stringbyte(AA_Gap) == UInt8('-')
true