text:
The child was diagnosed with a rare genetic disorder, and the treatment cost $2.5 million
Jerry Landman's daughter, Lucy, has a rare genetic condition that causes significant disabilities.
Landman founded the non-profit organization Moonshots for Unicorns to help find cures for rare genetic diseases.
This is Landmann's story, as told to Kelly Burch.
Access your favorite topics in a personalized feed while on the go.
This article is reportedly based on a conversation with Jerry Landman. Edited for length and clarity.
The first sign that something was different with my daughter, Lucy, was that she fell asleep for the first two weeks of her life. I am a mother and a pediatrician for the third time. I've reassured a lot of anxious moms during that bedtime, so I've tried to do the same for myself. After all, postpartum anxiety is more common than rare genetic disorders.
Then Lucy woke up, and seemed to be developing normally. She had some delay, but the doctors thought it was minor. But when Lucy was 8 1/2 months old, she fell ill on a family trip to Panama. Suddenly she was regurgitating, unable to sit up or eat solid foods.
I knew something was very wrong. When we got home I took her to the ER, but her test was clear. However, as a physician and mother, I knew something was off. She begins videotaping Lucy's symptoms, including her inability to raise her head.
After watching the videos, Lucy's doctor ordered extensive testing, but everything returned to normal. That's when I suggested genetic testing, which would change our lives.
Lucy has a condition that is diagnosed in fewer than 50 children in the world
I was home with Lucy when I got a text from her doctor. She said Lucy's genetic test results came back and she was very worried. I requested a Zoom interview in an hour.
I called my husband, also a doctor, who came home from work. We put Lucy in the bathtub because she loves bath time. Watching her, I thought it was inconceivable that anything could go wrong with our baby.
We joined a Zoom call, and Lucy's doctor explained that Lucy was missing a gene called PGAP3. Without it, her cells could not communicate, and she would experience severe intellectual and physical delays. You will likely have seizures and will never walk or talk. We looked at our daughter, who was now standing on the coffee table smiling at us, and knew that couldn't be true.
Unfortunately, our denials did not last long. That night, we made use of our medical background and went through all the research we could find on PGAP3. By morning we knew this was Lucy's diagnosis. We told our two oldest daughters, who are 6 and 8 years old. We spent a lot of time walking as a family, and we spent a lot of time crying.
We knew that therapy might be available, but it was very expensive
After a week I realized we can't do that anymore. Our life plan was not to lie in bed and cry. My husband and I are doctors in the Bay Area. If there's anyone who can change Lucy's story, it's us.
We emailed anyone who had researched PGAP3 and contacted doctors who had performed gene therapy that was highly effective on other genetic conditions. One responded by email saying she thought she could help. But it was very practical: On the low end, she told me, the cost to develop the treatment would be $2.5 million.
I always have insurance, so I never felt like healthcare was out of reach. This was the first time I ever felt this way. To hear that there was a potential cure, but to have it out of my reach financially was a crushing blow.
I founded a non-profit organization to streamline the search for a cure
I knew there had to be a way, so I founded a nonprofit organization with my husband. The reason gene therapies are so expensive is that the FDA approves each of them individually rather than accepting the safety of proven delivery methods. Our research aims to simplify this in order to develop treatments for thousands of rare conditions.
Because of our research, clinicians understand more about PGAP3 than ever before. They reused existing supplements and discovered new avenues of treatment that were unknown six months ago when Lucy was diagnosed.
Recently, Lucy took her first steps. She hasn't spoken yet — no one talks about her condition — but she's still babbling, which is an excellent sign. Most children with PGAP3 stop babbling by the time they are 15 months old, and Lucy is 17 months old now. Every day you make progress, which gives me more and more hope.
There is still heartbreak. My middle daughter often talks about the things she wants to do with Lucy when she's older, like having a girls' day at the movies. Lucy may not be able to do these things. This is a sadness we all share. However, there is a lot of hope in science. I truly believe this research can change the lives of Lucy and other children like her.
Jerry Landman and her husband, Zachary, are co-founders of the nonprofit Moonshots for Unicorns. They aim to raise $1.3 million by the end of 2023 to bring their research closer to clinical trials. Follow Lucy's Instagram story @Lucythepgap3goose.
Categories Genetics Tags child, cost, diagnosed, disorder, Genetic, million, rare, treatment
After fox-baiting is abolished, the OIB prohibits feeding wild animals, and issues a fine
Mathematics at the speed of light
Bitcoin options markets continue to send bullish signals – here are the implications for BTC price
Seniors must consider insurance policies now
Key overtones and unanswered questions
NHL and NBA should discipline James Dolan for facial recognition: NY pol
no internet? That's fine, you can still use Google Maps on your phone
Art basketball Big book books business Business news California care College company daily Mail device Football Game Harry health Heres internet iPhone January Life market Markets medical mental million NBA News newsletter NFL NHL Picks predictions reveals Review sports star state study time Top trade Wildlife Year


text:
THIS IS THE NODE AOD FULL TEMPLATE
R-Kive
"Most of the time, the singles always seem to be the things that are remembered from albums. Sometimes the lesser-known tracks deserve better than to be forgotten," notes Phil Collins of the new three-disc anthology R-KIVE. Spanning 42 years, the 37-track set documents Genesis' history with classic material from the band compiled alongside selections from the solo careers of members Collins, Tony Banks, Peter Gabriel, Steve Hackett, and Mike Rutherford. Chronologically ordered, R-KIVE features Genesis's biggest hits including "Invisible Touch," "Turn It On Again," "Land of Confusion,"' and "I Can't Dance." Along the way it also visits Mike + The Mechanics' classics "The Living Years" and "Over My Shoulder," Collins's "In The Air Tonight" and his Philip Bailey duet "Easy Lover," and Peter Gabriel's "Solsbury Hill." But there's much more beyond the singles; the set opens with the nine-minute proto-punk "The Knife," and early material including the sprawling seven-section odyssey "Supper's Ready" and the title track of the conceptual masterpiece THE LAMB LIES DOWN ON BROADWAY (originally released on this day in 1974). The hugely eclectic body of work produced by Genesis and its members gets a long overdue salute with R-KIVE.
Stream the album
Buy the album
amazon itunes pono
Sign up for the Album Of The Day
Enter your email below to get the Album of the Day - a classic album presented in its entirety. Always great listening!
Your email address appears to be invalid
By submitting my information, I agree to receive personalized updates and marketing messages about Rhino based on my information, interests, activities, website visits and device data and in accordance with the Privacy Policy. I understand that I can opt-out at any time by emailing privacypolicy@wmg.com.
THIS IS THE FIELD GROUP SIDEBAR TEMPLATE
Past Album of the Days
THIS IS THE NODE AOD BOX TEMPLATE
Come Upstairs
Circles & Seasons
The Ultimate Collection - When A Man Loves A Woman
Fairweather Johnson
All the Love: The Lost Atlantic Recordings
Jackie DeShannon
Listen Like Thieves

redpajama_set_name: RedPajamaCommonCrawl


This is a model of a Brick Fire Pit.
* This model contains 215 separate objects.
* This model contains 870840 polygons with Turbosmooth OFF.
* This model contains 992443 polygons with Turbosmooth ON.
* There are 22 textures in scene.
* Texture Resolutions are : 8192,4096,3388,2048,1600,1024px .


text:
Q: A language model with only one embedding layer in both encode and decode only predict  I'm trying to make the model predict a word from a sentence using pretrained Huggingface's BERT as feature extractor. The model look like this
class BertAutoEncoder(nn.Module):
    def __init__(self, vocab_size):
        super().__init__()
        decoder_layer = nn.TransformerDecoderLayer(768, 2, 1024, dropout=0.1)
        self.transformer_decoder = nn.TransformerDecoder(decoder_layer, 2)
        self.fc = nn.Linear(768, vocab_size)

    def forward(self, memory, embedded_word):
        output = self.transformer_decoder(embedded_word, memory)
        output = self.fc(output)
        return output

And when train/evaluate I call the model like this
bert = BertModel.from_pretrained('bert-base-uncased')
bert.requires_grad_(False)
...
memory = bert(**src).last_hidden_state.transpose(0, 1)
embeded_word = bert.embeddings(trg.data['input_ids'][:, :-1], token_type_ids=trg.data['token_type_ids'][:, :-1]).transpose(0, 1)
output = model(memory, embeded_word)

The loss reduced nicely but turned out the model only predict <eos> token.
I tried train the model with 1 batch of 32 samples and it did work when loss reduced pass 8e-6 but when I trained it with all data the loss could go way beyond that but none of the saved models work. Even the one with eval or train loss around 4e-6 - 8e-6.
Surprisingly the model would work if I use a separate decoder's Embedding like this
class BertAutoEncoderOld(nn.Module):
    def __init__(self, vocab_size):
        super().__init__()
        decoder_layer = nn.TransformerDecoderLayer(768, 2, 1024, dropout=0.1)
        self.transformer_decoder = nn.TransformerDecoder(decoder_layer, 2)
        self.decoder = nn.Embedding(vocab_size, 768)
        self.pos_decoder = PositionalEncoding(768, 0.5)
        self.fc = nn.Linear(768, vocab_size)

    def forward(self, memory, word):
        tgt = self.decoder(word.data['input_ids'][:, :-1].transpose(0, 1))
        tgt = self.pos_decoder(tgt)
        output = self.transformer_decoder(tgt, memory)
        output = self.fc(output)
        return output

But I was asked to make it work with one Embedding and I have no idea how.
I tried

*

*Reduce/increase batch from 32 to 8-64

*Also tried 2 and 1024 batch size

*Remove <eos> token and change it's attention mask to 0

But none of those work.
What did I do wrong and how to fix it?
Thanks
Edit per @emily qeustion
I change the data itself in collate function
text.data['attention_mask'][text.data['input_ids'] == 102] = 0
text.data['input_ids'][text.data['input_ids'] == 102] = 0
word.data['attention_mask'][word.data['input_ids'] == 102] = 0
word.data['input_ids'][word.data['input_ids'] == 102] = 0

It only used in Bert though.

redpajama_set_name: RedPajamaStackExchange


text:
Q: NestJS Prisma ORM. Select specific fields There are two tables sim_card and observation 1 to 1.
It is necessary to select all SIM cards with the status Active (true) and which are not used in the observation table. (That is, an observation card is created and a free and active SIM card is issued to it.)
model observation {
  id         Int       @id @unique @default(autoincrement()) @map("observation_id")
  number     Int
  contract   String?
  sim_card   sim_card? @relation(fields: [sim_cardId], references: [id], map: "ObservationId_sim_card_key")
  sim_cardId Int?      @unique(map: "ObservationId_sim_card_key")
  firmId     Int?      @unique(map: "Observation_firmId_key")
  client     client?   @relation(fields: [firmId], references: [id], map: "Observation_firmId_key")
}

model sim_card {
  id          Int          @id @default(autoincrement())
  number      String       @unique(map: "Sim_card_number_key")
  operator    String       @default("kyivstar")
  active      Boolean      @default(true)
  busy        Boolean      @default(false)
  observationId Int?
}

As I imagine, (but it doesn't work)
findActive(): Promise<CreateSimCardDto[]> {
        return Promise
            .resolve(this.prismaService.sim_card
                .findMany({
                    where: {
                        active: true
                    },
                    include: {
                        observation: {
                            select: {
                                sim_card: false
                            }
                        }
                    }
                }))
            .catch((error) => {
                throw new HttpException(error.message, HttpStatus.BAD_REQUEST);
            })
    }

A: If you want to select any SIM Card that is not in the observations table, why not search for SIM cards where observationId is absent?
this.prismaService.sim_card.findMany({
    where: {
        active: true,
        observationId: { equals: null }
    },
}))

observationId will be null if a given sim_card row is not connected to any observation rows. Let me know if I didn't understand you correctly, but at the end of the day if you are trying to exempt rows, it needs to be added to your where filter. select and include are only used AFTER the initial filtering has been done - select and include just determine what fields on the already-filtered rows get returned.


