Stochastic

Context-Free

Grammars

for

Modeling

RNA

Yasubumi

Sakakibarayz

Michael

Browny

Rebecca

C.

Underwoody

I.

Saira

Mianx

David

Hausslery

y

Computer

and

Information

Sciences

x

Sinsheimer

Laboratories

University

of

California

Santa

Cruz

CA

USA

z

present

address

ISIS

Fujitsu

Labs

Ltd.

Miyamoto

Numazu

Shizuoka

Japan

email

haussler@cse.ucsc.edu

Abstract

Stochastic

context-free

grammars

-LRB-

SCFGs

-RRB-

are

used

to

fold

align

and

model

a

family

of

homologous

RNA

sequences

SCFGs

capture

the

sequences

common

primary

and

secondary

structure

and

generalize

the

hidden

Markov

models

-LRB-

HMMs

-RRB-

used

in

related

work

on

protein

and

DNA

The

novel

aspect

of

this

work

is

that

SCFG

parameters

are

learned

automatically

from

unaligned

unfolded

training

sequences

A

generalization

of

the

HMM

forwardbackward

algorithm

is

introduced

The

new

algorithm

based

on

tree

grammars

and

faster

than

the

previously

proposed

SCFG

inside-outside

algorithm

is

tested

on

the

transfer

RNA

-LRB-

tRNA

-RRB-

family

Results

show

the

model

can

discern

tRNA

from

similar-length

RNA

sequences

can

find

secondary

structure

of

new

tRNA

sequences

and

can

give

multiple

alignments

of

large

sets

of

tRNA

sequences

The

model

is

extended

to

handle

introns

in

tRNA

Introduction

Attempts

to

understand

the

folding

structure

function

and

evolution

of

molecules

have

resulted

in

the

confluence

of

many

diverse

disciplines

ranging

from

structural

biology

and

chemistry

to

computer

science

and

computational

linguistics

Rapid

generation

of

sequence

data

in

recent

years

thus

provides

abundant

opportunities

for

developing

new

approaches

such

as

hidden

Markov

models

-LRB-

HMMs

-RRB-

to

problems

in

computational

biology

-LSB-

-RSB-

In

this

paper

in

an

approach

highly

related

to

our

work

on

modeling

protein

families

with

HMMs

-LSB-

-RSB-

we

apply

stochastic

contextfree

grammars

-LRB-

SCFGs

-RRB-

to

the

problems

of

statistical

modeling

database

searching

multiple

align

ment

and

prediction

of

the

secondary

structure

of

RNA

families

RNA

is

mostly

involved

in

the

biological

machinery

that

expresses

the

genetic

information

from

DNA

to

protein

Information

is

encoded

in

RNA

by

the

primary

structure

the

linear

arrangement

of

four

different

constituent

nucleotides

The

individual

nucleotides

adenine

-LRB-

A

-RRB-

cytosine

-LRB-

C

-RRB-

guanine

-LRB-

G

-RRB-

and

uracil

-LRB-

U

-RRB-

interact

in

specific

ways

to

form

characteristic

secondary-structure

motifs

such

as

helices

loops

and

bulges

Further

folding

and

hydrogen-bonding

interactions

between

remote

regions

orient

these

secondary-structure

elements

with

respect

to

each

other

to

form

the

functional

system

Higher-order

interactions

with

other

proteins

and/or

nucleic

acids

may

also

occur

In

general

however

the

folding

of

an

RNA

chain

into

a

functional

molecule

is

largely

governed

by

the

formation

of

intramolecular

A-U

and

G-C

Watson-Crick

pairs

as

well

as

G-U

and

more

rarely

G-A

base

pairs

Such

base

pairs

constitute

so-called

biological

palindromes

in

the

genome

Comparative

analyses

of

two

or

more

protein

or

nucleic-acid

sequences

have

been

used

widely

in

detection

and

evaluation

of

biological

similarities

and

evolutionary

relationships

Several

methods

of

producing

these

multiple

sequence

alignments

have

been

developed

most

based

on

dynamic

programming

techniques

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

However

when

RNA

sequences

are

to

be

aligned

both

the

primary

and

secondary

structure

need

to

be

taken

into

consideration

since

the

generation

of

a

multiple

sequence

alignment

and

an

analysis

of

folding

are

mutually

dependent

exercises

Thus

the

elucidation

of

common

folding

patterns

among

two

or

more

sequences

may

indicate

the

pertinent

regions

to

be

aligned

and

vice

versa

-LSB-

-RSB-

Currently

there

are

two

principal

methods

for

predicting

secondary

structure

of

RNA

Phylogenetic

analysis

for

homologous

RNA

molecules

re

lies

on

alignment

and

subsequent

folding

of

many

sequences

into

similar

structures

-LRB-

reviewed

in

-LSB-

-RSB-

-RRB-

Energy

minimization

depends

on

thermodynamic

parameters

and

computer

algorithms

to

evaluate

the

optimal

and

suboptimal

free

energy

folding

of

an

RNA

species

-LRB-

reviewed

in

-LSB-

-RSB-

-RRB-

Our

method

of

multiple

alignment

and

folding

differs

markedly

from

the

conventional

techniques

because

it

builds

a

statistical

model

during

rather

than

after

the

process

of

alignment

and

folding

Such

an

approach

has

been

applied

successfully

to

modeling

protein

families

with

HMMs

-LSB-

-RSB-

Though

in

principle

HMMs

could

be

used

for

RNA

we

strongly

suspect

that

the

more

general

statistical

models

described

here

will

be

required

Since

base-pairing

interactions

most

notably

A-U

G-C

and

G-U

play

such

a

dominant

role

in

determining

RNA

structure

and

function

any

statistical

method

that

does

not

consider

this

will

eventually

encounter

insurmountable

problems

The

problem

is

that

if

two

positions

are

base-paired

in

the

typical

RNA

then

the

bases

occurring

there

will

be

highly

correlated

whereas

the

standard

HMM

approach

treats

them

as

having

independent

distributions

Here

we

describe

a

means

to

generalize

HMMs

to

model

most

of

the

interactions

seen

in

RNA

using

formal

language

theory

As

in

the

elegant

work

of

Searls

-LSB-

