Package for working with Nucleotides and Amino Acids on The Julia Language
Pkg.init() # Only the first time you install a Julia's Package
Pkg.add("BioSeq") # Install BioSeq.jl
using BioSeq # Starting to use BioSeq
DNA2Seq
for saving memory
DNA2Seq
Nucleotide
and AminoAcid
julia> using BioSeq
julia> const dna4alphabet = alphabet(nt"ACTG", false)
Case Insensitive Alphabet{Nucleotide} of 4 elements:
indice : 256-element Uint8 Array
alphabet : 4-element Nucleotide Array
alphabet indice[alphabet]
Nucleotide (Int64) Uint8 (Int64)
A (65) 0x01 (1)
C (67) 0x02 (2)
T (84) 0x03 (3)
G (71) 0x04 (4)
julia> dnaseq = repeat( nt"GATTACA" , 2 )
14-element Nucleotide Array:
G
A
T
T
A
C
A
G
A
T
T
A
C
A
julia> check(dnaseq, dna4alphabet)
true
julia> protseq = translate(dnaseq,1)
4-element AminoAcid Array:
D
Y
R
L
julia> if ismatch( prosite"<D-x-[RM]" , protseq )
threeletters = swap(protseq, AMINO_1LETTER_TO_3 )
end
4-element ASCIIString Array:
"ASP"
"TYR"
"ARG"
"LEU"
Fork and send a pull request or create a GitHub issue for bug reports or feature requests
02/17/2013
8 months ago
64 commits