text:
Using Primeval Plants to Represent the Past in Modern Landscapes"
by Jeffrey Benca, Ph.D. | Live Webinar
Live Stream on: April 7, 2022 11AM PST
Primeval plants can be both artistically and educationally enriching elements of landscape design. While numerous modern relatives of plants that flourished in the dinosaur days are readily incorporated into landscape or even street plantings, understanding their evolutionary history and past habitats together can help us generate dynamic plantings resembling ancient environments. In this presentation, you will learn about several lineage's of plants that flourished during the dinosaur days, see examples of modern relatives readily available for landscaping. You will also learn about planting situations suitable for their display and be provided strategies for learning about past plant communities in your region.
1. Understand the range of primeval plants commonly available for landscape design
2. Understand aspects of evolutionary history and habitats of several key plant groups
3. Understand planting situations suitable for primeval plant display
Jeffrey Benca, Ph.D.
Jeff Benca, Ph.D., is a plant scientist working at the intersection of paleobotany (the study of fossil and ancient plants) and horticulture. He earned his doctorate from the University of California, Berkeley studying how ancient ozone weakening events may have caused global deforestations during Earth's largest mass extinction. Jeff has authored 6 scientific publications, 1 book chapter, and is a leading expert in cultivating some of the world's most sensitive primeval plant lineages. He is currently a Research Associate at the Burke Museum of Natural History & Culture and serves as a horticulturist for Amazon's Horticulture Program in Seattle, WA.


LAWRENCE — Matthew Van Dyke was letting his dogs out late Thursday afternoon when he heard a loud boom.
Then he saw at least four people, whom he believed to be teenagers, rush out of a single-family home on Chickering Road. One of them was limping.
In just seconds, the home collapsed, after a disastrous natural gas explosion caused dozens of fires across Lawrence, Andover, and North Andover. As many as 70 properties were damaged or destroyed as fires rocked the Merrimack Valley communities.
The sides of the Chickering Road home were ripped open, and the roof was tilted at an odd angle. Debris littered the road and front yard.
The South Lawrence neighborhood smelled of smoke, and news helicopters whirred overhead as police turned residents away from the street Thursday evening.
"It's insane," Van Dyke said.
That sentiment was shared by residents across the Merrimack Valley, where entire neighborhoods were forced to evacuate as fire crews scrambled to fight the fires and turn off gas and electrical lines in the three municipalities.
"It was like a movie," said Manuel Cabrera, who was on his lunch break a little after 4:15 p.m. at a Taco Bell near Winthrop Avenue in Lawrence when he felt the ground rumble. "I've never felt anything like it," he said.
Immediately afterward, he saw fire erupt behind him, near Chickering Road, while smoke filled the area around Springfield Street, he said.
He tried to leave the area and return to his job, across the street at Plaza 114, but by that time the whole shopping center was engulfed in smoke.
"That's when I got an alert about the explosion and heard sirens," he said.
Cabrera got the rest of the day off from work but ended up at Parthum Elementary School, where there were many residents who had been evacuated.
Mark Chisholm was returning to his downtown Andover home from work when his teenage children told him the youth center had been closed because of a gas leak. Around 3:30 p.m., he got an emergency alert from the town, urging him to evacuate and to shut off the gas to his house.
Chisholm tried to close the rusted main outside of his house with a small wrench, without success. He then found a monkey wrench, and succeeded. Now armed with the right tool for the job, he and some other men in the neighborhood who had monkey wrenches of their own rushed to help their neighbors.
One of his 14-year-old twin sons, Jacob, saw his father and the other men running from house to house.
"Hey, Dad, there are all these middle-aged guys running around saving the day with monkey wrenches,'' Jacob Chisholm said, according to his father.
"We are going to save the world," Chisholm replied.
He said he shut off the power to three homes, got in his car with his three children, and drove to his mother-in-law's house in another part of Andover to shut off the gas there and spend the evening with her.
Traffic was gridlocked, he said, and he saw a "father and son scratching their heads" trying to figure out how to shut off their gas. Chisholm pulled over and used his monkey wrench to close gas mains at two homes, he said. "Once you do it, you are an expert,'' he added.
Meanwhile, his children were getting reports from friends via texts about evacuating, smelling gas, and seeing smoke from fires across town.
As dusk fell, residents were gathering at North Andover High School. Some called their families. Others calmed children. Just about everyone was exchanging information:How many fires and where? Have you heard anything?
In Lawrence at about 5:15 p.m., Myra Ortiz was driving with her son to Lawrence High School for a financial aid night when sirens whizzed by.
At the school, the principal turned them away, saying that a gas leak had caused an explosion in the area. Ortiz's mind immediately went to her 15-year-old daughter at home.
"Up until a few minutes before, my biggest concern was that I left my daughter at home with a chicken on the grill," Ortiz said.