-RSB-

we

view

the

strings

of

characters

representing

pieces

of

DNA

RNA

and

protein

as

sentences

derived

from

a

formal

grammar

The

simplest

kind

of

grammar

is

a

regular

grammar

in

which

strings

are

derived

from

productions

-LRB-

rewriting

rules

-RRB-

of

the

forms

S

aS

and

S

a

where

S

is

a

nonterminal

symbol

which

does

not

appear

in

the

final

string

and

a

is

a

terminal

symbol

which

appears

as

a

letter

in

the

final

string

Searls

has

shown

base

pairing

in

RNA

can

be

described

by

a

context-free

grammar

-LRB-

CFG

-RRB-

a

more

powerful

class

of

formal

grammars

than

the

regular

grammar

-LRB-

see

Section

-RRB-

CFGs

are

often

used

to

define

the

syntax

of

programming

languages

A

CFG

is

similar

to

a

regular

grammar

but

permits

a

greater

variety

of

productions

such

as

those

of

the

forms

S

SS

and

S

aSa

As

described

by

Searls

it

is

precisely

these

additional

types

of

productions

that

are

needed

to

describe

the

base-pairing

structure

in

RNA

In

particular

the

productions

of

the

forms

can

not

describe

all

RNA

structure

but

we

believe

they

can

account

for

enough

to

make

useful

models

In

particular

CFGs

can

not

account

for

pseudoknots

structures

S

A

S

U

S

U

S

A

S

G

S

C

and

S

C

S

G

describe

the

structure

in

RNA

due

to

Watson-Crick

base

pairing

Using

productions

of

this

type

a

CFG

can

specify

the

language

of

biological

palindromes

Searls

-LSB-

-RSB-

argues

the

benefits

of

using

contextfree

grammars

as

models

for

RNA

folding

but

does

not

discuss

methods

for

estimating

the

grammar

from

training

sequences

One

purpose

of

this

paper

is

to

provide

an

effective

method

for

estimating

a

stochastic

context-free

grammar

to

model

a

family

of

RNA

sequences

If

we

specify

a

probability

for

each

production

in

a

grammar

we

obtain

a

stochastic

grammar

A

stochastic

grammar

assigns

a

probability

to

each

string

it

derives

Stochastic

regular

grammars

are

equivalent

to

HMMs

and

suggest

an

interesting

generalization

from

HMMs

to

stochastic

contextfree

grammars

-LSB-

-RSB-

In

this

paper

we

pursue

a

stochastic

model

of

the

family

of

transfer

RNAs

-LRB-

tRNAs

-RRB-

by

using

a

SCFG

that

is

similar

to

our

protein

HMMs

-LSB-

-RSB-

but

that

incorporates

base-pairing

information

Here

we

build

a

SCFG

forming

a

statistical

model

of

tRNA

sequences

in

much

the

same

way

that

we

constructed

an

HMM

representing

a

statistical

model

of

a

protein

family

We

use

this

model

to

search

a

database

for

tRNA-like

sequences

and

to

obtain

a

multiple

alignment

in

the

same

manner

as

for

proteins

We

also

use

the

model

to

fold

unfolded

tRNA

sequences

i.e.

to

determine

the

base

pairing

that

defines

their

secondary

structure

In

preliminary

work

-LSB-

-RSB-

we

derived

a

SCFG

's

parameters

directly

from

an

existing

alignment

of

tRNA

sequences

to

see

how

well

the

SCFG

could

model

an

RNA

family

Here

we

attempt

to

learn

the

parameters

entirely

automatically

from

a

set

of

unaligned

primary

sequences

with

a

novel

generalization

of

the

forward-backward

algorithm

commonly

used

to

train

HMMs

Our

algorithm

is

based

on

tree

grammars

and

is

more

efficient

than

the

inside-outside

algorithm

-LSB-

-RSB-

a

computationally

expensive

generalization

of

the

forward-backward

algorithm

developed

to

train

SCFGs

-LSB-

-RSB-

We

use

our

algorithm

to

derive

a

trained

grammar

from

a

training

set

of

tRNA

sequences

For

our

training

set

we

choose

unfolded

and

unaligned

sequences

at

random

from

tRNA

sequences

in

the

generated

when

a

single-stranded

loop

region

forms

standard

Watson-Crick

base

pairs

with

a

complementary

sequence

outside

the

loop

compilation

of

aligned

tRNA

sequences

-LSB-

-RSB-

maintained

by

EMBL

Data

Library

We

withhold

the

remaining

sequences

in

order

to

test

the

trained

grammar

on

data

not

used

in

training

We

assess

the

grammar

's

ability

to

perform

three

tasks

to

discriminate

tRNA

sequences

from

nontRNA

sequences

to

produce

multiple

alignments

and

to

ascertain

the

secondary

structure

of

new

sequences

The

results

show

that

the

grammar

can

perfectly

discriminate

tRNA

sequences

from

other

RNA

sequences

of

similar

length

can

produce

multiple

alignments

of

large

collections

of

tRNA

sequences

and

can

reliably

determine

the

secondary

structure

of

new

tRNA

sequences

Genes

for

tRNA

often

possess

introns

regions

that

are

excised

during

formation

of

the

mature

tRNA

molecule

Thus

to

correctly

identify

tR

NAs

in

genomic

sequences

the

grammar

must

be

extended

to

model

introns

A

useful

advantage

of

SCFGs

is

their

modularity

An

intron

grammar

can

be

deduced

separately

from

the

grammar

for

plain

tRNA

then

these

two

separate

grammars

can

be

combined

into

a

single

grammar

by

uniting

the

two

sets

of

independent

productions

and

maintaining

their

different

probability

distributions

Methods

Context-free

grammars

for

RNA

A

grammar

is

principally

a

set

of

productions

-LRB-

rewriting

rules

-RRB-

that

are

used

to

generate

a

set

of

strings

i.e.

a

language

The

productions

are

applied

iteratively

to

generate

a

string

a

process

called

derivation

For

example

application

of

the

productions

in

Figure

could

generate

the

RNA

sequence

CAUCAGGGAAGAUCUCUUG

by

the

following

derivation

Beginning

with

the

start

symbol

any

production

with

left

of

the

