RNAdesign-0.1.2.2: Multi-target RNA sequence design

Safe HaskellNone

BioInf.RNAdesign.CandidateChain

Synopsis

Documentation

data Candidate Source

A single candidate, with its sequence and the score, this sequence receives. Candidates are ordered by their scores.

Constructors

Candidate 

Fields

candidate :: Primary
 
score :: Score
 

newtype Score Source

The likelihood score we get.

TODO replace Score Likelihood / LogLikelihood (once we switch to the more generic MCMC library)

Constructors

Score 

Fields

unScore :: Double
 

mkInitial :: (MonadPrim m, PrimMonad m) => (Primary -> Score) -> Int -> DesignProblem -> Rand m CandidateSource

Create an initial, legal, candidate.

unfoldStream :: forall m. (MonadPrim m, PrimMonad m) => Int -> Int -> Int -> (Primary -> Score) -> (Candidate -> Candidate -> Rand m Bool) -> DesignProblem -> Candidate -> Stream (Rand m) CandidateSource

Create a stream of Candidates from an initial candidate.

mutateOneAssignmentWithSource

Arguments

:: (MonadPrim m, PrimMonad m) 
=> (Primary -> Score)

the likelihood function, gives a sequence a score

-> (Candidate -> Candidate -> Rand m Bool)

choose between old and new sequence (monadic, stochastic)

-> Candidate

old / current sequence

-> Assignment

possible assignments for the sequence

-> Rand m Candidate

the new sequence

Mutate the current (or old) sequence under the possible assignments as prescribed by Assignment. The modifying assignment is selected uniformly. The monadic old -> new -> Rand m Bool function chooses between the old and the new candidate. It can be used to, e.g., allow always choosing new if it is better, but choosing new as well if some stochastic value (hence dependence on Rand m) indicates so.