text:
Home Gold Mines Namibia
Gold Mines Namibia
List of gold mines in Namibia aditnow.co.uk
List of gold mines in Namibia. Use the tools below to search for mines, quarries & sites. You can combine all inputs, e.g. just searching by name, or by combining with other search parameters. All inputs are optional, use as many or as few as you wish. You can toggle your results between list
Ministry of Mines and Energy PRODUCING MINES
Navachab Gold Mine. QKR Namibia (Pty) Ltd, Gold. Mr George Botshiwe Managing Director P O Box 150 Karibib Tel: (064) 552 000 Fax:(064) 550231 [email protected]: B2Gold. Gold. Mr Mark Dawe Managing Director P O Box 80363 Windhoek Tel: (061) 416 04505 Fax: (061) 416 499 [email protected]: Rosh Pinah Mine
B2Gold The World's New Senior Gold Producer
Otjikoto Mine Namibia (1) The Otjikoto Mine is located in the north-central part of Namibia, approximately 300km north of the country's capital, Windhoek. Otjikoto is the largest gold producer in the country. Click here for mine/project location map.
Navachab gold mine Karibib Namibia
2020-12-23 Most recently, Namibia gold production received a new boost. The Navachab gold deposit was discovered as a result of a geochemical exploration program in October 1984, during exploration for carbonate-hosted gold deposits area. It was discovered on the farm Navachab, 6 km south of the main Okahandja-Swakopmund tar road.
Gold & Diamond Mining in Namibia
Gold & Diamond Mining in Namibia Mining is the single largest contributor to the economy of Namibia, accounting for a quarter of the revenue generated in the country. Although
Navachab Gold Mine, Karibib Constituency, Erongo
The deposit, with very fine-graind gold, was discovered as a result of a geochemical exploration program in October 1984, during exploration for carbonate-hosted gold deposits area. It was discovered on the farm Navachab, 6 km south of the main Okahandja-Swakopmund tar road, and ca. 10 km SW of Karibib. Construction work began in 1988.
Gold Ministry of Mines and Energy Geological Survey
2010-3-9 The first gold discovery in Namibia was made during early German colonial times (1850s) in the Sinclair Sequence, Rehoboth District. Production was negligible up to 1899, after which mining was very limited. A highly speculative pegging boom took place on the Rehoboth gold fields during 1933 and 1934, and subsequently up to 1941, 199.2 kg of gold was
The best 10 Mines & Mines Exploration in Namibia
Mines & Mines Exploration in Namibia Purity Manganese (PTY) Ltd Address: 1st Flr Arno Henker Hse 1564 Independence Ave, Windhoek, Namibia, Namibia. See full address and map.
Founded in 2007, today, B2Gold has three operating gold mines and numerous development and exploration projects in various countries including Mali, the Philippines, Namibia, Colombia, Finland and Uzbekistan. This year, B2Gold forecasts gold production to be 970,000 1,030,000 ounces. (1,2
List of Mining Vacancies In Namibia 2021-2022
2 天前 B2Gold Namibia Windhoek Vacancies 2021-2022. Epangelo Mining Vacancies 2021-2022. Ministry of Mines & Energy Vacancies 2021-2022. Rossing Uranium Mine Vacancies 2021-2022. Swakop Uranium Vacancies 2021-2022. Navachab Gold Mine Vacancies 2021-2022. Namdeb Diamond Corporation (Pty) Limited Vacancies 2021-2022. Namdeb Windhoek Vacancies 2021-2022
The Process Of Crushing Granite To Become Lead
Vashisht Stone Crusher Hoshiarpur


As an Integrative Nutrition Health Coach, you know better than anyone how essential a healthy digestive system really is. But, do you feel confident supporting clients who struggle with digestive complaints?
IIN's Gut Health Course will give you the knowledge and tools you need to better understand and address digestive health so you can help people find the answers and support they're seeking.
Enrollment for this course is currently closed.
The structure and function of the digestive system, including the phases of digestion and how the gut impacts overall wellness.
How and why gut health can become compromised and the effects it can have on the body.
What the microbiome is, how bacteria function in the gut, and specific methods for supporting healthy gut microbes.
The difference between prebiotics and probiotics, how to navigate the supplement aisle, and what to look for in a probiotic supplement.
How gut imbalances can lead to common symptoms and conditions, like leaky gut, autoimmunity, SIBO, acid reflux, IBS, yeast overgrowth, constipation, diarrhea, skin breakouts, brain fog, fatigue, and more.
What candida is, how an overgrowth can occur, and nutrition and lifestyle modifications to promote balance.
The gut/brain connection, the impact of stress on digestive wellness, the link between hormones and gut health, and the impact of gut imbalances on blood sugar and obesity.
Dietary and lifestyle modifications that support a healthy gut, including gut healthy foods, stress reduction, movement, meditation, and detoxification.
The connection between thyroid and gut health and steps to promote thyroid health through dietary improvements.
An overview of Ayurvedic and Chinese principles and how they can support healthy digestion.
How to educate and empower your clients to advocate for their health and explore the various healthcare options available to them.
Ways to effectively work alongside doctors and various healthcare practitioners from within your scope of practice to empower and support clients on their journey to improved health.
Having trouble getting on the priority list? Please email support@guthealthcourse.com or call (646) 679-6430 for assistance.
The Gut Health Course is the only program designed specifically for Integrative Nutrition Health Coaches to learn how to appropriately support clients with digestive issues as a Health Coach. You'll have the opportunity to study with our team of experts and get the guidance you need to expand your knowledge and understanding of the gut and digestive health.
The Gut Health Course provides 7 months of in-depth and cutting-edge education on gut health, plus all of the guidance, support, and information you'll need to coach clients toward improved digestion.
You'll have 24/7 access to the course materials so you can study around your busy schedule, and learn from anywhere with a Wi-Fi connection.
These in-depth, online trainings go beyond just the basics of gut health to give you a comprehensive education on the entire digestive system, specific health issues associated with gut imbalances, and strategies to support clients with digestive issues.
Ask any questions you may have and connect with other students in the course through this exclusive Facebook group. You'll receive ongoing support and motivation as you complete the program so you never feel stuck or alone.
Easily refer to important gut health concepts with these supplemental materials that make it simple to understand what you're learning, and share essential information with your clients.
Your classes are taught by guest experts in the field of gut health, including Aubrey Levitt, an Integrative Nutrition Health Coach and founder of Body + Eden, an herbal probiotic company.
Will you be offering this course again soon?
Join the Priority List to be notified when the next class is starting.
In addition to our pay-in-full option of $995, we offer two payment plans: two payments of $550 and three payments of $375.
What do I get when I complete the course? Will there be certificate or change in my title?
Email support@guthealthcourse.com. A member of our Student Success team will get back to you shortly! Support hours are Monday to Friday, 9am-5pm Eastern Time.


text:
Climate camp capers
IssueSeptember 2010
03 Sep 2010 Feature by Gabriel Carlyle
"Give me the directions. There's loads of people here", the kilted figure said into his mobile phone, turning to us to make an announcement: "They've taken the site and need as many people there as quickly as possible. I'll take you." At 10pm it was still 14 hours before activists were scheduled to take the site for the 2010 Climate Camp, but after a gruelling 12-hour journey on the Megabus we had finally made it to Edinburgh's Forest Café.
Unfortunately, our guide had overestimated our numbers: there may have been over 100 people in the bar, but only eight of us were there for the camp. Nonetheless, our small party soon found itself on the No. 38 bus to the HQ of the Royal Bank of Scotland (a massive complex, with over 3,000 employees) in Gogarburn, four miles outside the city centre.
As the UK bank most heavily involved in financing fossil fuels, RBS had been well chosen. In the last four years alone the bank has underwritten over $7.5bn in loans to ConocoPhilips, one of the biggest players in Canadian tar sands, a source of "unconventional oil" that poses an almost unparalleled risk to the climate.
What's more, following a massive bailout during the financial crisis, RBS is now 84% publicly-owned, though its disastrous lending policies have continued unchecked. Once off the bus, it took 10 minutes of stumbling along pitch-black country lanes trying to avoid the police before we finally found the camp, almost literally on the back doorstep of RBS's headquarters. With the stars overhead, wild grass underfoot, and RBS HQ lit up like a Christmas tree, it was a breathtaking sight.
And despite our tiny numbers, we seemed to have doubled the number of people on site: apart from the big vehicles, we appeared to be among the first to arrive. For the next three hours we helped wheelbarrow sawdust, water and cucumbers about the site, before finally collapsing into our tent around 3am.
The following days saw the usual mix of workshops, vegan food and direct action, but, in truth, but none of it could top those first few heady hours.
Topics: Climate change, tar sands, Climate camp
Peace News Summer Camp
Resistance forever!
Fallujah: a toxic legacy worse than Hiroshima?
"They'd all chant 'Free Joe Glenton' on parade."
"Collateral murder" video whistleblower faces 52 years
UK nuclear weapons plants endangered by fire and flood
European court limits police "stop and search" powers
Editorial: The triple challenge
John Linton (6 December 1910 - 4 March 2010)
Campaign Profile: Global Climate Campaign


text:
\section{Introduction} \label{S:Int}

RNA secondary structure provides a coarse grained model to study important
features of the real molecular conformation, embedded in three-space \cite{Uhlenbeck:98}. The key
feature of these structures is that they can be inductively constructed \cite{Stein:78a}.
The recursion forms the basis for more than three decades of research resulting in
what can be called the dynamic programming (DP) paradigm. DP methodology facilitates
{\it ab initio} folding \cite{Waterman:86, Zuker:81,Hofacker:94a}, partition function
\cite{McCaskill:90}, Boltzmann sampling \cite{SecondaryStructureSampling}
and context-free grammars (CFGs) \cite{Harrison:78}.
Minimum free energy (mfe) secondary structures can be folded in $O(n^2)$ space and
$O(N^3)$ time complexity \cite{Waterman:86} and their partition function is computed in $O(n^3)$ time
\cite{McCaskill:90}. Stochastic folding is based on their CFG, allowing to factor in specific
properties of biological structures. Thermodynamic and stochastic secondary structures have
been statistically analyzed in \cite{Nebel:11, Fontana:93, Hofacker:94a}.
In \cite{Rivas:99} the secondary structure paradigm has been extended to include gap-structures.
Gap-structures include certain, but not all pseudoknot structures (pk-structures). They can be
viewed as the most general class to which the DP-paradigm directly applies and their underlying
grammar is multiple context-free. The approach allowed folding of gap-structures in $O(n^6)$
time and $O(n^4)$ space complexity and sampling in $O(n^3)$ time.

In this paper we approach the problem of cross-serial interactions of pk-structures from first
principles. We employ an abstraction, that is well known to structural biology \cite{Leontis:01}: namely,
a nucleotide is not a dimensionless object but a triangle and base pairs can be abstracted as
untwisted or twisted ribbons connecting two such triangles, see Fig.~\ref{F:basepair}.
This observation introduces topology as a natural language for biological structures and leads to
the fatgraph model \cite{Penner:10}.
Our main result is to map a novel recursion on unicellular maps \cite{Chapuy:11} into the classic
recursion derived in \cite{Stein:78a}. I.e.~we translate a recursive procedure on fatgraphs into
an enhanced version of the recursion of secondary structures. This results in the first,
unambiguous, context-free grammar for pk-structures, {\it RNAFeatures$^*$}. We present as a
first application an $O(n \log(n))$ Boltzmann sampler and stochastic context-free grammar.

In the following we discuss the fatgraph modeling Ansatz in detail. We then provide some
background on computational linguistics in the context of RNA structures, enabling us to
discuss what we mean by topological language of RNA.

The biophysics of the canonical base pairs {\bf A-U}, {\bf G-C} and {\bf G-U} implies, that
the fatgraphs modeling RNA structures are orientable: RNA purine and pyrimidine bases are
modeled as three edges for hydrogen bonding interactions: the Watson-Crick edge, the Hoogsteen
edge, and the Sugar edge\footnote{which includes the 29-OH and which has also been referred to as the
Shallowgroove edge} \cite{Leontis:01}.
A given edge of one base can potentially interact in a plane with any one of the three
edges of a second base, and can do so in either cis- or trans- orientation of the glycosidic bonds.
This gives rise to 12 basic geometric types with at least two H bonds connecting the bases,
see Fig.~\ref{F:basepair}. Accordingly, cis-base pairs, including the
canonical base pairs belong to the {\it cis-Watson-Crick/Watson-Crick} geometry.

Canonical base pairs induce exclusively untwisted ribbons, modeled via orientable \emph{fatgraphs},
i.e.~graphs enhanced by replacing vertices by discs and edges by ribbons. Gluing the sides of these
ribbons produces the topological quotient space \cite{Massey:69}, which is a connected sum of tori.
As topological genus, $g$, and orientability are the two determinants of closed surfaces, RNA structures
having canonical base pairs are filtered by genus alone. RNA secondary structures \cite{Waterman:78aa},
are exactly structures of genus zero. Structures of genus $g>0$ are those exhibiting cross-serial
interactions. In a sense, topological genus measures the complexity of a biomolecule, far more subtle
than the number of crossing arcs.
One may think of pk-structures as {\it cross-free} drawings on a closed surface of genus $g\ge 0$,
instead of a drawing with crossing arcs in the plane\footnote{A cross-free drawing in the plane
corresponds to an RNA secondary structure.}, see Fig.~\ref{F:pse}.

The term \emph{language of RNA} has been used in \cite{Rivas:00}, where the authors
study the aforementioned gap-structures \cite{Rivas:99}.
Methods from computational linguistics have been applied to problems
in DNA and RNA sequence analysis for decades: early work involved using regular grammars
and hidden Markov models (HMMs) in order to model biological sequences.
These have been used in sequence analysis \cite{Pachte:05}, such as identifying CpG
islands \cite{Durbin:98}, gene prediction \cite{Munch:06}, pairwise and multiple sequence
alignment \cite{Durbin:98,Pachter:02}, modeling DNA sequencing errors \cite{Lottaz:03},
protein secondary structure prediction, and RNA structural alignment \cite{Yoon:08}.
Regular grammars and HMMs are not well-equipped to model problems in RNA folding
because they cannot describe the long-distance correlations of base pairs. Instead, a
larger class called \emph{context-free} grammars (CFG) are used.
Assigning probabilities to the production rules of CFG produces a stochastic
context-free grammar (SCFG), which, in the context of HMM, allows each state to
generate not a single, but any (fixed) number of immediate successors.

By a \emph{topological language of RNA} we mean an unambiguous, CFG that allows us to
recursively construct {\it any} pk-structure using recursions that are induced by cell-surgery
on fatgraphs. The latter shall be translated into an enhancement of the classical recursion \cite{Stein:78a}.
This allows us to connect to the existing paradigm by presenting a CFG based on arc-removals and
decomposition as production rules\footnote{as for  CFG of secondary structures},
where the cross-serial interactions are encapsulated in the labels of the arcs and nonterminal symbols,
respectively.

Finally we discuss the above mentioned recursion of secondary structures and provide some background
on topological RNA structures.

Waterman {\it et al.} \cite{Waterman:78a, Stein:78a,Nussinov:78,Kleitman:70}
studied the combinatorics and folding of RNA secondary structures. Their diagrams are
labeled graphs over the vertex set $[n]=\{1, \dots, n\}$, presented by drawing the
vertices on a horizontal line and noncrossing arcs in the upper half-plane.
Vertices and arcs correspond to the nucleotides {\bf A}, {\bf G}, {\bf U} and {\bf C}
and Watson-Crick ({\bf A-U}, {\bf G-C}) and wobble ({\bf U-G}) base pairs, respectively.
The noncrossing arcs of RNA secondary structures allow for a recursive build.
Let $S_2(n)$ denotes the number of RNA secondary structures over $n$ nucleotides
then we have \cite{Waterman:78a}: $S_2(n)=S_2(n-1)+
\sum_{j=0}^{n-3}S_2(n-2-j)S_2(j)$, where $S_2(n)=1$ for $0\le n\le 2$. Accordingly,
RNA secondary structures satisfy a constructive recursion. This relation constitutes the basis
for the DP-recursions used for the polynomial time folding \cite{Waterman:78aa, Zuker:81} and
has profound algorithmic implications. The DP-framework has ever since strongly influenced the field
of RNA folding \cite{Waterman:78a, Zuker:81, Sankoff:92, Hofacker:94a}.

CFGs of secondary structures \cite{Zuker:81,Hofacker:94a, Knudsen:99} are utilizing the recursive
nature of secondary structures \cite{Waterman:78a}. The grammar has two production rules, displayed in
Fig.~\ref{F:grammar}. Its terminal symbols denote a pair of vertices forming an arc as well
as an unpaired vertex and the nonterminal symbols are an arbitrary secondary structure and
an irreducible structure covered by an external arc.
The grammar is unambiguous, i.e.~each structure has a unique decomposition path.

Cross-serial interactions or pseudoknots have long been known as important structural
elements \cite{Westhof:92a, Chen:05pnas} in RNA. Depicting a contact structure as a diagram,
a structure contains a pseudoknot if and only if these arcs cross. Cross-serial interactions
are functionally important in tRNAs, RNaseP \cite{Loria:96a}, telomerase RNA \cite{Staple:05},
and ribosomal RNAs \cite{Konings:95a}. Pseudoknots in plant virus RNAs mimic tRNA structures,
and {\it in vitro} selection experiments have produced pseudoknotted RNA families that bind
to the HIV-1 reverse transcriptase \cite{Tuerk:92}.

Topological RNA structures have been introduced in \cite{Waterman:93,Penner:03} and
the classification and expansion of pk-structures in terms
of the topological genus of an associated fatgraph has been studied by means of
matrix theory in \cite{Orland:02,Bon:08}.
The computation of the genus of a fatgraph is classic \cite{Euler:1752} and was
first applied to RNA structures by \cite{Orland:02} and \cite{Bon:08}.
\cite{Reidys:top1} studies topological RNA structures of higher genus and connects them
with Riemann's Moduli space \cite{Penner:03}. In \cite{Reidys:11a} a polynomial time,
loop-based folding algorithm of topological RNA structures was given.

The paper is organized as follows: in Section~\ref{S:fat} we discuss the idea behind
the novel recursions. Thereafter we establish the correspondence between pk-structures and blueprints
with $\lambda$-structures in Section~\ref{S:bi}.
Then we discuss {\it RNAFeatures$^*$} and finally detail the SCFG in Section~\ref{S:grammar}.

\section{Fatgraphs and blueprints.}\label{S:fat}

The contacts of nucleotides within an RNA structure can be represented as a diagram
whose arcs can be linearly ordered via their left end-points, i.e.~$(i,j)\prec (r,s)$
if and only if $i<r$. Suppose $(i,j) \prec (r,s)$, then $(i,j)$ and $(r,s)$ cross iff
$i<r<j<s$ holds.

In the following we shall assume that any diagram contains the arc $(0,n+1)$ (rainbow),
which is not accounted for as an edge of the diagram. Rainbows mark the start and endpoint
of the $5'$-$3'$ oriented backbone, thus allowing to collapse the backbone into a disc without loosing any information.

The passage from diagrams to fatgraphs \cite{Loebl:08,Penner:10} is obtained by
``thickening'' the edges into (untwisted) bands or ribbons. Furthermore, each vertex
is inflated into a disc as shown in Fig.~\ref{F:fat}. This inflation reflects the fact
that canonical base pairs fix a plane, see Fig.~\ref{F:basepair}.
A fatgraph, $\mathbb{G}$, can thus be viewed as a ``drawing'' on an orientable surface
$X_{\mathbb{G}}$, which is obtained by identifying the sides of the ribbons. $\mathbb{G}$ is
a $2$-dimensional cell complex over its geometric realization, $X_{\mathbb{G}}$.

The Euler characteristic and topological genus
of the surface $\mathbb{D}$ are given by
$\chi(\mathbb{D})  =  v - e + r$ and $g(\mathbb{D}) =  1-\frac{1}{2}\chi(\mathbb{D})$,
where $v$, $e$ and $r$ denote the number of discs, ribbons and boundary components
in $\mathbb{D}$ \cite{Massey:69}.
The equivalence of simplicial and singular homology \cite{Hatcher:02} implies that
these combinatorial invariants are topological invariants. This means the genus of
the surface $X_{\mathbb{D}}$ provides a filtration of fatgraphs.

A fatgraph can be presented by a pair of permutations \cite{Penner:10}.
Let $H= [2n]$ denote the set of half-edges, and let $\sigma$, $\alpha$ and $\gamma$ be
three permutations over $H$, where each cycle in $\sigma$, $\alpha$ and $\gamma$
presents a vertex, an edge and a boundary component, respectively.
A vertex of degree $k$ is considered as a cycle $v=(i,\sigma(i),\dots,\sigma^{k-1}(i))$.
In particular, $\alpha$ is a fixed-point free involution since an edge consist of two
half-edges and we have $\gamma = \alpha \circ \sigma$.

Removing the unpaired vertices from the diagram and collapsing the backbone into a disc
does not change the Euler characteristic. Therefore, the relation between genus and number
of boundary components is solely determined by the number of arcs in the upper half-plane:
$2-2g-r = 1-n$, where $n$ is number of arcs and $r$ the number of boundary components. The latter
can be computed easily and allows us to obtain the genus of the diagram.

Mapping $(H,\sigma, \alpha)$ into $\pi((H,\sigma, \alpha))=(H, \alpha\circ \sigma,\alpha)$,
is a bijection, see Fig.~\ref{F:dual}. $\pi$ is called the {\it Poincar\'{e} dual} and
interchanges boundary components with vertices, preserving topological genus. By construction
we shall deal only with fatgraphs over one backbone whose duals thus have one boundary
component. We refer to these duals as {\it unicellular maps}.

A bijection is derived by Chapuy in \cite{Chapuy:11} between a unicellular map of
genus $g$ together with a distinguished trisection and a unicellular map of genus $g-k$,
together with $2k+1$ labeled vertices. This is facilitated by successively slicing a vertex into three new
vertices via the distinguished trisection. Since the trisection can persist through finitely
many slicings, say $k$ times, the process produces $2k+1$ labeled vertices, reducing the genus
of the map by exactly $k$. Gluing is the inverse to slicing: gluing a set of $2k+1$ labeled
vertices in a unicellular map increases the genus of the map by $k$. By construction, both,
slicing and gluing processes preserve unicellularity.

In a unicellular map we have two orders, $<_\gamma$ and $<_\sigma$. The former accounts for
the length of the tour of the boundary component and the latter is induced by counterclockwise
rotation around a vertex, i.e.~from $i$ to $\sigma(i)$. A half-edge $\tau$ is called a {\it trisection} if
$\tau\le \sigma^{-1}(\tau)$ and $\tau$ is not the minimum half-edge of the vertex. A
trisection marks the nontrivial order discrepancies between $\sigma$ and $\gamma$. It is
topologically relevant, since the number of trisections in any unicellular map having genus $g$
equals exactly $2g$ \cite{Chapuy:11}. In particular, any unicellular map having genus
$0$, i.e.~a planar tree, has no trisections.

Let $\bar v$ be a vertex with trisection $\tau$. We slice as follows \cite{Chapuy:11}:
let $a_1$ denote the minimum half-edge of $\bar v$, let $a_2$ denote the minimum half-edge
between $a_1$ and $a_3=\tau$ (rotating clockwise), that is larger than $a_3$ with respect to
$<_\gamma$.
Iterating this means to further slice $v_3$ until $\tau$ becomes its minimum half-edge
and we derive the mapping $\Xi( \mathfrak{m}_g, \tau )=(\mathfrak{m}_{g-k},v_1, \dots, v_{2k+1})$,
where $k$ denotes the number of slicings. The new vertices $v_1, \dots, v_{2k+1}$ are by construction
ordered by their minimum half-edges with respect to $<_\gamma$. Furthermore, $\Xi$ is bijective.

The process can be reversed, i.e.,
$\Lambda(\mathfrak{m}_{g-k}, v_1, \dots, v_{2k+1})=(\mathfrak{m}_{g},\tau)$, derived
by successively gluing $v_1, \dots, v_{2k+1}$ in the following fashion: we first glue the last
three vertices $v_{2k-1}$, $v_{2k}$ and $v_{2k+1}$ obtaining a new vertex, $w$, with an (intermediate)
trisection. Continuing this, by gluing the next two vertices with $w$, produces a unicellular
map $\mathfrak{m}_{g}$ together with the trisection $\tau$.
Iterated slicings and selecting new trisections as needed, generates a unicellular
map having genus $0$, i.e.~a planar tree.
\begin{definition}{\bf (blueprint)}
  Suppose $\mathfrak{m}_g$ is a unicellular map of genus $g$ having $m$ edges together with
  the trisection $\tau$.
A $(\mathfrak{m}_g,\tau)$-blueprint is a sequence
$$
( (\mathfrak{m}_{g}, \tau), (\mathfrak{m}_{g_1}, \tau_1,), \ldots,
(\mathfrak{m}_{g_{r-1}}, \tau_{r-1}), (\mathfrak{m}_{0},\varnothing)),
$$
where $(\mathfrak{m}_{g_{i+1}},V_{i+1})  = \Xi(\mathfrak{m}_{g_i},\tau_i)$,
for $0\le i <r$ and $g_r=0,\tau_r=\varnothing$.
\end{definition}
\begin{remark}
  {\rm
    In the following we shall refer to the blueprint of the dual of a pk-structure simply as the
blueprint of the pk-structure. In Fig.~\ref{F:path} we display the blueprints of a matching
having genus $2$.}
 \end{remark}

\begin{remark}
{\rm Note that for two unicellular maps having genus $g$, the number of blueprints is not
necessarily equal. Furthermore, all blueprints can be constructed by considering all
trisections at each step, respectively. The cost of finding all blueprints is exponential
in $g$, however, the genus of RNA structures found in databases is typically less
than $3$.}
\end{remark}

\section{$\lambda$-structures}\label{S:bi}

We establish now a bijection between unicellular maps $\mathfrak{m}_{g}$ together with
blueprints and a particular class of labeled, planar trees. The labels will
allow to recover the blueprints. Note that, since some vertices may have been involved
in subsequent slicing events, they are not present in the tree.

\begin{definition}{\bf ($\lambda$-tree)}
  A $\lambda$-tree, $\mathfrak{m}_0^{(\sigma_v)_v}$ is a rooted, planar tree with boundary component
  $\gamma$, in which a vertex $v$ carries the label $\sigma_v\in \mathbb{F}_2^r$ such that\\
  $\bullet$ $\sum_{v,h} \sigma_v|_h = 2g+r$, where $1\le r\le g$,\\
  $\bullet$ $|\{\sigma_v \mid \sigma_v|_h=1 \}|\equiv 1 \mod 2$,\\
  $\bullet$ $\vert \{ v_{\sigma_v} \mid \sigma_v|_h=\sigma_v|_i=1, \; h<i\}\vert \le 1$
  and any vertex, whose label $\sigma_v$ satisfies $\sigma_v|_h=\sigma_v|_i=1$
  for $h<i$, is minimal in $\gamma$ within the set of all the vertices, having label $\sigma_v$ where
  $\sigma_v|_i=1$.
\end{definition}
We shall call the minimum vertex $v$ with the property $\sigma_v|_i=1$ transitional of level $i$
and regular, otherwise. Note that a vertex can be transitional for multiple indices.
\begin{lemma}\label{L:welldefined}
  Any unicellular map, $\mathfrak{m}_g$, together with a blueprint, $\mathfrak{p}$, induces a
  unique $\lambda$-tree, $\mathfrak{m}_0^{(\sigma_v)_v}$.
\end{lemma}
\begin{proof}
Suppose we are given a unicellular map $\mathfrak{m}_g$ together with a slice-path consisting of
$r$ slicings. $\mathfrak{p}$ generates a planar tree, $\mathfrak{m}_0$, whose vertices we color
red if they were involved in some slicing and black, otherwise. $\mathfrak{p}$ furthermore specifies
the sequence of slicings and each slicing reduces topological genus by at least one, whence $1\le r\le
g$.

We label the black vertices by $(0,\dots,0)\in \mathbb{F}_2^r$ and each red vertex obtains a $1$ in
its $s$th-coordinate if and only if it was involved in the $s$th-slicing. This produces a set of
intermediate labels $(\sigma_v')_v$.

We proceed by reducing the $(\sigma_v')_v$: starting from $i=r$ to $i=2$, we set
 \begin{equation*}
  \sigma_v=
  \begin{cases}
    (0,\dots,x_i=1,x_{i+1},\dots,x_r) \quad  \text{\rm if $v$ is regular at $i$}\\
    \sigma_v \quad \text{\rm otherwise.}
  \end{cases}
 \end{equation*}
  Accordingly, any $\gamma$-minimal vertex of a fixed slicing retains a $1$ iff it came
  from a previously sliced vertex and, as a result, irrespective of how many times the
  vertices were sliced, the total number of $1$ entries in all coordiantes of all lables
  equals:
  \begin{equation*}
    \sum_{\sigma_v} \vert \{h\mid \sigma_v|_h=1\}\vert = \sum_{i=1}^r (2\Delta g_i+1) = 2g+r,
  \end{equation*}
    where $\Delta g_i$ is the decrease of genus in the $i$th slicing. As a result, we have
    $\sum_{v,h} \sigma_v\vert_h = 2g+r$.

    By construction, the total number of $1$ entries found as $s$th-coordinates equals
    the total number of vertices obtained via the $s$th slicing, whence
    $|\{\sigma_v \mid \sigma_v|_s=1 \}|\equiv 1 \mod 2$.

  Finally, consider two fixed indices $h<i$. Only the label of the $\gamma$-minimal vertex
  amongst the vertices of the $i$th slicing can have an entry $1$ as $h$th coordinate, whence
  $\vert \{ v \mid \sigma_v|_h=\sigma_v|_i=1, \; h<i\}\vert \le 1$ and the proof of the lemma
  is complete. In Fig.~\ref{F:remove_label} we illustrate the idea of the proof.
\end{proof}

Having established the mapping from unicellular maps of genus $g$ together with
blueprints into $\lambda$-trees, we proceed by showing that this mapping is bijective.
\begin{proposition}\label{P:bi}
Suppose $\mathfrak{m}_g$ is a unicellular map with genus $g$ and blueprint $\mathfrak{p}$,
then we have the bijection
\begin{equation*}
\xi \colon (\mathfrak{m}_g, \mathfrak{p}) \mapsto \mathfrak{m}^{(\sigma_v)_v}_0.
\end{equation*}
\end{proposition}
\begin{proof}
Following the slice-path, $\mathfrak{p}$, the fatgraph $\mathfrak{m}_g$ is sliced to
the tree $\mathfrak{m}_0$ with labels $(\sigma_v)_v$, $\mathfrak{m}^{(\sigma_v)_v}_0$.
By Lemma~\ref{L:welldefined}, $\mathfrak{m}^{(\sigma_v)_v}_0$ is a $*$-tree, whence
$\xi(\mathfrak{m}_g)=\mathfrak{m}^{(\sigma_v)_v}_0$ is well-defined.

To show that $\xi$ is bijective, let $\mathfrak{m}_0^{(\sigma_v)_v}$ be an arbitrary
$*$-tree such that $\sigma_v\in\mathbb{F}_2^r$. We shall construct $\xi^{-1}$ as
follows:

Let $V_r = \{v  \mid \sigma_v|_r = 1\}$ denote the set of vertices whose labels satisfy
$\sigma_v|_r=1$. Lemma \ref{L:welldefined} guarantees that the number of vertices contained
in $V_r$ is odd. Then we glue
$$
\Lambda\colon (\mathfrak{m}_0, V_r ) \to (\mathfrak{m}_{g_{r-1}}, \tau_{r-1} ),
$$
creating the trisection, $\tau_{r-1}$, where $g_{r-1} = (|V_r|-1)/2$.

By construction $\mathfrak{m}_{g_{r-1}}$ is a unicellular map with two types of vertices:
those which correspond to $\mathfrak{m}_0$-vertices (type $1$) and a unique new vertex
obtained by gluing the set $V_r$ (type $2$).
We now label the $\mathfrak{m}_{g_{r-1}}$-vertices with labels $\sigma_v^{r-1}$
using the labels $\sigma_v$ of $\mathfrak{m}_0$ as follows:
For any type $1$ vertex we set $\sigma^{r-1}_v|_i=\sigma_v|_i$ for $1\le i\le r-1$
and $\sigma^{r-1}_v|_r=0$. The unique type $2$ vertex obtains the label
$$
\sigma_v^{r-1}|_i=\sum_{v\in V_r}\sigma_v|_i, \quad \forall 1\le i \le r-1, \quad \quad
\sigma_v^{r-1}|_r = 0.
$$
In Fig.~\ref{F:blueprint} we illustrate the idea of the proof.
\end{proof}
A $\lambda$-tree corresponds to a unicellular map of genus $g$, together with a blueprint. As a planar
tree it corresponds by Poincar\'{e} duality to a noncrossing matching.
We call the edge-labeled Poincar\'{e} dual of a $\lambda$-tree a $\lambda$-matching, $M_0^{(\sigma_a)_a}$,
whose edge-labels $(\sigma_a)_a$ are induced by the vertex labels of the $\lambda$-tree $(\sigma_v)$ as
follows: there are $n+1$ vertices and $n$ edges in a planar tree, whence a vertex corresponds
uniquely to an edge (except of the root). To this end, we consider the edge which connects $v$ to
its parent, see Fig.~\ref{F:vtoe}. Note that, by construction, the root of the planar tree is never
involved in slicings and accordingly labeled $0\in\mathbb{F}_2^r$.

A $\lambda$-matching induces an arc-labeled secondary structure by insertion of unpaired vertices.
To facilitate this we employ the index map $I\colon \mathbb{N}_0 \to \mathbb{N}_0$, $i\to j$.
We interpret $I$ as to specify how many unpaired vertices follow the $M_0^{(\sigma_a)_a}$-vertex,
$i$. Starting with the left-endpoint of the rainbow and we have $I^{-1}(j+1) - I^{-1}(j) -1$
such vertices.

\begin{definition}
  A $\lambda$-structure $S^{(\sigma_a)_a}$ is a noncrossing diagram with
  labeled arcs, $\sigma_a$, that when removing all unpaired
  vertices, induces a $\lambda$-matching.
\end{definition}

Note that slicing induces transpositions of the boundary component. Thus, taking the Poincar\' e
dual, these transpositions permute the backbone of $M_g^{(\sigma_a)_a}$. Let $\rho=\rho(\mathfrak{p})$
denote resulting permutation of the backbone, where $\rho(0)=0$, then $I^{\rho}(h)=I(\rho^{-1}(h))$
is the induced index map for the pk-structure corresponding to the $\lambda$-structure and we have the
following situation, see Fig.~\ref{F:comm1}.
{\small $$
\diagram
(S_{g,n},\mathfrak{p}) \dline \rline & (M_g,\mathfrak{p},I^\rho) \dline \rline^{\text{dual}} &
(\mathfrak{m}_g,\mathfrak{p},I^\rho) \dline \\
S^{(\sigma_a)_a} & \lline  (M_0^{(\sigma_a)_a},I) & \lline^{\text{dual}}
(\mathfrak{m}_0^{(\sigma_v)_v},I)
\enddiagram
$$}

\section{The grammar}\label{S:grammar}

We can now derive the CFG for $\lambda$-structures, {\it RNAFeatures$^*$}. The key
issue here will be the compatibility of the arc labels with the production rules.

Let us briefly review the CFG for secondary structures, implied by the recursion of \cite{Waterman:78a},
i.e.~the tuple $G=(V, \Sigma, R,
I)$, where $V,\Sigma,S$ are sets of nonterminal symbols, terminal symbols and production rules,
respectively. A production rule is a mapping from
$V$ to $(\Sigma\bigcup V)^*$, where the asterisk represents the Kleene star operation
and $S$ is an initial symbol.
A derivation starts with the initial symbol $I$,  and in each step, replaces one of
the nonterminal symbols by one of the productions.
For secondary structures, the grammar consists of
$V= \{S, L\}$, $\Sigma = \{d,d',s\}$, and the two production rules are
\begin{equation} \label{E:sec_grammar}
S \to \epsilon \quad \text{or} \quad  LS \quad \text{or} \quad sS, \quad \quad  L \to dSd'.
\end{equation}
Here $S \to \epsilon$ is the $\epsilon$-production. The terminal symbols $d$, $d'$ represent pairs
of vertices forming arcs and $s$ an unpaired vertex, respectively. The nonterminal symbol $S$
denotes an arbitrary structure and $L$ is an irreducible structure, i.e.~covered by an external
arc. Via the initial symbol $S$ this grammar is unambiguous, i.e.~each structure has a unique
derivation path.

We shall now extend the grammar to $\lambda$-structures. To this end we introduce
new nonterminals, $S_{(t_i)_i}^{(\ell_i)_i}$ and $L_{(t_i)_i}^{(\ell_i)_i}$. The nonterminal
symbols stand for sets of substructures $N=\{S, L\}$, with labeled arcs $(\sigma_a)_a$
such that $\ell_h = \sum_{\sigma_a\in N} \sigma_a|_h$,
$1\le h \le r$. Aside from $s$ we have new terminals $\{d^{\sigma_a}, d'^{\sigma_a}\}$
where $d^{\sigma_a}, d'^{\sigma_a}$ denote $\sigma_a$-labelled arcs. We set $t_i=1$ if
and only if the corresponding nonterminal contains a transitional arc for $i$ and
$t_i=0$, otherwise.

By construction, the $\ell_h$ will evolve depending on the presence of transitional arcs,
that is $(\ell_h)_h$ may change in more than one coordinate if a transitional arc is
present, or in at most one coordinate, otherwise. $(t_i)_1^r$ can be viewed as an
indicator determining which production rule applies.

{\it Decomposition:} this means to decompose a nonterminal symbol $S^{(\ell_i)_i}_{( t_i)_i}$
into one left- and one right-symbol, together with consistent labelings.
A labeling for $S^{(\ell_i)_i}_{( t_i)_i} \to sS^{(\rho_i)_i}_{( p_i)_i}$ is consistent if
$\ell_i=\rho_i$ and $t_i=p_i$. Furthermore, consistency for
$S^{(\ell_i)_i}_{( t_i)_i}\to L^{(\rho_i)_i}_{( p_i)_i} S^{(\xi_i)_i}_{( q_i )_i}$ means \\
(a) $t_i=1$ and $\rho_i>0$ implies $p_i=1$, \\
(b) $t_i=1$ and $\rho_i=0$ implies $\xi_i>0$ and $q_i=1$\\
(c) $t_i=0$                implies $p_i=q_i=t_i=0$.\\
This is a consequence of transitional arcs being induced by transitional vertices by means
of Poincar\' e duality and the latter being minimal in the boundary component. As a result
a transitional arc needs to be placed in the left-nonterminal as long as the latter contains
any arcs $a$ with the property $\sigma_a|_i=1$.

As a result we have the production rule:
\begin{equation}  \label{E:rule_can}
S^{(\ell_i)_i}_{( t_i)_i} \to \epsilon \quad \text{or} \quad L^{(\rho_i)_i}_{( p_i)_i}
S^{(\xi_i)_i}_{( q_i )_i}
\quad \text{or} \quad  sS^{(\ell_i)_i}_{( t_i)_i},
\end{equation}
satisfying $\rho_i+\xi_i = \ell_i$, for $\rho_i$, $\xi_i\ge 0$, $1\le i \le r$.
In case of $t_i=1$, if $\rho_i>0$, we have $p_i=1$ and $q_i=0$. Otherwise, if $\rho_i=0$,
the $i$th trans-arc is distributed to the right and we have $p_i=0$ and $q_i=1$. Finally,
if $t_i=0$, both, $p_i=q_i=0$, see Fig.~\ref{F:grammar1}.

{\it Arc-removal:} this means to act on the nonterminal $L_{(t_i)_i}^{(\ell_i)_i}$ by
removing its outer arc, $a$. The key point here is to provide this arc with a label,
$\sigma_a$ consistent with the label associated with the generated nonterminals.
Given $L_{(t_i)_i}^{(\ell_i)_i}$ any arc-removal based production rule
generates the nonterminal $S_{(t'_i)_i}^{(\ell'_i)_i}$, where
$t_i'\le t_i$ and $\ell_i-\ell'_i\le 1$. This implies for the label of the removed arc
$\sigma_a|_h=(\ell_h-\ell'_h)$, $1\le h \le r$. In case $a$ is a trans-arc for $s_1,\dots s_k$,
we have $0=t'_{s_j}<t_{s_j}=1$, or $0=t'_j=t_j$, otherwise.
Accordingly, we have:
\begin{equation} \label{E:rule_rem}
L^{(\ell_i)_i}_{( t_i)_i} \to d^{\sigma_a}S^{(\ell_i)_i-\sigma_a}_{( p_i)_i}d'^{\sigma_a}.
\end{equation}

The terminal symbols $\Sigma=\{ d^{\sigma_j}, d'^{\sigma_j}, s \}$, nonterminal symbols
$V \ = \{ S_{(t_i)_i}^{(\ell_i)_i}, L_{(t_i)_i}^{(\ell_i)_i} \}$, production rules $R$ given by
eq.~[\ref{E:rule_can}], eq.~[\ref{E:rule_rem}], together with the initial condition
$I=S^{(\ell_i)_i}_{(t_i)_i}$ with $\sum_i^r \ell_i = 2g+r$ and $t_i=1$,
for $1\le i \le r$, define the context-free grammar $G=(V,\Sigma, R, I)$.

\begin{proposition}
  The context-free grammar $G$ discussed above generates all $\lambda$-structures uniquely, or
  equivalently, all pk-structures together with a blueprint.
\end{proposition}

{\it Proof:}
Consider a nonterminal symbol $S^{(\ell_i)_i}_{(t_i)_i}$ where the $\ell_i$ are positive
odd integers, with $\sum_i^r \ell_i = 2g+r$ and $t_i=1$. Any nonterminal symbol
is uniquely generated by $G$ since the product of each production rule is unique.
Furthermore, no labeled arc with $\sigma_a|_h=1$ can be further added to the structure
when $t_h$ is set to be $1$. This guarantees that the trans-arc of level $h$ is
minimal among those arcs with $\sigma_a|_h=1$. Thus the structures generated from
$S^{(\ell_i)_i}_{(t_i)_i}$ are $\lambda$-structures.
As for its generative power, an arbitrary a $\lambda$-structure, is translated via $G$ into
a unique sequence of terminal symbols, whence the proposition.

The grammar $G$ for $\lambda$-structure is designed based on the simple grammar
for secondary structure by assigning labels to symbols. However, the latter evaluates
arcs against unpaired vertices, lacking the capability of differentiating base pairs
and unpaired bases in the context of specific loop types.

We accordingly present a grammar for $\lambda$-structures, {\it RNAFeatures$^*$} used in practice that
differentiates loop types, that is an extension of the grammar {\it RNAFeatures} \cite{Bio:method}.
The grammar allows us to differentiate
loop-types. First we have the terminal symbols $\Sigma = \{A, C, G, U, R\}$ representing the respective
RNA nucleotides and the endpoint of the rainbow. The nonterminal symbols are
\begin{equation*}
\begin{split}
V = \{ \lambda_g\_structure,
ExteriorLoop^{(\ell_i)_i}_{( t_i)_i}, Stack^{(\ell_i)_i}_{( t_i)_i}, Weak^{(\ell_i)_i}_{( t_i)_i}, \\
 HairpinLoop^{\sigma_a}_{(0)_i}, InteriorLoop^{(\ell_i)_i}_{( t_i)_i}, BulgeLeft^{(\ell_i)_i}_{( t_i)_i}, \\
BulgeRight^{(\ell_i)_i}_{( t_i)_i}, MultiLoop^{(\ell_i)_i}_{( t_i)_i},  MLComponent^{(\ell_i)_i}_{( t_i)_i}, \\
MLComponents^{(\ell_i)_i}_{( t_i)_i}, SingleStrand \}.
\end{split}
\end{equation*}

The nonterminal symbols are referenced via both: their semantics and their arc-label information
of the class of structures it represents.
$\lambda_g$-structure are $\lambda$-structures corresponding to a pk-structure of genus $g$, together
with a blueprint.
For nonterminal symbols the $N^{(\ell_i)}_{((t_i)_i)}$, where
$$
N=\{ExteriorLoop, Stack, \ldots, MLComponents\},
$$
the index $(\ell_i)$ represents the sum of the arc-labels contained in the class,
such that $t_i=1$ if and only if the transitional arc of level $i$ is present.
We distinguish the following classes:
\begin{itemize}
\item $ExteriorLoop$ denotes the class that is immediately nested in the rainbow,
\item $Stack$ denotes the class covered by parallel arcs, while $Weak$ represents the class covered by a isolated arc,
\item $HairpinLoop$ represents the class containing no arcs, immediately nested in $Weak$,
      while $InteriorLoop$, $BulgeLeft$, $BulgeRight$ have one and $MultiLoop$ have more than one such arc.
     The classes $InteriorLoop$, $BulgeLeft$ and $BulgeRight$ differ in the number of unpaired
     bases in the two intervals formed between the outer arc and the immediately nested arc.
     $BulgeLeft$ has the interval to the right empty and the intervals to the left non-empty,
     $BulgeRight$ is defined analogously and in $InteriorLoop$ both these intervals are non-empty,
\item $MLComponents$ and $MLComponent$ are classes contained in a multi-loop: $MLComponent$ has
exactly one braching and $MLComponents$ has at least two,
\item $SingleStrand$ denotes the class consisting of a sequence of unpaired bases.
\end{itemize}

The nonterminal symbols are listed in Fig.~\ref{F:nonterminals}

\begin{itemize}
\item $ini_r$: here we have $\sum_{0<i\le r} \ell_i+\sigma_a = 2g+r$. In case of $\sigma_a \neq (0)_i$,
the rainbow is always a transitional arc, hence $t_i = 0$ if $\sigma_a|_i \neq 0$,
\item $exl_1$ emits the signal $\epsilon$ of the $\lambda$-structure,
\item $exl_2(x, (\ell_i)_i, (t_i)_i)$ cuts off the leftmost unpaired base and keeps all the labels as well as transitional
arcs in the right nonterminal, where $x\in \{A,C,G,U\}$.  $co_1(x, (\ell_i)_i, ( t_i)_i)$,
$ss_1(x)$ and $ss_2(x)$ are defined analogously,
\item $exl_3((\ell_i)_i, (\rho_i)_i, ( t_i)_i)$ decompose into two classes, distributing any labeled arcs
and in particular any trans-arcs, whence $(\ell_i)_i =  (\rho_i)_i + (\xi_i)_i$.
In case of $t_i=1$, if $\rho_i>0$, we have $p_i=1$ and $q_i=0$. Otherwise, if $\rho_i=0$,
the $i$th trans-arc is distributed to the RHS and we have $p_i=0$ and $q_i=1$. Finally,
if $t_i=0$, both, $p_i=q_i=0$.  The rules $cs_1((\ell_i)_i, (\rho_i)_i, (t_i)_i)$,
$cs_2((\ell_i)_i, (\rho_i)_i, (t_i)_i)$ and $cs_3((\ell_i)_i, (\rho_i)_i, (t_i)_i)$ are defined analogously,
\item $st_1(x,y,(\ell_i)_i, (t_i)_i, \sigma_1)$ remove a base pair $(x,y)$ with the arc label $\sigma_a$,
$x,y\in \{A,C,G,U\}$, inducing the labels $(\ell_i)_i-\sigma_a$ for the class produced.
If $\sigma_a|_i\neq 0$ and $t_i=1$, the arc $(x^{\sigma_a}, y^{\sigma_a})$ is a trans-arc of level
$i$ and we set $p_i=0$ accordingly. The rules $st_2(x,y,(\ell_i)_i, (t_i)_i, \sigma_a)$, $hl(x,y, \sigma_a)$,
$il(x,y,(\ell_i)_i, (t_i)_i, \sigma_a)$, $bl(x,y,(\ell_i)_i, (t_i)_i, \sigma_a)$, $br(x,y,(\ell_i)_i, (t_i)_i,
\sigma_a)$ as well as $ml(x,y,(\ell_i)_i, (t_i)_i, \sigma_a)$, $x,y\in \Sigma$ are defined analogously.
\end{itemize}

We display the production rules in Fig.~\ref{F:rules}.

Let $S$ be a structure and $\theta$ be an RNA sequence. A CFG allows to assign a score to a
pair $(S,\theta)$, derived from scores assigned to the production rules encountered. Namely,
for each $(S,\theta)$ the CFG provides a unique parse tree and the score of $(S, \theta)$ is
then computed by means of the scores of the respective production rules. Scores
based on a thermodynamic energy model produces the minimum free energy (mfe) model
\cite{Mathews:99, Mathews:04, Turner:10}
and a probabilistic scoring scheme derived from data bases of RNA sequences and structures
leads to a SCFG $G=(V,\Sigma, R, S, P)$. In the latter case, sequence--structure pairs of the
data set allow to assign scores to the production rules, which in turn induce a score of an
arbitrary pair $(S,\theta)$.

\section{The SCFG of RNA pseudoknot structures}

Stochastic context-free grammars (SCFG) were developed for RNA secondary structures
\cite{Eddy:94, Sakakibara:94}. They have been employed for the {\it ab initio} structure
prediction as well as the analysis of observables such as base pairing probabilities or
loop patterns \cite{Knudsen:03, Eddy:00, Eddy:01a}. A SCFG is derived from a CFG by associating
to each production rule $r$ a probability $p_r$. That is, for any nonterminal $A$, suppose that
$r_1, \ldots r_k$ are all derivations of $A$, then we have $\sum_i p_i = 1$.

Let $S_g$ denotes an RNA structure of genus $g$ and $\theta$ be a sequence. For $g=0$, $S_{0}$
is a secondary structure and can be parsed by {\it RNAFeatures}. We construct the parse tree of
$(S_{0},\theta)$ and record the frequency of the production rules.
In case of $g>0$, for any $S_g$-blueprint, $\mathfrak{p}(S_g)$, we consider
the correspondence
\begin{equation} \label{E:bi}
(S_g,\mathfrak{p}(S_g),\theta) \to (S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)},
\theta_{\mathfrak{p}(S_g)}),
\end{equation}
where $S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)}$ is a $\lambda$-structure and
$\theta_{\mathfrak{p}(S_g)}$ is the modified sequence. We construct the parse tree
of {\it RNAFeatures}$^*$
of $(S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)}, \theta_{\mathfrak{p}(S_g)})$ and record the
frequency of the encountered production rules.

If there are $m$ $S_g$-blueprints, the contribution of each pair
$(S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)}, \theta_{\mathfrak{p}(S_g)})$ is normalized by $1/m$
and the frequency of a production rule $R$ equals $f(R)/m$ where $f(R)$
is the frequency of $R$ being applied. After processing all structures and sequences,
the probability of a production rule is computed as the quotient of its frequency
over the sum of all frequencies of its respective derivation.