arrow

can

be

chosen

to

replace

If

the

production

is

selected

-LRB-

in

this

case

this

is

the

only

production

available

-RRB-

then

the

symbol

replaces

This

derivation

step

is

written

-RRB-

where

the

double

arrow

signifies

application

of

a

production

Next

if

the

production

C

G

is

selected

the

derivation

step

is

-RRB-

C

G.

Continuing

with

similar

derivation

steps

each

time

choosing

a

nonterminal

symbol

and

replacing

it

with

the

right-hand

side

of

an

appropriate

production

we

obtain

the

following

derivation

terminating

with

the

desired

sequence

P

f

G

C

G

G

A

U

U

A

U

A

U

C

G

U

A

G

C

C

G

A

U

A

U

U

C

g

Figure

This

set

of

productions

P

generates

RNA

sequences

with

a

certain

restricted

structure

such

as

that

in

Figure

are

nonterminals

A

U

G

and

C

are

terminals

representing

the

four

nucleotides

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

CAUCAGGGAAGAUCUCUUG

A

derivation

can

be

arranged

in

a

tree

structure

called

a

parse

tree

-LRB-

see

Figure

-RRB-

A

parse

tree

represents

the

syntactic

structure

of

a

sequence

produced

by

a

grammar

For

an

RNA

sequence

this

syntactic

structure

corresponds

to

the

physical

secondary

structure

Formally

a

context-free

grammar

G

consists

of

a

set

of

nonterminal

symbols

N

a

terminals

alphabet

a

set

of

productions

P

and

the

start

symbol

For

a

nonempty

set

of

symbols

X

let

X

denote

the

set

of

all

finite

strings

of

symbols

in

X.

Every

CFG

production

has

the

form

S

ff

where

S

N

and

ff

-LRB-

N

-LSB-

-RRB-

i.e.

the

lefthand

side

consists

of

one

nonterminal

and

there

is

no

restriction

on

the

number

or

placement

of

nonterminals

and

terminals

on

the

right-hand

side

The

production

S

ff

means

that

the

nonterminal

S

can

be

replaced

by

the

string

ff

If

S

ff

is

a

production

in

P

then

for

any

strings

and

ffi

in

-LRB-

N

-LSB-

-RRB-

we

define

S

ffi

-RRB-

ffffi

and

we

say

that

S

ffi

directly

derives

ffffi

in

G

We

say

the

string

can

be

derived

from

ff

denoted

ff

-RRB-

if

there

exists

a

sequence

of

direct

derivations

-RRB-

-RRB-

ffn

-RRB-

ffn

such

that

ff

ffn

ffi

-LRB-

N

-LSB-

-RRB-

and

n

Such

a

sequence

is

called

a

derivation

Thus

a

derivation

corresponds

to

an

order

of

productions

applied

to

generate

a

string

The

grammar

generates

the

language

fw

j

-RRB-

wg

the

set

of

all

terminal

strings

w

that

can

be

derived

from

the

grammar

Our

work

in

modeling

RNA

uses

productions

of

only

the

following

forms

S

SS

S

aSa

S

aS

S

S

and

S

a

where

S

is

a

nonterminal

and

a

is

a

terminal

S

aSa

productions

describe

the

base

pairings

in

RNA

S

aS

and

S

a

describe

unpaired

bases

S

SS

describe

branched

secondary

structures

and

S

S

-LRB-

called

skip

productions

-RRB-

are

used

in

the

context

of

multiple

alignments

C

A

U

C

A

GAAGGG

UA

C

U

C

U

U

G

S

S

Figure

For

the

RNA

sequence

CAUCAGGG

AAGAUCUCUUG

the

grammar

whose

productions

are

given

in

Figure

yields

this

parse

tree

This

parse

tree

reflects

a

specific

secondary

structure

As

in

the

protein

HMM

of

-LSB-

-RSB-

we

distinguish

two

different

types

of

nonterminals

match

and

insert

The

match

nonterminals

in

a

grammar

correspond

to

important

structural

positions

in

an

RNA

or

columns

in

a

multiple

alignment

These

constitute

the

main

line

of

the

grammar

Insert

nonterminals

generate

nucleotides

in

the

same

way

but

have

different

distributions

These

are

used

to

insert

extra

nucleotides

between

important

-LRB-

match

-RRB-

positions

Skip

productions

are

used

to

skip

a

match

nonterminal

so

that

no

nucleotide

appears

at

that

position

in

a

multiple

alignment

Stochastic

context-free

grammars

In

a

SCFG

every

production

for

a

nonterminal

S

has

an

associated

probability

value

such

that

a

probability

distribution

exists

over

the

set

of

productions

for

S.

-LRB-

Any

production

with

the

nonterminal

S

on

the

left

side

is

called

a

production

for

S.

-RRB-

We

denote

the

associated

probability

for

a

production

S

ff

by

P

-LRB-

S

ff

-RRB-

A

stochastic

context-free

grammar

G

generates

sequences

and

assigns

a

probability

to

each

generated

sequence

and

hence

defines

a

probability

distribution

on

the

set

of

sequences

The

probability

of

a

parse

tree

can

be

calculated

as

the

product

of

the

probabilities

of

the

production

instances

in

the

tree

The

probability

of

a

sequence

s

is

the

sum

of

probabilities

over

all

possible

parse

trees

or

derivations

that

could

generate

s

written

as

follows

Prob

-LRB-

s

j

G

-RRB-

X

all

derivations

-LRB-

or

parse

trees

-RRB-

d

Prob

-LRB-

d

-RRB-

s

j

G

-RRB-

X

ffn

Prob

-LRB-

-RRB-

j

G

-RRB-

Prob

-LRB-

-RRB-

j

G

-RRB-

Prob

-LRB-

ffn

-RRB-

s

j

G

-RRB-

Efficiently

computing

this

quantity

Prob

-LRB-

s

j

G

-RRB-

presents

a

problem

because

the

number

of

possible

parse

trees

for

s

is

exponential

in

the

length

of

the

sequence

However

a

dynamic

programming

technique

analogous

to

the

Cocke-Kasami-Young

or

Early

methods

-LSB-

-RSB-

for

non-stochastic

CFGs

can

accomplish

this

