Safe Haskell | None |
---|---|
Language | Haskell2010 |
Biobase.Types.NucleotideSequence
Description
Wrappers around biosequences.
Synopsis
- newtype SequenceID = SequenceID {}
- sequenceID :: Iso' SequenceID ByteString
- sequenceIDstring :: Iso' SequenceID String
- newtype RNAseq = RNAseq {}
- rnaseq :: Iso' RNAseq ByteString
- mkRNAseq :: ByteString -> RNAseq
- newtype DNAseq = DNAseq {}
- dnaseq :: Iso' DNAseq ByteString
- mkDNAseq :: ByteString -> DNAseq
- rna2dna :: Char -> Char
- rnaComplement :: Char -> Char
- dna2rna :: Char -> Char
- dnaComplement :: Char -> Char
- class Transcribe f where
- type TranscribeTo f :: *
- transcribe :: Iso' f (TranscribeTo f)
- class Complement f where
- complement :: Iso' f f
Documentation
newtype SequenceID Source #
A sequence identifier. Just a newtype wrapped text field. Because we can never know what people are up to, this is utf8-encoded.
TODO Provide Iso'
for Text
, too?
TODO move into Biobase.Types.SequenceID
Constructors
SequenceID | |
Fields |
Instances
sequenceIDstring :: Iso' SequenceID String Source #
Convert to a string in a unicode-aware manner.
A short RNA sequence.
It is an instance of Ixed
to allow RNAseq (BS.pack "cag") ^? ix 2 == Just
.g
Constructors
RNAseq | |
Fields |
Instances
mkRNAseq :: ByteString -> RNAseq Source #
A short DNA sequence.
Note everything really long should be handled by specialized libraries with streaming capabilities.
Constructors
DNAseq | |
Fields |
Instances
mkDNAseq :: ByteString -> DNAseq Source #
rna2dna :: Char -> Char Source #
Simple case translation from U
to T
. with upper and lower-case
awareness.
rnaComplement :: Char -> Char Source #
Single character RNA complement.
dna2rna :: Char -> Char Source #
Simple case translation from T
to U
with upper- and lower-case
awareness.
dnaComplement :: Char -> Char Source #
Single character DNA complement.
class Transcribe f where Source #
Transcribes a DNA sequence into an RNA sequence. Note that transcribe
is
actually very generic. We just define its semantics to be that of
biomolecular transcription.
transcribe
makes the assumption that, given DNA -> RNA
, we transcribe
the coding strand.
http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html
@ DNAseq ACGT ^. transcribe == RNAseq ACGU RNAseq ACGU ^. transcribe
== DNAseq ACGT RNAseq ACGU ^. from transcribe :: DNAseq == DNAseq ACGT
@
Associated Types
type TranscribeTo f :: * Source #
Methods
transcribe :: Iso' f (TranscribeTo f) Source #
Instances
Transcribe RNAseq Source # | Transcribe a RNA sequence into an DNA sequence. This does not |
Defined in Biobase.Types.NucleotideSequence Associated Types type TranscribeTo RNAseq :: Type Source # Methods | |
Transcribe DNAseq Source # | Transcribe a DNA sequence into an RNA sequence. This does not |
Defined in Biobase.Types.NucleotideSequence Associated Types type TranscribeTo DNAseq :: Type Source # Methods |
class Complement f where Source #
The complement of a biosequence.
Methods
complement :: Iso' f f Source #
Instances
Complement RNAseq Source # | |
Defined in Biobase.Types.NucleotideSequence | |
Complement DNAseq Source # | |
Defined in Biobase.Types.NucleotideSequence |