We next consider $\mathbb{P}(S_g, \theta | M)$, the normalized score of an arbitrary
structure, $S_g$, over an arbitrary sequence, $\theta$, as a function of the data set
$M$. We set $\mathbb{P}(S_g,\theta | M) = \sum_{\mathfrak{p}(S_g)} \mathbb{P}
(S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)}, \theta_{\mathfrak{p}(S_g)} | M)$,
where $\mathbb{P}(S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)},\theta_{\mathfrak{p}(S_g)} | M)$
is calculated by the multiplying the probabilities of the production rules in the
parse tree of $(S^{(\sigma_a)_a}_{\mathfrak{p}(S_g)}, \theta_{\mathfrak{p}(S_g)})$ and the sum
is taken over the set of all $S_g$-blueprints.

The $\mathbb{P}(S_g, \theta | M)$ induce
$\mathbb{P}(S_g | M) = \sum_{\theta\in \mathcal{Q}^n_4} \mathbb{P}(S_g, \theta |M)$.
Using the fact that for fixed blueprint, $\mathfrak{p}$, we have a bijection
$\beta_\mathfrak{p}\colon Q_4^n\to Q_4^n$, we derive
\begin{eqnarray*}
\mathbb{P}(S_g | M) &=& \sum_{\theta_{\mathfrak{p}(S_g)} \in \mathcal{Q}^n_4}  \sum_{\mathfrak{p}(S_g)}
\mathbb{P}(S_{\mathfrak{p}(S_g)}^{(\sigma_a)_a},
\theta_{\mathfrak{p}(S_g)} |M)  \\
& = & \sum_{\mathfrak{p}(S_g)} \mathbb{P}(S_{\mathfrak{p}(S_g)}^{(\sigma_a)_a}|M).
\end{eqnarray*}