task

efficiently

-LRB-

in

time

proportional

to

the

cube

of

the

length

of

s

-RRB-

We

define

the

negative

logarithm

of

the

probability

of

a

sequence

given

by

the

grammar

log

-LRB-

Prob

-LRB-

s

j

G

-RRB-

-RRB-

as

the

negative

log

likelihood

-LRB-

NLL

-RRB-

score

of

the

sequence

This

quantifies

how

well

the

sequence

s

fits

the

grammar

Since

CFGs

generally

have

an

ambiguity

in

that

the

grammar

gives

more

than

one

parse

tree

for

a

sequence

and

alternative

parse

trees

reflect

alternative

secondary

structures

-LRB-

foldings

-RRB-

a

grammar

often

gives

several

possible

secondary

structures

for

one

RNA

sequence

An

advantage

of

a

SCFG

is

that

it

can

provide

the

most

likely

parse

tree

from

this

set

of

possibilities

If

the

grammar

and

the

probabilities

are

carefully

designed

the

correct

secondary

structure

will

appear

as

the

most

likely

parse

tree

among

the

alternatives

As

discussed

in

Section

the

most

likely

parse

trees

given

by

the

tRNA-trained

grammar

give

exactly

the

correct

secondary

structures

for

the

tRNA

sequences

we

test

We

can

compute

the

most

likely

parse

tree

efficiently

using

a

variant

of

the

above

procedure

for

calculating

Prob

-LRB-

s

j

G

-RRB-

To

obtain

the

most

likely

parse

tree

for

the

sequence

s

we

calculate

max

parse

trees

d

Prob

-LRB-

d

-RRB-

s

j

G

-RRB-

The

dynamic-programming

procedure

to

do

this

resembles

the

Viterbi

algorithm

for

HMMs

-LSB-

-RSB-

We

can

also

use

this

procedure

to

obtain

our

multiple

alignments

the

grammar

aligns

each

sequence

by

finding

the

most

likely

parse

tree

after

which

the

mutual

alignment

of

the

sequences

among

themselves

is

determined

Estimating

SCFGs

from

sequences

To

determine

how

well

SCFGs

could

model

a

family

of

RNA

sequences

we

first

developed

a

SCFG

from

an

existing

alignment

of

tRNA

sequences

-LSB-

-RSB-

Our

next

goal

was

to

learn

the

grammar

parameters

-LRB-

probabilities

of

productions

-RRB-

automatically

Estimation

Maximization

-LRB-

EM

-RRB-

training

algorithm

To

estimate

the

SCFG

parameters

from

unaligned

training

tRNA

sequences

we

introduce

a

new

method

for

training

SCFGs

that

is

a

generalization

of

the

forward-backward

algorithm

commonly

used

to

train

HMMs

This

algorithm

is

more

efficient

than

the

inside-outside

algorithm

which

was

previously

proposed

to

train

SCFGs

The

inside-outside

algorithm

-LSB-

-RSB-

is

an

EM

algorithm

to

reestimate

a

SCFG

's

parameters

However

it

requires

the

grammar

to

be

in

Chomsky

normal

form

which

is

possible

but

inconvenient

for

modeling

RNA

-LRB-

and

requires

more

nonterminals

-RRB-

Further

it

takes

time

at

least

proportional

to

whereas

the

forward-backward

procedure

for

HMMs

takes

O

-LRB-

-RRB-

time

where

n

is

the

length

of

the

model/grammar

-LRB-

and

the

typical

training

sequence

-RRB-

There

are

also

several

local

minima

and

this

presents

a

problem

when

the

initial

grammar

is

not

highly

constrained

To

avoid

such

problems

we

have

developed

a

different

method

to

obtain

a

SCFG

for

an

RNA

family

that

takes

only

time

and

hence

may

be

practical

on

RNA

sequences

longer

than

tRNA

Our

new

algorithm

requires

folded

RNA

as

training

examples

rather

than

unfolded

ones

Thus

the

base

pairs

in

each

training

sequence

have

to

be

identified

before

the

algorithm

can

begin

iteratively

reestimating

the

grammar

parameters

If

such

basepair

information

is

not

available

we

can

use

the

algorithm

as

described

in

Section

Our

algorithm

a

different

EM

method

is

based

on

the

theory

of

stochastic

tree

grammars

Tree

grammars

are

used

to

derive

labeled

trees

instead

of

strings

Labeled

trees

can

be

used

to

represent

the

secondary

structure

of

RNA

easily

-LSB-

-RSB-

-LRB-

see

Figure

-RRB-

When

working

with

a

tree

grammar

for

RNA

one

is

explicitly

working

with

both

the

primary

sequence

and

the

secondary

structure

of

each

molecule

Since

this

is

given

explicitly

in

each

training

molecule

we

no

longer

have

to

-LRB-

implicitly

-RRB-

sum

over

all

possible

interpretations

of

the

secondary

structure

of

the

training

examples

when

we

reestimate

the

grammar

parameters

as

must

be

done

with

the

inside-outside

method

The

EM

part

of

our

algorithm

consists

of

iteratively

finding

the

best

parse

for

each

molecule

in

the

training

set

and

then

readjusting

the

production

probabilities

to

maximize

the

probability

of

these

parses

The

new

algorithm

also

tends

to

converge

faster

because

each

training

example

is

much

more

informative

For

a

detailed

discussion

of

the

algorithm

see

-LSB-

-RSB-

Overfitting

and

regularization

A

grammar

with

too

many

free

parameters

can

not

be

estimated

well

from

a

relatively

small

set

of

training

sequences

Attempts

to

estimate

such

a

grammar

will

encounter

the

problem

of

overfitting

in

which

the

grammar

fits

the

training

sequences

well

but

poorly

fits

related

-LRB-

test

-RRB-

sequences

not

included

in

the

training

set

One

solution

is

to

control

the

effective

number

of

free

parameters

by

regularization

We

calculated

a

regularizer

from

the

multiple

alignment

of

tRNA

sequences

and

added

it

to

the

counts

used

for

reestimating

the

grammar

's

production

probabilities

in

each

iteration

of

training

Similar

methods

are

described

in

-LSB-

-RSB-

Using

the

new

EM

algorithm

