{-# LANGUAGE NoMonomorphismRestriction #-} -- | Turner energy data as used in the ViennaRNA package. -- -- TODO should use energy type for tables, not int! module Biobase.DataSource.Vienna where import Data.Map (Map,empty) import Data.Ix.Tuple import Data.PrimitiveArray import Data.PrimitiveArray.Ix import Biobase.Constants import Biobase.DataSource.Turner.Tables import Biobase.RNA import Biobase.RNA.NucBounds import Biobase.RNA.ViennaPair import Biobase.Types.Energy import Biobase.Types.Partition -- Type for Vienna Tables -- type ViennaEnergySet = (Temperature, ViennaTables, ViennaTables) type ViennaIntTables = Turner2004 ViennaPair Nucleotide Int type ViennaEnergyTables = Turner2004 ViennaPair Nucleotide Energy type ViennaPartitionTables = Turner2004 ViennaPair Nucleotide Partition type Temperature = Double -- | An empty Turner2004 set, with Vienna-style keys for tables. Unused fields -- are commented out. Activate them in BiobaseTurner before doing the same -- here! emptyTables :: ViennaIntTables emptyTables = Turner2004 --stack { stack = emptyIV --dangle , dangle3 = emptyPB , dangle5 = emptyPB --hairpin , hairpinL = emptyV , hairpinMM = emptyIV , hairpinLookup = empty --eInf --eInf --eInf --eInf --bulge , bulgeL = emptyV --eInf --internal , iloop1x1 = emptyPPBB , iloop1x2 = emptyPPBBB , iloop2x2 = emptyPPBBBB , iloopMM = emptyPBB , iloop2x3MM = emptyPBB , iloop1xnMM = emptyPBB , iloopL = emptyV --multibranch , multiMM = emptyPBB , ninio = eInf , maxNinio = eInf , multiOffset = eInf , multiNuc = eInf , multiHelix = eInf --eInf --eInf --exterior , extMM = emptyPBB --coaxial stacking --emptyIV --emptyIV --emptyIV --scalar values , largeLoop = eInf -- large loop is always double , termAU = eInf , intermolecularInit = eInf } emptyIV = fromAssocs minExtended maxExtended eInf [] emptyPB = fromAssocs minExtended (maxBound,nucU) eInf [] emptyPBB = fromAssocs minExtended (maxBound,nucU,nucU) eInf [] emptyPPBB = fromAssocs minExtended (maxBound,maxBound,nucU,nucU) eInf [] emptyPPBBB = fromAssocs minExtended (maxBound,maxBound,nucU,nucU,nucU) eInf [] emptyPPBBBB = fromAssocs minExtended (maxBound,maxBound,nucU,nucU,nucU,nucU) eInf [] -- TODO should be an empty a emptyV = fromAssocs 0 30 eInf []