Furthermore the SCFG facilitates the sampling of structures $S_g \in \mathbb{S}_{g, n}$
with Boltzmann probability, i.e., $\mathbb{P}(S_g) = \mathbb{P}(S_g | M) /
\sum_{S \in \mathbb{S}_{g, n}} \mathbb{P}(S|M)$.
We employ {\it RNAFeatures$^*$} to Boltzmann sample a $\lambda$-structure $S^*$, and
reconstruct $S_g$ as well as the associated blueprint, $\mathfrak{p}(S_g)$: fixing $S_g$,
suppose there are $m$ blueprints $\mathfrak{p}_i(S_g)$, these correspond to the $m$ distinct
$\lambda$-structures $S^*_i$. Let $\mathbb{S}_n^*$ be the collection of all such $S^*_i$.
In view of  $S_i^* \to (S_g, \mathfrak{p}_i(S_g))$ being a bijection, we have
$$
\sum_{S_g \in \mathbb{S}_{g,n}} \mathbb{P}(S_g |M)
=  \sum_{S_g \in \mathbb{S}_{g,n}} \sum_{\mathfrak{p}(S_g)} \mathbb{P}(S_{\mathfrak{p}(S_g)}^{(\sigma_a)_a}|M)
= \sum_{S^* \in \mathbb{S}^*_n} \mathbb{P}(S^* | M)
$$
Therefore, in view of $\mathbb{P}(S_g) = \sum_{\mathfrak{p}_i(S_g)} \mathbb{P}(S_i^*)$ and
$$
\sum_{\mathfrak{p}_i(S_g)} \mathbb{P}(S_i^*) =
\frac{\sum_{\mathfrak{p}_i(S_g)} \mathbb{P}
(S^*_i | M)} {\sum_{S^* \in \mathbb{S}^*_n} \mathbb{P}(S^* |M)} =
  \frac{\mathbb{P}(S_g | M)}
{\sum_{S_g \in \mathbb{S}_{g,n}} \mathbb{P}(S_g | M)}
$$
we have $\mathbb{P}(S_g) = \sum_{\mathfrak{p}_i(S_g)} \mathbb{P}
(S^*_i | M)/ \sum_{S^* \in \mathbb{S}^*_n} \mathbb{P}(S^* |M)$.