Since

our

EM

training

algorithm

uses

folded

RNA

as

training

examples

rather

than

unfolded

ones

the

base

pairs

in

each

training

sequence

need

to

be

identified

before

the

EM

iteration

begins

If

only

unfolded

training

sequences

are

available

then

we

iteratively

estimate

the

folding

of

the

training

sequences

as

well

using

the

following

method

Design

a

rough

initial

grammar

which

might

represent

only

a

portion

of

the

base

pairing

interactions

This

is

used

to

parse

the

initial

unfolded

RNA

training

sequences

to

obtain

a

set

of

partially

folded

RNA

sequences

Estimate

a

new

SCFG

using

the

partially

folded

sequences

and

our

EM

training

algorithm

Further

productions

might

be

added

to

the

grammar

at

this

stage

although

we

have

not

experimented

with

this

possibility

yet

Use

the

trained

grammar

to

obtain

more

accurately

folded

training

sequences

and

reestimate

the

SCFG

using

these

Repeat

Step

until

the

trained

grammar

gives

no

changes

to

the

folding

Dealing

with

introns

Introns

are

normally

present

in

the

anticodon

stem

loop

-LRB-

reviewed

in

-LSB-

-RSB-

-RRB-

We

assume

that

an

intron

-LRB-

of

whatever

type

-RRB-

will

be

present

in

the

anticodon

loop

and

more

specifically

within

or

on

either

side

of

the

anticodon

itself

i.e.

we

consider

a

total

of

five

possible

positions

for

introns

Experimental

results

As

described

in

the

previous

section

we

used

our

algorithm

to

deduce

a

trained

grammar

from

a

training

set

of

unfolded

and

unaligned

tRNA

sequences

To

derive

the

trained

grammar

we

designed

the

initial

grammar

by

using

some

prior

knowledge

about

the

tRNA

family

tRNA

has

four

principle

arms

and

one

extra

arm

and

only

the

lengths

of

the

D

arm

and

the

Extra

arm

vary

The

initial

grammar

was

set

up

with

a

total

of

nonterminals

and

productions

to

derive

arms

of

the

appropriate

lengths

Productions

of

Type

I

-LRB-

see

Figure

-RRB-

are

used

to

derive

those

five

arms

productions

of

Type

II

are

used

to

describe

the

base

pairing

in

the

four

principle

arms

and

productions

of

Type

III

and

IV

are

used

to

describe

unpaired

bases

A

uniform

probability

distribution

was

placed

over

each

set

of

productions

of

the

same

type

but

WatsonCrick

base

pairs

were

weighted

twice

as

heavily

If

no

skip

productions

were

needed

Prob

-LRB-

S

S

-RRB-

was

zero

but

a

uniform

distribution

existed

over

the

Type

I

S

SS

Type

II

S

A

S

A

S

A

S

C

S

A

S

G

S

A

S

U

S

C

S

A

S

C

S

C

S

C

S

G

S

C

S

U

S

G

S

A

S

G

S

G

S

G

S

C

S

G

S

U

S

U

S

A

S

U

S

G

S

U

S

C

S

U

S

U

Type

III

S

A

S

S

G

S

S

C

S

S

U

S

S

S

Type

IV

S

A

S

G

S

C

S

U

Figure

To

obtain

production

probabilities

for

this

initial

grammar

we

placed

a

uniform

distribution

over

each

set

of

same-type

productions

but

weighted

Watson-Crick

base

pairs

twice

as

heavily

Starred

values

may

differ

if

no

skip

productions

are

needed

For

simplicity

this

figure

omits

subscripts

remaining

Type

III

productions

This

initial

grammar

found

the

correct

folding

for

of

our

whole

database

of

tRNA

sequences

The

EM

method

described

in

Section

was

then

used

to

refine

this

grammar

using

training

tRNA

sequences

The

run

time

was

around

CPU

minutes

on

a

Sun

Sparcstation

During

this

process

only

the

probabilities

of

the

productions

were

reestimated

and

no

nonterminals

or

productions

were

added

or

deleted

-LRB-

unlike

model

surgery

in

-LSB-

-RSB-

-RRB-

Our

future

work

will

focus

on

developing

a

method

that

can

automatically

select

a

good

structure

and

a

good

length

of

the

grammar

while

training

Data

The

experiments

used

data

from

three

sources

From

EMBL

Data

Library

's

database

produced

by

Mathias

Sprinzl

and

co-workers

Bayreuth

FRG

-LSB-

-RSB-

we

obtained

aligned

and

folded

complete

tRNA

sequences

A

complete

tRNA

sequence

means

a

tRNA

sequence

that

has

the

four

major

initial

grammar

was

not

able

to

find

the

correct

folding

for

the

remaining

-LRB-

-RRB-

of

the

tRNA

sequences

and

failed

to

discriminate

tRNAs

from

non-tRNAs

arms

and

a

length

between

and

bases

Thus

we

included

tRNAs

of

virus

bacteriophage

archaebacteria

eubacteria

cyanelle

chloroplast

cytoplasm

and

some

mitochondria

and

did

not

include

other

mitochondrial

tRNAs

We

changed

several

specific

symbols

used

for

representing

modified

bases

to

the

usual

A

C

G

U

symbols

Of

these

sequence

descriptions

we

selected

at

random

as

training

examples

for

deriving

a

grammar

to

model

intron-free

tRNA

and

used

the

rest

as

test

data

The

Ribosomal

Database

Project

's

-LRB-

RDP

-RRB-

-LSB-

-RSB-

aligned

folded

large-subunit

ribosomal

RNA

data

file

LSU.aln

provided

our

primary

source

of

nontRNA

sequences

We

generated

approximately

non-tRNA

sequences

by

cutting

ribosomal

RNA

sequences

into

pieces

of

approximately

the

same

lengths

as

tRNA

sequences

From

the

National

Center

for

Biotechnology

Information

's

-LRB-

NCBI

-RRB-

NewGenBank

and

GenBank

databases

we

used

unaligned

and

unfolded

tRNA

sequences

with

introns

of

rather

short

lengths

-LRB-

from

to

-RRB-

From

other

non-tRNA

sequences

in

GenBank

we

generated

an

additional

test