As for runtime complexity, the Boltzmann sampler of secondary structures using such a SCFG
has runtime of $O(n^2)$, if structures are ranked according to the sequential order. This can
be improved to $O(n\log n)$ by ranking the structures with the Boustrophedon order
\cite{Ponty:08,Nebel:11}. For fixed topological genus, the label enhancement of {\it RNAFeatures}$^*$
by construction increases only the number of derivations. Thus the Boltzmann sampler for
$\lambda$-structures has runtime complexity $O(n\log n)$.

\section{Discussion}

RNA secondary structures have been widely studied using the classic CFG implied by the recursions in
\cite{Waterman:78aa, Waterman:78a}.
Using RNA sequence and structure data sets, this CFG induces a SFCG. This SCFG has been applied for the
{\it ab initio} prediction of RNA secondary structures \cite{Knudsen:99, Knudsen:03}, calculating the
likelihood of a sequence generated by the model SCFG \cite{Eddy:00}, and detecting RNA genes using
comparative sequence analysis \cite{Eddy:01a}.
Furthermore, the generation of random secondary structures according to the native distributions of
certain families of RNA structures is studied in \cite{Nebel:11} in order to identify key structural
motifs in biological RNA secondary structures. This paper allows to extend these studies to
pk-structures. To the best of our knowledge {\it RNAFeatures}$^*$ is the first unambiguous
context-free grammar for pk-structures. Related work has been done by Freiermuth and Nebel on a
CFG of certain, colored trees. These are trees that can be mapped to unicellular maps, however, not
bijectively.