sequences

Discriminating

tRNAs

As

described

in

Section

we

calculate

a

NLL

score

for

each

test

sequence

and

use

it

to

measure

how

well

the

sequence

fits

the

grammar

This

raw

NLL

score

depends

too

much

on

the

test

sequence

's

length

to

be

used

directly

to

decide

whether

a

sequence

belongs

to

the

family

modeled

by

the

grammar

We

overcome

this

problem

by

normalizing

the

NLL

score

-LSB-

-RSB-

We

calculate

the

difference

between

the

NLL

score

of

a

sequence

and

the

average

NLL

score

of

a

typical

non-tRNA

sequence

of

same

length

measured

in

standard

deviations

This

number

is

called

the

Z

score

for

the

sequence

We

then

choose

a

Z-score

cutoff

and

sequences

with

Z

scores

above

the

cutoff

are

classified

as

tRNAs

For

the

trained

grammar

NLL

and

Z

scores

were

computed

for

test

tRNA

sequences

and

non-tRNA

sequences

each

of

length

to

letters

For

each

tRNA

there

are

five

non-tRNA

sequences

of

the

same

length

Figure

shows

Z

scores

computed

by

the

trained

grammar

The

lowest

Z

score

tRNAs

lack

some

arms

-LRB-

e.g.

mitochondrial

tRNA

may

have

only

three

loops

-RRB-

and

we

model

these

irregular

tRNAs

in

-LSB-

-RSB-

of

tRNAs

is

and

the

highest

Z

score

of

nontRNAs

is

Thus

the

trained

grammar

distinguishes

perfectly

between

tRNAs

and

non-tRNAs

Z-score

tRNAs

non-tRNAs

Figure

These

Z

scores

for

the

test

set

-LRB-

tRNA

and

non-tRNA

primary

sequences

-RRB-

show

the

trained

grammar

's

discriminative

ability

Multiple

sequence

alignments

From

a

grammar

it

is

possible

to

obtain

a

multiple

alignment

of

all

sequences

The

grammar

can

produce

the

most

likely

parse

tree

for

the

sequences

to

be

aligned

This

gives

an

alignment

of

all

the

nucleotides

that

align

to

the

match

nonterminals

on

the

main

line

in

the

grammar

Between

match

nonterminals

might

be

insertions

of

varying

lengths

but

by

inserting

enough

spaces

in

all

the

sequences

to

accommodate

the

longest

insertion

an

alignment

is

obtained

Once

a

grammar

was

constructed

a

multiple

alignment

was

produced

for

the

entire

set

of

tRNA

sequences

-LRB-

this

multiple

alignment

is

available

via

anonymous

ftp

from

ftp.cse.ucsc.edu

in

pub/rna

-RRB-

The

trusted

alignment

was

nearly

identical

to

the

trained

grammar

's

predicted

alignment

-LRB-

see

Figure

-RRB-

Boundaries

of

helices

and

loops

were

the

same

the

major

difference

between

the

two

alignments

was

the

extra

arm

which

is

highly

variable

in

its

length

and

sequence

Both

alignments

give

the

same

base

pairing

Predictions

of

secondary

structure

As

discussed

in

the

last

section

the

trained

grammar

produces

the

same

alignment

as

the

original

alignment

for

the

base-pairing

sections

Thus

the

most

likely

parse

trees

produced

by

the

trained

grammar

gave

the

correct

secondary

structure

for

all

tRNA

primary

sequences

training

plus

unseen

test

sequences

Introns

Our

experiments

with

introns

are

currently

only

preliminary

We

have

not

yet

obtained

a

large

enough

data

set

to

do

truly

meaningfulexperiments

In

one

experiment

we

used

sequences

of

introns

and

a

simple

regular

grammar

with

five

nonterminals

for

training

a

-LRB-

sub

-RRB-

grammar

to

model

introns

The

training

process

reestimated

the

distributions

of

the

four

nucleotides

at

the

first

and

last

two

consecutive

positions

of

the

introns

This

trained

intron

grammar

and

the

previously

trained

tRNA

grammar

were

then

combined

into

a

single

grammar

modeling

tRNAs

with

introns

We

tested

the

grammar

on

the

same

tRNA

sequences

containing

introns

Of

these

the

grammar

correctly

identified

the

positions

of

introns

and

introns

themselves

for

sequences

-LRB-

of

the

training

set

-RRB-

For

seven

sequences

the

grammar

found

introns

with

correct

lengths

but

incorrect

positions

for

two

or

three

bases

The

grammar

completely

failed

to

identify

introns

for

four

sequences

Thus

this

approach

shows

some

promise

in

identifying

introns

and

finding

the

correct

secondary

structure

for

tRNAs

with

introns

Further

work

is

discussed

in

-LSB-

-RSB-

Discussion

The

method

we

have

proposed

represents

a

significant

new

direction

in

computational

biosequence

analysis

We

believe

SCFGs

may

provide

a

flexible

and

highly

effective

statistical

method

in

a

number

of

problems

for

RNA

sequences

including

database

searching

multiple

alignment

prediction

of

secondary

structures

and

locating

introns

The

grammar

itself

may

be

a

valuable

tool

for

representing

an

RNA

family

or

domain

The

present

work

demonstrates

the

usefulness

of

SCFGs

with

tRNA

sequences

Since

our

experiments

with

introns

are

only

preliminary

further

work

will

be

required

to

demonstrate

the

usefulness

of

SCFGs

in

searching

databases

for

tRNA

sequences

with

introns

Extending

the

grammar

to

handle

the

more

unusual

mitochondrial

tRNAs

would

also

be

of

interest

However

the

most

challenging

future

problem

is

to

model

a

family

of

longer

RNA

sequences

e.g.

ribosomal

RNA

with

SCFGs

Another

important

future

research

focus

will

be

to

determine

how

much

prior

knowledge

about

the

structure

of

the

RNA

class

being

modeled

is

necessary

In

our

experiments

with

tRNA

we

started

training

with

an

initial

grammar

that

contained

considerable

knowledge

about

tRNA

structure

A

more

challenging

training

approach

would

be

to

use

a

homogeneous

initial

grammar

embodying

no

specific

knowledge

about

the

tRNA

family

As

described

in

Section

we

could

then

try

to

gradually

extend

the

grammar

to

account

for

the

structure

of

the

training

sequences

We

might

do

this

by

starting

with

a

regular

grammar

that

represents

an

HMM

like

those

we

used

to

model

protein

families

-LSB-

-RSB-

Then

by

studying

multiple

alignments

produced

by

this

grammar

we

might

be

able

to

apply

methods

for

finding

correlations

between

columns

in

this

multiple

alignment

such

as

those

in

-LSB-

-RSB-

to

discover

some

of

the

basepairing

structure

in

tRNA

Having

done

this

it

would

be

straightforward

to

modify

the

grammar

to

account

for

this

base

pairing

and

then

iterate

this

process

until

no

new

structure

is

found

This

process

would

essentially

automate

some

of

the

hand

methods

originally

used

in

phylogenetic

analysis

of

tRNA

-LRB-

See

-LSB-

-RSB-

for

a

related

approach

-RRB-

Finally

there

is

the

question

of

what

further

generalizations

of

hidden

Markov

models

beyond

SCFGs

might

be

useful

The

key

advantage

of

our

method

over

the

HMM

method

is

that

it

allows

us

to

explicitly

deal

with

the

secondary

structure

of

the

RNA

sequence

By

extending

stochastic

models

of

strings

to

stochastic

models

of

trees

we

can

model

the

base-pairing

interactions

of

the

molecule

of

the

work

described

here

Eddy

and

Durbin

-LSB-

-RSB-

have

recently

described

a

class

of

adaptive

statistical

models

that

simultaneously

capture

both

primary

sequence

and

secondary

structure

consensus

features

of

a

family

of

RNA

sequences

D

arm

Anticodon

arm

Extra

arm

T

arm

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

GCCCGGCUAGCUCAGUC-GGU

AGAGCAUGAGACUCUUAAUCUCAGG

GUCGUGGGUU

CGAGCCCCACGUUGGGCG

GCGAAGGUGGCGGAAUU-GGUA-GACGCGCUAGCUUCAGGUGUUAGU-GUCCUUACGGACG-UGGGGGUU

CAAGUCCCCCCCCUCGCA

GCGGGGGUGGCUGAGCCAGGCCAAAAGCGGCGGACUUAAGAUCCGCU-CCC-GUAG-GGGUUCGCGAGUU

CGAAUCUCGUCCCCCGCA

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-LRB-

-LRB-

-LRB-

-LRB-

-LRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

-RRB-

GCCCGGCUAGCUCAGU.CGGU

AGAGCAUGAGACUCUUAAUCUCAG

G.

GU

CGUGGGUUCGAGCCCCACGUUGGGCG

GCGAAGGUGGCGGAAU.UGGUa.GACGCGCUAGCUUCAGGUGUUAGU

GuccuuacggacG

UGGGGGUUCAAGUCCCCCCCCUCGCA

GCGGGGGUGGCUGAGCcAGGCcaAAAGCGGCGGACUUAAGAUCCGCUcccguagggG

UU

CGCGAGUUCGAAUCUCGUCCCCCGCA

Figure

Shown

are

the

trusted

-LRB-

top

-RRB-

and

trained-grammar

-LRB-

bottom

-RRB-

alignments

for

three

randomly

chosen

tRNA

sequences

-LRB-

B.

mori

E.

coli

and

H.

volcanii

-RRB-

Abbreviations

are

-LRB-

-RRB-

for

base-paired

columns

anticodon

domain

fill

characters

and

deletions

by

skip

productions

which

determine

its

secondary

structure

This

progression

is

similar

to

the

path

taken

by

the

late

King

Sun

Fu

and

colleagues

in

their

development

of

the

field

of

syntactic

pattern

recognition

-LSB-

-RSB-

Modeling

higher-order

structure

would

require

still

more

general

methods

One

possibility

would

be

to

consider

stochastic

graph

grammars

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

in

hopes

of

obtaining

a

more

general

model

of

the

interactions

present

in

the

molecule

beyond

the

primary

structure

If

a

stochastic

graph

grammar

framework

could

be

developed

that

included

both

an

efficient

method

of

finding

the

most

probable

folding

of

the

molecule

given

the

grammar

and

an

efficient

EM

method

for

estimating

the

grammar

's

parameters

from

folded

examples

then

extensions

of

our

approach

to

more

challenging

problems

including

RNA

tertiary

structure

and

protein

folding

would

be

possible

This

is

perhaps

the

most

interesting

direction

for

further

research

suggested

by

this

paper

's

results

Acknowledgments

We

thank

Kimmen

Sj?olander

Anders

Krogh

Richard

Hughey

Harry

Noller

and

Bryn

Weiser

for

discussion

and

assistance

Via

anonymous

ftp

readers

may

obtain

this

paper

and

its

data

and

multiple

alignments

from

ftp.cse.ucsc.edu

in

pub/rna

References

-LSB-

-RSB-

A.

V.

Aho

and

J.

D.

Ullman

The

Theory

of

Parsing

Translation

andCompiling

Vol

I

Parsing

Prentice

Hall

Englewood

Cliffs

N.J.

-LSB-

-RSB-

J.

K.

Baker

Trainable

grammars

for

speech

recognition

Speech

Communication

Papers

for

the

Meeting

of

the

Acoustical

Society

of

America

pages

-LCB-

-LSB-

-RSB-

P.

Baldi

Y.

Chauvin

T.

Hunkapiller

and

M.

A.

McClure

Hidden

Markov

models

in

molecular

biology

new

algorithms

and

applications

In

Hanson

Cowan

and

Giles

editors

Advances

in

Neural

Information

ProcessingSystems

pages

-LCB-

San

Mateo

CA

Morgan

Kauffmann

Publishers

-LSB-

-RSB-

L.

R.

Cardon

and

G.

D.

Stormo

Expectation

maximization

algorithm

for

identifying

protein-binding

sites

with

variable

lengths

from

unaligned

DNA

fragments

Journal

of

Molecular

Biology

-LCB-

-LSB-

-RSB-

G.

A.

Churchill

Stochastic

models

for

heterogeneous

DNA

sequences

Bull

Math

Biol

-LCB-