A particular, multiple context-free grammar (MCFG) for pk-structures is introduced in
\cite{Rivas:99}. This grammar employs a vector of nonterminal symbols referencing a
substructure with a gap.
The time and space complexity for Boltzmann sampling pk-structures with this grammar are
$O(n^4)$ and $O(n^2)$, respectively.
The grammar furthermore implies a folding algorithm having relatively high computational
cost \cite{Rivas:99}: $O(n^6)$ time and $O(n^4)$ space complexity, using the thermodynamic model.
Restricting to certain types of pk-structures the time complexity can be reduced to $O(n^4)$ time
complexity \cite{Dirks:03}. In any case, specifying the output space of the MCFG, i.e.~what types
of structures the grammar actually generates is subtle, see \cite{Rivas:00} for details.

The passage from MCFG to CFG has implications for time and space complexity:
an MCFG contains rules of the type $A\to B_1C_1B_2C_2$ where
$\langle B_1, B_2\rangle$, $\langle C_1, C_2\rangle$ are vectors of nonterminals.
It requires a minimum of three loop-indices to execute these rules in the sampling or folding
process.
In contrast, the production rule in any CFG being in Chomsky normal form can be written as
$A\to BC$, which requires only one loop index, reducing the time complexity by $O(n^2)$.
As for space complexity this passage obsoletes using vectors, reducing the space complexity
for $O(n)$ and $O(n^2)$ for sampling and folding, respectively.

The key idea facilitating this passage lies in mapping the information of
crossing arcs into the labels of noncrossing arcs, i.e.~passing from pk-structures to
$\lambda$-structures.
Accordingly, the bijection of eq.~\ref{E:bi} is the crucial point. The fact that the bijection
is genuinely topology-based allows {\it RNAFeatures}$^*$ to extend the classic CFG of
secondary structures, generating any pk-structure.

In the following we present the expectation and variance of some important parameters
related to the structural features of pk-structures generated by the induced SCFG
of {\it RNAFeatures}$^*$. These parameters are also used to analyze Boltzmann sampled
secondary structures in comparison with native structures in \cite{Nebel:11}.
Our SCFG is trained via $90$ single stranded tRNA sequence-structure
pairs, taken from the Nucleic Acid Database (NDB) \cite{NDB:1, NDB:2}, considering only Watson-Crick and wobble
base pairs. In this training set, we find $16$ structures having genus $0$, $73$ of genus $1$ and $1$
structure of genus $2$. The average sequence length is $75.21$ nucleotides.
We analyze the following five random variables:
$bp$, the number of base pairs,
$st_n$, the number of stacks,
$st_{\ell}$, the average length of a stack,
$hp_n$, the number of hairpin and finally
$hp_{\ell}$, the average length of a hairpin loop.
Here a stack of length $k$ is the maximal sequence of parallel arcs $\{(i,j), (i+1, j-1), \ldots, (i+k-1, j-k+1)\}$.
A hairpin loop of length $j-i-1$ is a substructure, which consists of a base pair $(i,j)$ and
the unpaired bases $i+1, \ldots, j-1$.

The statistics is obtained by Boltzmann sampling of $10^5$ structures over $76$ nucleotides via the
SCFG. For reference purposes we furthermore sample $10^5$ random structures over $76$ nucleotides, having
fixed genus $0$ and $1$, respectively, with uniform probability \cite{Huang:13}. We summarize in
Table~\ref{T:stat} the respective means and variances of the above five random variables.

The sampling generates $264$, $9610$, $126$ structures having genus $0$, $1$ and $2$, reflecting the
large quantity of genus $1$ structures in the training set. By construction our SCFG does not recognize
contributions of unpaired bases in hairpin loops, bulges and interior loops, which explains the systematic
deviation in the lengths of hairpin-loops. Table~\ref{T:stat} shows that the Boltzmann sampled
structures are not random structures of either genus zero or one.

The implication of the CFG to the folding of pk-structures is work in progress.
Though we can fold a $\lambda$-structure over a given sequence $\theta$ in $O(n^3)$ time,
the bijection producing the corresponding pseudoknotted structure does systematically alter
the underlying sequence. In particular, in case of pk-structures of genus one, this consists
in the transposition of two subsequent intervals and is thus manageable.

\section{ Acknowledgments.}
We gratefully acknowledge the help of Kevin Shinpaugh and the computational support team at VBI.
Many thanks to Christopher L.~Barrett and Henning Mortveit for discussions.

\bibliographystyle{elsarticle-num}

redpajama_set_name: RedPajamaArXiv