-LSB-

-RSB-

S.

R.

Eddy

and

R.

Durbin

Analysis

of

RNA

sequence

families

using

adaptive

statistical

models

Unpublished

-LSB-

-RSB-

J.

Engelfriet

and

G.

Rozenberg

Graph

grammars

based

on

node

rewriting

An

introduction

to

NLC

graph

grammars

In

E.

Ehrig

H.

Kreowski

and

G.

Rozenberg

editors

Lecture

Notes

in

Computer

Science

volume

pages

-LCB-

Springer-Verlag

-LSB-

-RSB-

K.

S.

Fu

Syntactic

pattern

recognition

and

applications

Prentice-Hall

-LSB-

-RSB-

R.

R.

Gutell

A.

Power

G.

Z.

Hertz

E.

J.

Putz

and

G.

D.

Stormo

Identifying

constraints

on

the

higherorder

structure

of

RNA

continued

development

and

application

of

comparative

sequence

analysis

methods

Nucleic

Acids

Research

-LCB-

-LSB-

-RSB-

D.

Haussler

A.

Krogh

I.

S.

Mian

and

K.

Sj?olander

Protein

modeling

using

hidden

Markov

models

Analysis

of

globins

In

Proceedings

of

the

Hawaii

International

Conference

on

System

Sciences

Los

Alamitos

CA

IEEE

Computer

Society

Press

-LSB-

-RSB-

J.

A.

Jaeger

D.H.Turner

andM.Zuker

Predicting

optimal

and

suboptimal

secondary

structure

for

RNA

Methods

in

Enzymology

-LCB-

-LSB-

-RSB-

B.

D.

James

G.

J.

Olsen

and

N.

R.

Pace

Phylogenetic

comparative

analysis

of

RNA

secondary

structure

Methods

in

Enzymology

-LCB-

-LSB-

-RSB-

T.

Klinger

and

D.

Brutlag

Detection

of

correlations

in

tRNA

sequences

with

structural

implications

In

L.

Hunter

D.

Searls

and

J.

Shavlik

editors

First

International

Conference

on

Intelligent

Systems

for

Molecular

Biology

Menlo

Park

AAAI

Press

-LSB-

-RSB-

A.

Krogh

M.

Brown

I.

S.

Mian

K.

Sjolander

and

D.

Haussler

Hidden

Markov

models

in

computational

biology

Applications

to

protein

modeling

Journal

of

Molecular

Biology

In

press

-LSB-

-RSB-

E.

S.

Lander

and

P.

Green

Construction

of

multilocus

genetic

linkage

maps

in

humans

Proceedings

of

the

National

Academy

of

Sciences

of

the

United

States

of

America

-LCB-

-LSB-

-RSB-

A.

Lapedes

Private

communication

-LSB-

-RSB-

K.

Lari

and

S.

J.

Young

The

estimation

of

stochastic

context-free

grammars

using

the

inside-outside

algorithm

Computer

Speech

and

Language

-LCB-

-LSB-

-RSB-

G.

J.

Olsen

R.

Overbeek

N.

Larsen

T.

L.

Marshand

M.

J.

McCaughey

M.

A.

Maciukenas

W.

M.

Kuan

T.

J.

Macke

Y.

Xing

and

C.

R.

Woese

The

ribosomal

database

project

Nucleic

Acids

Research

-LCB-

-LSB-

-RSB-

E.

M.

Phizicky

and

C.

L.

Greer

Pre-tRNA

splicing

variation

on

a

theme

or

exception

to

the

rule

Trends

in

Biochemical

Sciences

-LCB-

-LSB-

-RSB-

L.

R.

Rabiner

A

tutorial

on

hidden

Markov

models

and

selected

applications

in

speech

recognition

Proc

IEEE

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

Y.

Sakakibara

M.

Brown

R.

Hughey

I.

S.

Mian

K.

Sj?olander

R.

Underwood

and

D.

Haussler

The

application

of

stochastic

context-free

grammars

to

folding

aligning

and

modeling

homologous

RNA

sequences

In

preparation

-LSB-

-RSB-

Y.

Sakakibara

M.

Brown

R.

Underwood

I.

S.

Mian

and

D.

Haussler

Stochastic

context-free

grammars

for

modeling

RNA

Technical

Report

University

of

California

at

Santa

Cruz

Computer

Science

UCSanta

Cruz

CA

-LSB-

-RSB-

D.

Sankoff

Simultaneous

solution

of

the

RNA

folding

alignment

and

protosequence

problems

SIAM

J.

Appl

Math.

-LCB-

-LSB-

-RSB-

D.

B.

Searls

The

linguistics

of

DNA

American

Scientist

-LCB-

Nov.

-LCB-

Dec.

-LSB-

-RSB-

B.

A.

Shapiro

and

K.

Zhang

Comparing

multiple

RNA

secondary

structures

using

tree

comparisons

CABIOS

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

S.

Steinberg

A.Misch

and

M.

Sprinzl

Compilation

of

tRNA

sequences

and

sequences

of

tRNA

genes

Nucleic

Acids

Research

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

M.

S.

Waterman

Computer

analysis

of

nucleic

acid

sequences

Methods

in

Enzymology

-LCB-

-LSB-

-RSB-

M.

S.

Waterman

Sequence

alignments

In

M.

S.

Waterman

editor

Mathematical

Methods

for

DNA

Sequences

chapter

Consensus

Methods

for

Folding

Single-Stranded

Nucleic

Acids

CRC

Press

-LSB-

-RSB-

S.

Winker

R.

Overbeek

C.

Woese

G.

Olsen

and

N.

Pfluger

Structure

detection

through

automated

covariance

search

Computer

Applications

in

the

Biosciences

-LCB-

-LSB-

-RSB-

C.

R.

Woese

R.

R.

Gutell

R.

Gupta

and

H.

F.

Noller

Detailed

analysis

of

the

higher-order

structure

of

ribosomal

ribonucleic

acids

Microbiology

Reviews

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

M.ZukerandD.Sankoff

RNA

secondary

structures

and

their

prediction

Bull

Math

Biol.

-LCB-

O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B I O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O

database searching
multiple sequence alignments
rna

stochastic context-free grammar
transfer rna