text:
An Open Letter to DC: For Your Consideration, DC Shows That Could Be
by Gary DaBaum | Nov 20, 2019 | Comics, Movies / Video / Theater, Science Fiction / Fantasy | 0 comments
Dear Powers That Be:
While I'm not sure if you want to take the time to read this article, let alone actually consider my proposals, I did want, at least, to bring these ideas forward, if for no other reason than to present to fans of DC comics ideas of what I think would make great shows.
Some have shown excitement over the upcoming Superman And Lois television series. There have also been interest in a few upcoming shows from DC Universe (Bizarro TV, an anthology series that will somehow combine live-action, animation, and puppets to tell stories about some of the strangest and most obscure characters in DC Comics) and the upcoming HBO MAX (Strange Adventures, another anthology series featuring characters from the DC Universe in cautionary tales from a world where super powers exist).
Now, I'm not going to gripe about how some of these shows (not all) seem to be sticking to the mythos of Batman (Batwoman and the upcoming Harley Quinn series, and the Birds Of Prey movie) and Superman (Supergirl and Superman And Lois). As a matter of fact, this isn't even a column of me complaining about anything. No, I just want to share ideas.
First, yes, there are some characters featured in these shows who really deserve a chance at a series or film, in some cases, some may deserve a second chance or three.
But DC has a huge library of characters that could work well in a series. Some of these, I've actually given some thought on in regards to how I would go about adapting these characters to the screen. So, if the CW, DC Universe, HBO MAX, or Warner Brothers is reading this…..some of us here at the station are ready to help you produce these shows (Hey, it doesn't hurt to try, right? I mean, we do have the talent to pull this off)
Captain Carrot And His Amazing Zoo Crew
Based on the characters featured in the comic created by Roy Thomas and Scott Shaw.
For the uninitiated, here's the gist. While investigating a strange phenomenon causing people of Metropolis to act like primates, Superman discovers that a beam is coming through a barrier surrounding the Earth. Using a meteor to shield himself from the ray, Superman finds himself on an alternate Earth, Earth-C (Later to be known as Earth 26), a world populated by anthropomorphic animals. The meteor was shattered by the ray, and it's fragments affected several of this Earth's citizens, giving them super powers. The team includes:
Captain Carrot, alter ego, Rodney Rabbit, a rabbit – A comic book artist for Wombat Communications, whose window box of carrots was affected by the meteorite. C.C's super powers comes from eating one of the cosmic carrots, the only downside being that the effects last only 24 hours.
Alley-Kat-Abra, alter ego, Felina Furr, a cat – she's a martial arts instructor who gained her magical powers when a meteor fragment crashed into a pot close by. A stirring stick in the pot was also transformed into a magic wand, or Magic Wanda as Felina named it.
Yankee Poodle, alter ego, Rova Barkitt, a dog – she's a journalist who was struck by the meteor fragment and given the powers of "Animal Magnetism". Using her right hand, blue stars shoot out to repel objects. With her left a red and white stripe which is used to attract objects.
Rubber Duck, alter ego, Byrd Rentals, a duck – a famous movie star struck by a meteor fragment and given the power of elasticity.
Fastback, alter ego, Timmy Joe Terrapin – a turtle with the unfortunate habit of being late to work. The meteor fragment hit him, giving him super speed.
Pig Iron, alter ego, Peter Porkchops, a pig – struck by the meteor, this former steel worker wound up with a body made of steel, literally, giving him super human stamina and strength.
In the original run of the comics, the crew was joined by Little Cheese, aka Chester Cheese, a mouse with the ability to alter his size. Also, later, American Eagle, aka Johnny Jingo, joined the team. He had no powers, but uses gadgets. Their enemies include the evil genius Doctor Hoot, the solar powered Salamandroid, and Cold Turkey, to name a few.
Now, will this work? Yes, why not? Warner Brothers already has a history of funny animal cartoons. If the animation was done right (as in Scott Shaw's designs), as well as the story, it could very well work out. Of course, Warner Brothers animation hasn't been lucky with a past attempt on funny animal super heroes (Loonatics Unleashed).
Pilot episode: Pretty much how the first adventure of the crew played out. Extra points if George Newbern can reprise his voice role of Superman from Justice League, unless you want to go the Space Jam route and have Tyler Hoechin guest star in the episode
Based on the comic book created by Joe Simon and Jerry Grandenetti
A teenage President of the United States is attacked in his office by a legless vampire werewolf. Ooookay.
Prez was a short lived comic book (four issues, with a fifth story later published in the late 70's) that DC published in 1973. Teenage Prez Rickard (who was named Prez by his mother, who felt that he would one day become the President of the United States) becomes the first teenaged president of the U.S, this is due to an amendment being passed lowering the age of that people can run for public office. His mother is the Vice President, his sister is his secretary, and his Native American friend, Eagle Free, is made director of the FBI. Prez's nemesis is Boss Smiley, a political boss, who's head looks like a smiley face button, who wished to use Prez for his own nefarious political gains.
Throughout the short run, Prez faced against, not only Boss Smiley, but a legless vampire and his werewolf henchmen, a militia group led by the great-great-great-great-great-grandnephew of George Washington, and evil chess players. And before you ask, yes, I'm for real. Let's face it, DC Comics had some weird stuff going on in the 70's.
After the short run, Prez would be featured in an issue of Vertigo's Sandman written by Neil Gaiman, which was followed by a one shot from Vertigo. Recently, DC published a miniseries featuring a young girl, Beth Ross, who becomes President after being elected via Twitter, her vice-president was also named Prez Rickard.
Now for the big question: can it work as a TV series? Yes, but not many showrunners are going to be able to take what I just described about the original Prez issues and his adversaries and pull it off. Maybe based on the recent miniseries with Beth, but let's take Prez Rickard and clean that all up a bit, shall we?
Preston "Prez" Rickard grew up a child genius. At age 17, he had graduated from the Harvard Graduate School, and, due to the said amendment being passed lowering the age of running for public office, runs for Senate, winning the seat. Shortly after, he runs and wins the presidency at age 19, with a little help from Boss Smiley, a rotund looking man, who wears a smiley face button on his lapel, but on this particular Earth, he's an incarnation of evil. He picks his staff, all of whom are his fellow classmates from Harvard (not teenagers, mid to late 20's, basically), John Eagle Free is in a similar position as his comic book counterpart. He asks his favorite professor from Harvard, who is an expert on world politics, to be his chief of staff.
The show would be a combination of Aaron Sorkin's The West Wing and "Name Any Young Adult Series Here", with a few fantasy elements thrown in.
Pilot episode: After an intro of news footage regarding Prez's road to the White House, the episode sets up the rest of the series. Featuring a possible romance between two staff members, a bit of political drama, and Boss Smiley confronting Prez near the end of the episode, coming to claim his soul, since Smiley did help Prez win the election, Professor Chief of Staff (Not his real name) intervenes claiming that a President's term lasts four years, with a possible chance for re-election. Smiley, realizing the loop hole in the contract, leaves in a huff. Professor Chief of Staff then tells Prez, that if he wishes to survive this presidency, he had better take it all serious and act presidential.
Future episodes will include assassination attempts, political intrigue, the professor and Eagle Free working together to thwart the plans of Boss Smiley, the professor's possible connection with Smiley, and scandal, as Prez and the daughter of the ambassador of Iran fall in love with one another.
Maybe we'll toss in the legless vampire.
The next two entries, I don't think much needs changing when bringing them to the screen. A few minor tweakings, perhaps, but on the whole, they're good as is.
Kamandi
Kamandi, The Last Boy On Earth, was created by Jack Kirby. Set in a post apocalyptic future, after an event known as The Great Disaster, the human race have been reduced to savages. Highly evolved animals now rule the world. The last survivor of a human outpost, Kamandi was found in a bunker, Command D, near what was once New York City. Raised by his elderly grandfather, Kamandi learned of life before the disaster thanks to records and videos kept in the bunker. After the death of his grandfather, Kamandi leaves the bunker and begins to search for surviving humans.
Kamandi's supporting cast includes Ben Boxer, a mutant genetically engineered to survive the world post Great Disaster, Dr. Canus, a humanoid canine scientist, Great Ceaser, leader of the Tiger Clan and his teenage son, Tuftan. The series would follow the concept of the original comic book series, with Kamandi searching the world in hopes of restoring man's sentience and civilization.
Happy exploring, kids. ./
Night Force
Night Force, created by Marv Wolfman and Gene Colan, is a group of individuals brought together by Baron Winters and tasked with fighting supernatural forces. They include:
Baron Winters, a sorcerer with a mysterious background (Don't all sorcerers have one of those?), who's tasked with keeping the balance between good and evil. Baron is unable to leave his home, Wintersgate Mansion, and manipulates, sometimes unethically, others to do missions for him. His companion in his home is a pet leopard named Merlin
Donavon Caine, a professor of parapsychology at Georgetown University. An expert in parapsychology and occultism, his wife, a former student, was killed during a supernatural ritual.
Jack Gold, a down-on-his-luck reporter for a tabloid newspaper. Jack was recruited by Winters when he was assigned to do an interview with Winters.
Vanessa Van Helsing. A descendant of Professor VanHelsing. Vanessa possesses the power of telekinesis, which enables her powers in the supernatural. She can also communicate with supernatural beings. These powers have wrecked havoc on her psyche.
Series can be used to, not only feature stories of the supernatural, but also feature other supernatural related characters from the DC Universe. Such as Doctor Occult, Madame Xanadu, and, oh, I dunno …
These are but four properties that I feel have potential as television series, whether it be for the CW, DC Universe, or HBO Max. There are plenty in DC's library to choose from. They've been around since the 1930's, you could probably take the most obscure character and have a hit.
All of these are merely ideas, you don't have to consider them. However, should you consider these proposals, an executive producer credit would look very nice on my bare IMDB entry. Hey, like I said, it couldn't hurt.
Gary DaBaum
C/O SCIFI.radio. SciFi For Your WiFi
Gary DaBaum, SCIFI.radio DJ, writer, and all around nice guy, can be heard on SCIFI.radio. He's also on Twitter: @GaryDaBaum.


text:
Protect Our Children from Concealed Sexual Harassment
Written by: Rienna Kaur
Edited by: Amirah Syazwani Shawel
Schools are meant to be the safest place second to only our own homes. Are they actually safe? Malaysian twitter has shown and proven the fact that this isn't true at all. Recently a Twitter user who is also a Human Rights Activist @TerryDieHeiden came forward with questions regarding period spot checks and whether the practice is still prevalent in schools, but more specifically boarding schools in this country. This particular tweet was made on the 16th of April 2021 on the social media platform. An old, outdated practice of ustazah, who are female religious teachers physically checking students to make sure that they don't try to get out of fasting and prayer by using menstruation as an excuse.
Some of the most outrageous things those teachers would ask them to do is to show them proof of their menstrual blood or will proceed to reach down to touch their private parts so as to feel whether they're wearing pads or whether the students were lying without their consent which must be noted. All of the students emphasized the things they were subjected to were done under coercion because they did not see it as wrong. They just felt like it was a normal practice everyone had to go through.
Terry also emphasized that this should not be done under any circumstances because it is a direct invasion of privacy and this behavior if it does happen, should be reported to parents and authorities alike for further action to be taken. To everyone's utter dismay, former and current students from different schools all around Malaysia came forward in his comment section as well as his Twitter private messages with information about the practice that was unfortunately still very much prevalent.
There were two types of reactions to this. The first one is utter shock at the information because some people, evidently the ones who've attended international schools did not know that this kind of practice exists. The other more prominent, but also very unfortunate reaction was that the majority of the public was already aware this was a thing, but never thought to say anything in fear of backlash. Some were even traumatized to the point of being silenced. It did not even occur to most of them that the things they went through were pretty loud and clear, a form of sexual harassment.
Another prominent Twitter user @AnotherAznTart said that it never did occur for her to tell her mother the things that used to happen in school because it was thought to be so common.
"When I told her the other day, she was like why didn't you ever tell me?"
That statement above just adds to the argument that most of the students thought of this behavior as something so normal which is very much unfortunate. They should not be subjected to this kind of inhumane treatment that is done in the name of religion, but only serves to shame students into thinking they're lying about their menstrual cycles and subjecting students to trauma for years and even decades to come. This draconian practice needs to stop being normalized.
MINISTERIAL ACTION
The latest remarks on the topic by the Minister of Women, Family, and Community, Datuk Seri Rina Binti Harun has said on behalf of the ministry that she takes those asking for enquiries very seriously and it should not have happened in the first place so, strict investigations will be carried out into the matter as reported by Astro Awani. The statement was made on the 24th of April, 2021 in the form of a press release. Just as we thought, the statement didn't go exactly well with netizens because they wanted to see those statements turn into action as soon as possible with quick results.
PUSH FOR ACTION
With all these stories resurfacing, many non-governmental organizations are calling upon the Ministry of Education (MOE) and the Majlis Amanah Rakyat (MARA) to start an investigative task force into the issue. NGO's like the Pertubuhan Kendiri Wanita dan Gadis, All Women's Action Society (AWAM), and Sisters in Islam (SIS) have emphasized that the stories resurfacing on these social media platforms can be considered as sexual offenses and pressed that these offenses are very much punishable under the Sexual Offences Against Children Act 2017 and also under Section 354 of the Penal Code for outrage of modesty.
These sexual offenses under the guise of making sure someone follow their religious liberty and duties only serve to hurt their modesty as well as decrease their beliefs and it should not happen to be very frank. The system needs to be rebuilt and completely revamped to make sure that students will not feel victimized and traumatized again after this. The current system has failed our current and former students alike and the action we can hope for now is for the relevant parties to work together and collaborate to create a zero-tolerance policy towards any and all types of sexual violations. A focus on their mental health needs to be emphasized on and help needs to be very accessible for them if they ever need it.
PRU-15 sentimen perkauman diungkit
Adham Baba sedia bertanding PRU16
PASCA PRU15: GPS serah kepada Agong tentukan PM-ke10


text:
'Aladdin' Takes Us on a Magic Carpet Ride
Broken Box's Newest Play Runs November 29 through December 1
By Kristen Lee, Copy Editor|November 21, 2007
In the coming weeks, Broken Box can be found in a rather unusual situation—guys dressing up as women, a girl playing the lead male and occasionally, some breaking into song. The reason? Broken Box is rehearsing "Aladdin," the selection for this year's annual fall production.
But don't expect the Disney version. Created by Stuart Arden, this "Aladdin" is a British pantomime, which is a form of theater that incorporates a lot of audience participation.
"What's nice about it is that it's enjoyable for little kids, because they enjoy the physical humor, but a lot of the lines, a lot of the jokes are aimed at adults," drama teacher Nancy Moran said. "You can really attract both ends of the spectrum for your audience."
Cast members have been enjoying the different experience.
"I was really excited," senior Marissa Palmor said. "We usually stick to things like Shakespeare … I think it's good for us to be thrown into something challenging."
Marissa will be playing the lead male role of Aladdin; the gender-switch is a tradition for British pantomime. Senior Grayson Carr plays Widow Twanky, Aladdin's mother, also following the tradition of a male playing the lead female.
"It was hard in the beginning to find a character that wouldn't be too annoying," Grayson said. "It's such a physical, big role—it can be really hard."
British pantomime is largely based on puns and slapstick humor. But Broken Box had some more serious issues as well—the character of a Chinese inspector incited much debate.
"[His lines] were very stereotypical … of Asians," Moran said. "And we have to be aware of how we present ourselves to the community."
After several class discussions, the class decided to alter the character. However, rehearsals have been running smoothly.
Another unique aspect of this product is the addition of songs.
"They're taken off really well-known songs," junior Katie Chansler said. "They're songs that people today would recognize. … We're not really used to it so at first, it was kind of difficult."
Nevertheless, they have so far come across only small problems with things like entrance and exit cues, appropriate gestures of shock and horror and cape-swishing techniques.
"They've really started to make it their own," Moran said.
This is the first Broken Box production for sophomore Emma Carr, who plays Princess Martini, somewhat the equivalent of Disney's Princess Jasmine.
"It's exciting to finally be in Broken Box," Emma said. "And I think ["Aladdin"] is a good play to start with, because it's a comedy. It's easier for actors to get into.
For both returning and new Broken Box members, "Aladdin" seems like it will be a success.
"It's really fun … and really outrageous," Marissa said.
Broken Box will be performing "Aladdin" November 29 and 30 at 7 p.m. and December 1 at 2 p.m. and 7 p.m. Tickets cost $5 ahead of time and $8 at the door.
Battle of the beaus: A Disney princes ranking
A holiday helping of traditional recipes
A comprehensive review of Peet's holiday treats
'The Princess Switch 3': A festive flop
'Eternals' is stunning but shallow, leaving the MCU in peril


text:
#ifndef __CHARBUF_HPP__
#define __CHARBUF_HPP__

#include <charb.hpp>

/** Streambuf backed by a charb. Similar to std::stringbuf (used by
 * std::ostringstream) but is based on a charb rather than a
 * string. The associated stream (charstream) has an overloaded
 * operator<< which allows to write content since the last rewind.
 */

class charbuf : public std::streambuf {
  charb buf;
public:
  charbuf(size_t s) : std::streambuf(), buf(s) {
    setp(buf.base(), buf.base() + buf.capacity());
  }
  virtual ~charbuf() { }

  virtual std::streamsize xsputn(const char *s, std::streamsize n) {
    std::streamsize left = epptr() - pptr();
    if(left < n) {
      int off = pptr() - pbase();
      buf.enlarge();
      setp(buf.base(), buf.base() + buf.capacity());
      pbump(off);
    }
    memcpy(pptr(), s, n);
    pbump(n);
    return n;
  }

  virtual int overflow(int c) {
    size_t csize = pptr() - pbase();
    buf.enlarge();
    setp(buf.base(), buf.base() + buf.capacity());
    pbump(csize);
    if(c != EOF) {
      *pptr() = c;
      pbump(1);
    }
    return !EOF;
  }

  size_t size() const { return pptr() - pbase(); }
  char *str() const { return pbase(); }
  void rewind() {
    setp(buf.base(), buf.base() + buf.capacity()); // Any other way to reset pptr?
  }
};

class charstream : public std::ostream {
  charbuf *buf;
public:
  charstream(size_t s = 1024) : std::ostream(new charbuf(s)), buf(0) {
    buf = (charbuf*)std::ostream::rdbuf();
  }
  virtual ~charstream() {
    std::ostream::rdbuf(0);
    delete buf;
    buf = 0;
  }
  size_t size() const { return buf->size(); }
  const char *str() const { return buf->str(); }
  void rewind() { buf->rewind(); }
};

std::ostream &operator<<(std::ostream &os, const charstream &cs) {
  return os.write(cs.str(), cs.size());
}

#endif /* __CHARBUF_HPP__ */

redpajama_set_name: RedPajamaGithub