Posts by Tags

bash

Conditional execution in bash

1 minute read

Published:

Situation: You want to execute a script as soon as a particular file is created.

This is an easy one-liner:

# waiter.sh
# Usage: ./waiter.sh script_to_be_run file_to_anticipate [time_delay, def. 10 mins] 
while [ ! -f $2 ]; do sleep ${3-10m}; done; bash $1

The while loop keeps checking the existence of the specified file: while the file does not exist the loop will run sleep on and on. When the file exist, loop will be exited and the specified script will be run. Could it get any simpler? It seems like a waste just to continually check, but I don’t see a better option for now. (If you are wu liao run bash -x waiter.sh to see how many sleeps your waiter.sh has to go through to finally run your desired script.)

One learning point – I was using this kind of thing before to make a positional argument optional:

[ "$3" = "" ] && time_delay="15m" || time_delay=$3

This is a “ternary” bash construction, which you can construe as a shorthand conditional: A && B || C means “if A is true; execute B; else execute C”.

Turns out the easier way is using shell parameter expansion magic:

time_delay=${3-15m}  # if $3 is unset, set $3 to 15m
time_delay=${3:-15m} # if $3 is unset or null, set $3 to 15m

Extracting sequence from PDB file

3 minute read

Published:

There are times that you need the sequence of only the resolved amino acids in an X-ray crystal structure, not the full sequence of the construct. If you download the FASTA sequence or check the SEQRES record in the PDB file, you would only find the full sequence.

How to persistently run your script with Bash

1 minute read

Published:

This is a simple script that saves a lot of headaches for me. The situation: I’m running a proprietary software and it seems that there is a problem with the way our license server is setup, because from time to time the process will stop due to “not enough license” even though we have enough. Then we have to rerun, which is ok because there are checkpoint files, but it is a pain to constantly check whether my run has crashed or not.

Formatting list of SMILES with bash scripting

2 minute read

Published:

Here is a fun text manipulation exercise using bash you can do in less than an hour. Given that I have this text file, file.smi:

smiles1 some_id_abc
smiles2 some_id_xyz
...

I want to have it like this:

smiles1 C00000001
smiles2 C00000002
...

This was my real-world need of converting a list of SMILES to a format that is accepted by a conversion programme. Looks easy right?

Simple web scraping with Python

4 minute read

Published:

The situation: I wanted to extract chemical identifiers of a set of ~350 chemicals offered by a vendor to compare it to another list. Unfortunately, there is no catalog that neatly tabulates this information, but there is a product catalog pdf that has the list of product numbers. The detailed information of each product (including the chemical identifier) can be found in the vendor’s website like this: vendor.com/product/[product_no]. Let me show you how to solve this problem with bash and Python.

Good practice for bash scripting

6 minute read

Published:

I will illustrate some good practices of writing bash scripts by showing you how I write and refactor my bash script dock.sh that does some preparation for docking and then launch docking.

coding

Doing t-test in batch

1 minute read

Published:

Situation: I want to do t-test between two sets of experiment A and B. Each A and B were run in triplicates, so we have:

data_A_1.dat
data_A_2.dat
data_A_3.dat
data_B_1.dat
data_B_2.dat
data_B_3.dat

How to run t-test between every combination of A and B, as well as all A combined vs all B combined?

Formatting list of SMILES with bash scripting

2 minute read

Published:

Here is a fun text manipulation exercise using bash you can do in less than an hour. Given that I have this text file, file.smi:

smiles1 some_id_abc
smiles2 some_id_xyz
...

I want to have it like this:

smiles1 C00000001
smiles2 C00000002
...

This was my real-world need of converting a list of SMILES to a format that is accepted by a conversion programme. Looks easy right?

Good practice for bash scripting

6 minute read

Published:

I will illustrate some good practices of writing bash scripts by showing you how I write and refactor my bash script dock.sh that does some preparation for docking and then launch docking.

Picking up Python as a scientist

4 minute read

Published:

My PhD supervisor prophetically decreed back in 2013 that “it might do thee some good to learn Python” (not his exact words).

computational biology

Simple web scraping with Python

4 minute read

Published:

The situation: I wanted to extract chemical identifiers of a set of ~350 chemicals offered by a vendor to compare it to another list. Unfortunately, there is no catalog that neatly tabulates this information, but there is a product catalog pdf that has the list of product numbers. The detailed information of each product (including the chemical identifier) can be found in the vendor’s website like this: vendor.com/product/[product_no]. Let me show you how to solve this problem with bash and Python.

Structure leads to function

5 minute read

Published:

Structure leads to function is a fundamental tenet of structural biology. It may sound obvious (or not), but the implications are profound.

Job title

2 minute read

Published:

What science field label do you give yourself?

Why do simulation?

5 minute read

Published:

Why do we do what we do? — is a question that should be asked by practitioners of any vocation

essay

On The Plague

3 minute read

Published:

In the beginning of the pandemic, commentaries on Albert Camus’ The Plague (1947) mushroomed and the book sale went up, for obvious reasons. I, too, joined this train, reserving the book from the library. In a somewhat ironic meta-allegory of the pandemic though, I read it halfway, and due to no loan extension because somebody else reserved it, gave up on it. Don’t my languid lockdown reading pace, and the helplessness of it, reflect the general gloomy pandemic mood, a little bit?

It is Wednesday

1 minute read

Published:

The sky cried her heart out
tempestuously on Monday
On Tuesday morning
the tears kept falling
percolating the slumbered
It has slowed to rare droplets now
But I wonder:
with your grey countenance
Do you still have more
sadness to pour out?

It is a gloomy day. The new COVID-19 cases today in the world is 208k, more than 1/4 of which are from Indonesia. Singapore experienced a steep surge after a lull as well.

Here is another verse of consolation (source):

Do not stand
By my grave, and weep.
I am not there,
I do not sleep—
I am the thousand winds that blow
I am the diamond glints in snow
I am the sunlight on ripened grain,
I am the gentle, autumn rain.
As you awake with morning’s hush,
I am the swift, up-flinging rush
Of quiet birds in circling flight,
I am the day transcending night.
Do not stand
By my grave, and cry—
I am not there,
I did not die.

Man Arai, a Japanese composer, set a melody to this verse, and here are some other sung versions:
By Hayley Westenra in English
By Paul Kim in Korean. The Korean version was also often sung as a tribute of the 2014 Sewol ferry accident.

grace

jupyter notebook

Molecular similarity network with visualised structures

less than 1 minute read

Published:

Analogous to a Sequence Similarity Network (SSN), molecular similarity network visualises Tanimoto similarity between molecules. iwatobi shows how to construct one with molecular structures here and here using Python packages RDKit, networkx, and cyjupyter.

lab notebook

Link roundup: 2024

1 minute read

Published:

Science
Chaos and cause

To fully appreciate what this means, heed a lesson from Fyodor Dostoyevsky’s great novel, The Brothers Karamazov (1880), which asks how a benevolent God could allow suffering. There is just one virtuous character in the novel, the monk Father Zosima, whose simple teaching, dictated through the genius of Dostoyevsky, sheds light on chaos, causation and difference-making:

See, here you have passed by a small child, passed by in anger, with a foul word, with a wrathful soul; you perhaps did not notice the child, but he saw you, and your unsightly and impious image has remained in his defenceless heart. You did not know it, but you may thereby have planted a bad seed in him, and it may grow, and all because you did not restrain yourself before the child, because you did not nurture in yourself a heedful, active love … for one ought to love not for a chance moment but for all time. Anyone, even a wicked man, can love by chance. My young brother asked forgiveness of the birds: it seems senseless, yet it is right, for all is like an ocean, all flows and connects; touch it in one place and it echoes at the other end of the world.

Parenting Storytelling: The Parenting Tool You Didn’t Know You Needed

Link roundup: Jan–Mar 2022

2 minute read

Published:

Since these AIs are just giant matrix multiplication machines, “intuition” now has a firm grounding in math - just much bigger, more complicated math than the usual kind that we call “logical”.

This would be a common pattern for sciences: much worse at everyday tasks than people who do them intuitively, until it generates some surprising and powerful new technology. Democritus figured out what matter was made of in 400 BC, and it didn’t help a single person do a single useful thing with matter for the next 2000 years of followup research, and then you got the atomic bomb (I may be skipping over all of chemistry, sorry).
What Are We Arguing About When We Argue About Rationality?

What he seeks to practice is, in a phrase popularized by the Marxist philosopher Antonio Gramsci, “pessimism of the intellect, optimism of the will.”
Can Science Fiction Wake Us Up to Our Climate Reality?

Caulfield then introduced two different ways of thinking about how we engage with ideas when we’re on the internet: The web as a garden and the web as a stream. Think of the web as an organically developing garden: a space in which there’s no predetermined order or relationship of things to one another. Caulfield writes, “Every walk through the garden creates new paths, new meanings.” What came first in the garden doesn’t matter either. Each thing in the garden is related to the other things as it exists in the moment.
The Faithful Gardener

Science
Dual use of artificial-intelligence-powered drug discovery
Twelve quick tips for software design
Computer Scientists Prove Why Bigger Neural Networks Do Better
Failing the test: DNA barcoding brought botanist Steven Newmaster scientific fame and entrepreneurial success. Was it all based on fraud?
What’s the buzz? Let’s talk about numbing ingredients
The pandemic’s true death toll: millions more than official counts
5 nutrition goals that are better than weight loss

Others
https://github.com/csinva/imodels
Synaesthetics
Transformative Experience and Pascal’s Wager
Do Good Doorbell Cams Make Good Neighbors?
How to Want Less
It’s Your Friends Who Break Your Heart
How to be useless
What We Don’t Want to Know
It’s Time for Some Game Theory
Why does woman have ‘man’ in it and female has the word ‘male’ in it?

Link roundup: Oct–Dec 2021

6 minute read

Published:

Humility, by contrast, admits that defeat is possible. It occupies the nebulous zone between preparedness and precaution by asking a moral question: not what we can achieve with what we have, but how we should act given that we cannot know the full consequences of our actions.
“Preparedness” Won’t Stop the Next Pandemic

Rather than trying to beat the coronavirus one booster at a time, the country needs to do what it has always needed to do—build systems and enact policies that protect the health of entire communities, especially the most vulnerable ones. Individualism couldn’t beat Delta, it won’t beat Omicron, and it won’t beat the rest of the Greek alphabet to come. Self-interest is self-defeating, and as long as its hosts ignore that lesson, the virus will keep teaching it.
Ed Yong | America Is Not Ready for Omicron

For instance, in Plato’s Euthyphro dialogue, Socrates runs into the local priest and expert on the gods, the self-same Euthyphro, who plans to do something unholy by the local standards – to press charges against his own father. Socrates asks how he, a man wise in the ways of the gods, could do something the gods would obviously condemn?

Euthyphro answers that, in fact, his plan passes the gods’ standards. This raises only more questions for Socrates, who presses on and asks Euthyphro to clarify what he means by holiness. If Euthyphro’s plan is so holy, surely he could explain his reasoning and spell out the nature of holiness? Under questioning, though, Euthyphro reasons himself into a corner, unable to give a clear account of holiness. The dialogue ends there, with the premier theologian of Athens excusing himself with a version of ‘I’m actually late for a thing.’
How do you know?

Researchers from Harvard and the University of Virginia brought subjects into a lab where they had to choose between two torture devices. The first option was to push a button that would deliver a safe, but still sharply unpleasant, electric shock to themselves. Two-thirds of the men in the study chose to shock themselves despite the fact that they’d 1.) all been shocked in an earlier phase of the study, and 2.) all professed that they would pay money to avoid the unpleasant experience in the future.
Why Stories Are Like Taking Drugs

Sigmund Freud once stated that no one believes in their own death. In the unconscious, there is a blank space where knowledge of this one sure thing about our futures should be.
Life after death: how the pandemic has transformed our psychic landscape

Inverting the old cliché, Christopher Hitchens said, ‘Everyone has a book in them and that, in most cases, is where it should stay.’
https://literaryreview.co.uk/have-you-considered-accountancy

You’ve probably heard the probabilistic (aka Bayesian) side of things before. Instead of thinking “I’m sure global warming is fake!”, try to think in terms of probabilities (“I think there’s a 90% chance global warming is fake.”) Instead of thinking in terms of changing your mind (“Should I surrender my belief, and switch to my enemy’s belief that global warming is true”), think in terms of updating your probabilities (“Now I’m only 70% sure that global warming is fake”). This mindset makes it easier to remember that it’s not a question of winning or losing, but a question of being as accurate as possible. Someone who updates from 90% to 70% is no more or less wrong or embarrassing than someone who updates from 60% to 40%.
Scott Alexander

Pundits have urged people to “listen to the science,” as if “the science” is a tome of facts and not an amorphous, dynamic entity, born from the collective minds of thousands of individual people who argue and disagree about data that can be interpreted in a range of ways.
Ed Yong

In other words, “vibes” are similar to the approximations that machine learning systems use, and the two feed off of each other synergistically. The situation is precisely encapsulated by Goodhart’s Law: “When a measure becomes a target, it ceases to be a good measure.”
Ludwig Yeetgenstein

Science
How COVID vaccines shaped 2021 in eight powerful charts
J Chem Inf Model | Making it Rain: Cloud-Based Molecular Simulations for Everyone
Nature | Synthon-based ligand discovery in virtual libraries of over 11 billion compounds
Top DATA SCIENCE Cheatsheets (ML, DL, Python, R, SQL, Maths & Statistics)
J Med Chem | Explainable Machine Learning for Property Predictions in Compound Optimization
Tomas Pueyo | The Omicron Question
To Touch the Sun
Life after death: how the pandemic has transformed our psychic landscape
4 Dead Infants, a Convicted Mother, and a Genetic Mystery
All the Biomass on Earth
Pascalian Medicine
It’s Time to Fear the Fungi
How to Fight Ocean Plastic
https://github.com/Merck/DeepNeuralNet-QSAR
https://github.com/deepchem/deepchem
DeepChem aims to provide a high quality open-source toolchain that democratizes the use of deep-learning in drug discovery, materials science, quantum chemistry, and biology.
COP26: Can countries be forced to meet net zero targets? And more questions
How Special Is Science?

Others
Voice above water
How to know what you really want
Reactance
‘I Would Give Anything to Hold Their Hands Again’
Review: Delia Falconeron Amitav Ghosh | A Dazzling Synthesis
Freeze en Place: How to Use Your Freezer as a “Cooking” Tool
The End of the Dinosaurs
How to rest well
How we became weekly
SMBC | Morality
Energy, and How to Get It
Bamboolib: One of the Most Useful Python Libraries You Have Ever Seen
Sci-Fi Icon Neal Stephenson Finally Takes on Global Warming
And the Walls Came Down
Composer and academic solves historical puzzle to bring the sounds of Ancient Rome to life
Spinoza’s God: Einstein believed in it, but what was it?
Kill the Travel Bug: The Case for Staying Put

Link roundup: Jul–Sep 2021

4 minute read

Published:

Papers
Production of Rainbow Colorants by Metabolically Engineered Escherichia coli
NLDock: a Fast Nucleic Acid–Ligand Docking Algorithm for Modeling RNA/DNA–Ligand Complexes
Natural and Synthetic Cannabinoids: Pharmacology, Uses, Adverse Drug Events, and Drug Interactions
Fifteen quick tips for success with HPC, i.e., responsibly BASHing that Linux cluster

Science
Agroecology Is the Solution to World Hunger
PHD Comics | The COVID-19 virus (SARS-CoV-2) explained
How a ‘fatally, tragically flawed’ paradigm has derailed the science of obesity
Mechanisms of Long COVID Remain Unknown but Data Are Rolling In
SARS-CoV-2’s Wide-Ranging Effects on the Body
Was that wild weather caused by climate change? Scientists can now say ‘yes’ with confidence
Sorry, Skeptics: New IPCC Report Provides Unprecedented Clarity About Earth’s Climate
Nature | How the coronavirus infects cells — and why Delta is so dangerous
Swimming gives your brain a boost – but scientists don’t know yet why it’s better than other aerobic activities
The search for the grand unification of aromaticity
In the Pipeline | More Protein Folding Progress – What’s It Mean?
Nature | Single chip tests thousands of enzyme mutations at once
The New COVID Panic
Here’s the Right Story for Vaccine Holdouts
1st Prize Short Climate Film Winner: “Three Seconds”
Nature | Why autoimmunity is most common in women
Writing Can Help Us Heal from Trauma

Others
How to Automate Work Using Python
Field Notes of a Sentence Watcher
This Isn’t the Essay’s Title
When C.S. Lewis Reviewed His Buddy’s Book… The Hobbit
The Rotten Tomatoes Equation
Tell Children the Truth
The Big Book of Small Python Projects
Build a Personal Diary With Django and Python
A sarong’s story
Forgetting My First Language
Kim Stanley Robinson: Remembering climate change … a message from the year 2071 | TED
How to fix your job so that you love it, in three steps
Kim Stanley Robinson’s Global Catastrophe Epic: We Will Keep Going
Growing My Faith in the Face of Death
The Joy Of Idle Living
Socratic emergency
At best, we’re on Earth for around 4,000 weeks – so why do we lose so much time to online distraction?
Why Satan should chair your meetings
Men Without Chests
Typos, tricks and misprints
Slavoj Žižek: Last Exit to Socialism

the black mountain rises, a reference point
to every human moment, utterly silent.
No one climbs this mountain, there are no trails,
because the place is holy: it does not exist to serve us,
it is not meant to please us, it simply is,
and in this way it is a god.

Mountains do not move, and that is their mountainness.
Stephen Hollaway

It is as unscientific to blindly trust scientists as it is to dismiss them.
Opinion: Scientists Must Combat Scientific Dogmatism

“For it must be understood that this is a children’s book only in the sense that the first of many readings can be undertaken in the nursery. Alice is read gravely by children and with laughter by grown ups; The Hobbit, on the other hand, will be funnier to its youngest readers, and only years later, at a tenth or a twentieth reading, will they begin to realise what deft scholarship and profound reflection have gone to make everything in it so ripe, so friendly, and in its own way so true. Prediction is dangerous: but The Hobbit may well prove a classic.”
– C.S. Lewis reviewing The Hobbit, The Times Literary Supplement, October 2, 1937

Is a flower beautiful?
Is a fruit perhaps beautiful?
No: they merely have color and form
And existence.
Beauty is the name given to something that does not exist
The name I give to things in exchange for the pleasure they give me.
It means nothing.
So why do I say of things: “They’re beautiful”?
Fernando Pessoa

Before 2.5 years, our brains are more fluid and plastic, enabling us to learn and adapt quickly, similar to the state of water flowing around obstacles. After 2.5 years, our brains are much more crystalline and frozen, still capable of learning and adapting but more like glaciers slowly pushing across a landscape.
Why do we sleep?

Several supervillains have higher degrees—why don’t you?
PLOS Comp Biol | Ten simple rules for aspiring graduate students

Richard Feynman, in a lecture entitled “There’s plenty of room in the bottom: An invitation to enter a new field of physics” at the annual American Physical Society Meeting at Caltech on December 29, 1959, suggested that tiny, nanoscale machines could be constructed by manipulating individual atoms. Proteins are precisely such machines.
Phys Rev E | Building blocks of protein structures: Physics meets biology

Link roundup: Apr–Jun 2021

1 minute read

Published:

Papers
The Expanding Role of Chemistry in Optimizing Proteins for Human Health Applications
Artificial intelligence in drug discovery: what is realistic, what are illusions? Part 2: a discussion of chemical and biological data
Artificial intelligence in drug discovery: what is realistic, what are illusions? Part 1: Ways to make an impact, and why we are not there yet
Deep Dive into Machine Learning Models for Protein Engineering

Science
Artificial Proteins Never Seen in the Natural World Are Becoming New COVID Vaccines and Medicines
Too hot to live: Millions worldwide will face unbearable temperatures
Scientific Publishing Is a Joke
Previously unknown type of protein crosslink discovered Cys-Lys bridge
After Covid, Your Health May Depend on Living With Germs
In Our Hurry to Conquer Nature and Death, We Have Made a New Religion of Science
Kati Kariko Helped Shield the World From the Coronavirus
Six lessons from the biotech startup world

Others
The project finishing mindset
The pervasive problem of ‘linguistic racism’
What friends are for Sci-fi short story
Prometheus’ Toolbox
The k-Nearest Neighbors (kNN) Algorithm in Python
The Power of Writing by Hand
Scikit-learn Crash Course - Machine Learning Library for Python

Have you ever thought of the perfect quip or comeback after it didn’t matter—a minute, hour, or day after your conversation has ended?
Well, there’s a name for that phenomenon. It’s called l’esprit de l’escalier, or the spirit of the staircase, and refers to the perfect retort that arises at the wrong time.
The Secret to Being Witty, Revealed

Link roundup: Jan–Mar 2021

1 minute read

Published:

Papers
PLoS Comp Bio | Ten simple rules for quick and dirty scientific programming
Modern Phys Lett B | Current computational methods for enzyme design
Mol Cell | Computationally reconstructing cotranscriptional RNA folding from experimental data reveals rearrangement of non-native folding intermediates
J Chem Inf Model | Informatics for Chemistry, Biology, and Biomedical Sciences
PLoS Comp Bio | Ten simple rules for typographically appealing scientific texts
PLoS Comp Bio | Ten quick tips for making things findable

Science
What data can’t do
In the Pipeline | The Problem with COVID-19 Clinical Trials
How the West Lost COVID
In the Pipeline | Dealing With the Literature
The Sputnik V Vaccine and Russia’s Race to Immunity
Exploring the Supply Chain of the Pfizer/BioNTech and Moderna COVID-19 vaccines
GitHub | enspara Another MSM Python library
In the Pipeline | Myths of Vaccine Manufacturing
NY Times | The Science of Reasoning With Unreasonable People
Nature | Explaining the icy mystery of the Dyatlov Pass deaths
‘But I never smoked’: A growing share of lung cancer cases is turning up in an unexpected population
How to be lucky
Nature | Ten computer codes that transformed science
Reverse Engineering the source code of the BioNTech/Pfizer SARS-CoV-2 Vaccine
The Atlantic | Where the Pandemic Will Take America in 2021

Others
Phantasia
The History of Philosophy From the Perspective of Chicken Enchiladas
Daniel Dennett’s Science of the Soul
Nature | Five tips for understanding and managing your emotions to build flourishing connections
INCIDENTAL COMICS | The hierarchy of needs
AMERICAN PSYCHOSIS - Chris Hedges
Stunning Images of Starlings in Flight
Some of Us Did Not Die
How to write a more compelling sentence
Dinosaur Comics | entropy wolf
SMBC | Science Fictions
SMBC | Think
Who Invented the Alphabet?
‘Kulning’: A hypnotic Swedish singing tradition
Language Log | Who created batik? Who appropriated batik?

Link roundup: Oct–Dec 2020

4 minute read

Published:

The world came into a standstill in March, including this blog. Here’s to a restart.

Papers
Science | Genetic interaction mapping informs integrative structure determination of protein complexes
Chem Sci | Ligand design by targeting a binding site water
Sci. Rep | Statistics for the analysis of molecular dynamics simulations: providing P values for agonist-dependent GPCR activation
Science | Protein storytelling through physics Nice general MD review
J Med Chem | Chemists: AI Is Here; Unite To Get the Benefits
Sci. Rep | Moving targets in drug discovery

Science
In the Pipeline | The New Mutations
It occurred to me that I’m trying to introduce mutations to my enzyme and here is the virus doing just that using the world as its test tube…What do you call this? Poignant? Amusing? Ironic?
The Atlantic | How COVID-19 Changes Our Sleep
The Atlantic | How Science Beat the Virus
Nature | The peanut snack that triggered a fresh approach to allergy prevention
How the novel coronavirus has evolved
Nature | Oxford COVID vaccine paper highlights lingering unknowns about results
PyCaret: Useful ML tool for chemoinformatics #chemoinformatics #RDKit #Machine learning
Nature | How to write a superb literature review
In the Pipeline | Get Ready for False Side Effects
Sci Am | The COVID Science Wars
Helen Berman: the crystallographer who pioneered the Protein Data Bank
Nautilus | Kim Stanley Robinson Holds Out Hope
Nature | Postdoc survey reveals disenchantment with working life
‘disenchantment’ is a curious diction… I suppose many of us have been charmed by the wizards of the ivory tower.
Life with purpose
Nature | Why your scientific presentation should not be adapted from a journal article
COVID-19 Molecular Structure and Therapeutics Hub
In the Pipeline | Vaccine Possibilities
SciAm | Mysteries of COVID Smell Loss Finally Yield Some Answers
Nature | Five rules for evidence communication
meta, biomedical research search engine
Nature | Science search engine links papers to grants and patents
C&EN | Covalent drugs go from fringe field to fashionable endeavor
In the Pipeline | Vaccine Efficacy Data!
How can climate be predictable if weather is chaotic?
brainpickings | Tenacity, the Art of Integration, and the Key to a Flexible Mind: Wisdom from the Life of Mary Somerville, for Whom the Word “Scientist” Was Coined
The New Yorker | How the Coronavirus Hacks the Immune System

Others
Educated Fools: Why Democratic leaders still misunderstand the politics of social class
Beyond Tokyo and Jerusalem Shusaku Endo’s Silence review
Yo-Yo Ma, Kathryn Stott - Over the Rainbow (Official Video)
LARB | Of Course They Would: On Kim Stanley Robinson’s “The Ministry for the Future”
Thesis Whisperer | While you scream inside your heart, please keep working.
Do Elephants Have Souls?
Huawei, 5G, and the Man Who Conquered Noise
Wired | Remembrance
How to have a difficult conversation
Twitter magic realism bot
See a Stunningly Surreal Bookstore in China

Python
Top 11 Github Repositories to Learn Python
github.com/TomNicholas/Python-for-Scientists
github.com/garrettj403/SciencePlots
github.com/rasbt/python_reference
github.com/matplotlib/AnatomyOfMatplotlib
github.com/jerry-git/learn-python3

Do you need a little darkness to get you going? –Mary Oliver

He adopted the following strategy: say what you know; what you don’t know; what you are doing to find out; what people can do in the meantime to be on the safe side; and that advice will change –Nature article

In my work as a mediator, I’ve learnt that successful conversations always involve what I call a ‘gem statement’. When two parties have listened long and hard to each other – have made the heroic effort to listen curiously and empathically even when they disagree strenuously – someone eventually unearths a glowing, priceless gem. It usually takes the form of a short, powerful statement –How to have a difficult conversation

aside from faith,
as far as you know,
you will never have another heart.
better to grow the one you were born with.
Anahata, by Lenelle Moïse

Link roundup: Jun 2019

1 minute read

Published:

Science
Inside the ‘secret underground lair’ where scientists are searching the galaxies
23 ‘facts’ you learned about healthy eating and nutrition as a kid that are no longer true
Pop Sci | The 10 worst insect stings in the wild
The Scientist | Could Tolerating Disease Be Better than Fighting It?
In the Pipeline | A New Way For the Machines To Handle Reagents

For those in the crowd who aren’t synthetic chemists, it cannot be emphasized enough that there is no way that you could have known about either of these choices beforehand – and that if you change the reaction to another bromo-heterocyclic system, the optimal base and solvent are likely to switch again to something else entirely. It’s as bad as cell culture or X-ray crystal growing, two other areas that are famously infested with evil spirits and voodoo rituals. You run into these systems that are just intrinsically very sensitive to initial conditions, with variables that are sometimes too small or obscure for you to even realize that they’re variables.

Potassium hunting on protein factories
Biotech Cockaigne of the Vegan Hopeful
Quanta | Neuroscience Readies for a Showdown Over Consciousness Ideas
Physics Today | The mysterious crystal that melts at two different temperatures
TLS | Weighty matters
Nature | Reproducibility trial publishes two conclusions for one paper

Papers
PLoS Comp Bio | Open collaborative writing with Manubot

Others
The New Yorker | Liu Cixin’s War of the Worlds
How to Pick a Career (That Actually Fits You)
Book Review: The Secret Of Our Success
The Pu-erh Brokers of Yunnan Province
Aeon | A Revolution in Time

Link roundup: May 2019

2 minute read

Published:

Science
NYT | Frances Arnold Turns Microbes Into Living Factories
In the Pipeline | Antibody Design, Publicly Challenged
Nature | A DIY approach to automating your lab
The Atlantic | The Myth of ‘Learning Styles’
The New Yorker | Can We Live Longer but Stay Younger?
8 Simple Tips to Live Longer and Healthier
Sci Am | Can You Prevent Pregnancy with the Pullout Method?
Nautilus | Yes, Determinists, There Is Free Will
Nature | Indonesia tops open-access publishing charts
There Is Such a Thing as Too Much Coffee, Scientists Say tl;dr Drinking no or too much coffee is associated with higher incidence of CVD/CAD/stroke so drink 1-2 cups/day.
5-HTTLPR: A POINTED REVIEW
Science | Meet the blue crew, scientists trying to give food, flowers, and more a color rarely found in nature
Let your cat submit your grant application
CONIECT researcher wins big on TV show, will use cash to fund cancer project
The Scientist | Genetically Modified Viral Cocktail Treats Deadly Bacteria in Teen
Nautilus | Nurture Alone Can’t Explain Male Aggression
New approach for solving protein structures from tiny crystals
In the Pipeline | A Small-Molecule CRISPR Inhibitor
CBD: a marijuana miracle or just another health fad?
CNN | The most effective ways to curb climate change might surprise you
Vox | Why you shouldn’t exercise to lose weight, explained with 60+ studies
Nautilus | How the Western Diet Has Derailed Our Evolution
Science | Want to become a better mentor? Ask for anonymous feedback
Nature | How small changes to a paper can help to smooth the review process
10 Things No One Told Me About Applying for Tenure
Deadly box jellyfish antidote discovered using CRISPR genome editing
Nat Geo | See the world’s oldest trees by starlight
In the Pipeline | Muting Mutations

Papers
Nature | Design and evolution of an enzyme with a non-canonical organocatalytic mechanism
R Soc Open Sci | Communicating uncertainty about facts, numbers and science
PLoS Comp Bio | Securing the future of research computing in the biosciences
Nature | Total synthesis of Escherichia coli with a recoded genome
Ann Intern Med | Association Among Dietary Supplement Use, Nutrient Intake, and Mortality Among U.S. Adults: A Cohort Study

Others
Wired | The Glorious, Almost-Disconnected Boredom of My Walk in Japan
How to Grow Up: A Guide to Humans
SMBC | Thin Ice
HBR | The Hard Truth About Innovative Cultures
The Politics of Humor
Darwinian existentialism: The history — and evolution — of the meaning of life
Want to Fall Asleep Faster? Military Pilots Use This Hack to Sleep Anywhere in 2 Minutes or Less

Link roundup: Mar 2019

4 minute read

Published:

Science
Science | Mine your mind for the data to drive your career
Nautilus | A Magician Explains Why We See What’s Not There
Nature | Why the sexes don’t feel pain the same way
Quantum computing for the very curious
All the Cannabinoids in Marijuana That Aren’t THC
Nature | ‘Particle’ robot swarm moves without computer control (video)
Wired | The Read/Write Metaphor Is a Flawed Way to Talk About DNA
Nature | Protein-slaying drugs could be the next blockbuster therapies
Aeon | Why is simpler better?
Draw molecular network on Jupyter notebook with rdkit and cytoscape.js-2 #RDKit #cytoscape
How UMAP Works UMAP is dimension reduction algorithm like PCA analysis. Paper is available in arXiv.
Death of the calorie
Surgical stitch-up: meet the placebo surgeon
Quanta | How Artificial Intelligence Is Changing Science
Nature | How I was almost mistaken for a chocolatier
Nature | Enzymes trapped and zapped for use outside cells (Paper in Angewandte Chemie)
Merchants of Hype
A Stanford psychologist on the art of avoiding assholes

I would make a distinction between temporary and certified assholes, because all of us under the wrong conditions can be temporary assholes. I’m talking about somebody who is consistently this way, who consistently treats other people this way. I think it’s more complicated than simply saying an asshole is someone who doesn’t care about other people. In fact, some of them really do care — they want to make you feel hurt and upset, they take pleasure in it.

Why Do We Need Sleep? Israeli Scientists Solve the Mystery
In the Pipeline | A New FDA Commissioner, Suddenly

… See, just get the government out of the way and everything starts to flourish! But as I’ve said many times, the FDA is not the real roadblock in this business. It’s biology. More specifically, it’s our lack of understanding of biology. Lowering standards will do nothing to help that at all.

The professional advisers who can help you to move from academia to industry
Papers
ACS Chem Bio | Esterification Delivers a Functional Enzyme into a Human Cell
Q Rev Biophys | Frustration in Biomolecules 2014 paper, but I only read it recently. Besides providing a nice mental model of frustration in thinking about protein physics, the text is written in decidedly unacademic prose.
Nature | Complete biosynthesis of cannabinoids and their unnatural analogues in yeast
PLoS Comp Bio | Script of scripts: A pragmatic workflow system for daily computational research
This is like Makefile, but more user-friendly, you can switch languages easily, and is hosted in Jupyter notebook. If you constantly switch between bash, Python, R, and others; this is good to keep your workflow in one file. I think I don’t need it at the moment.
Others
Choosing our religion

Creation is thus seen as a relationship of radical dependence. To cite an insight deriving from St Thomas Aquinas, God’s creation of the world should not be likened to a carpenter making a chest. A better analogy would be more intimate – a singer producing a song, for instance. The difference is profound. Carpenter and chest are discrete entities. Carpenters can pass on the articles they make, never seeing them again. But a song is by definition an emanation of a singer.

A crucial difference between humans and other animals is equally plain. Genuinely fulfilled human lives involve further dimensions including dignity, which is connected with the exercise of choice; and virtue, implying the need to stretch or transcend ourselves. G. K. Chesterton wrote that it makes little sense to upbraid a lion for not being properly lion-like: lions are lions. The same is not true of human beings. People everywhere have a striking idea that they ought to behave in certain “humane” ways, but also an awareness that they do not in fact behave as they should. It is often noted that these two facts are the root of all clear thinking about ourselves and our world.

Did You Know Pandas Can Do So Much?
I find these Ruben Bolling’s illustrations amusing: 1 | 2
GQ | The Secrets of the World’s Greatest Art Thief
What We Owe a Rabbit
Regarding the Em Dash
A history of Singapore in 10 dishes

Link roundup: Feb 2019

6 minute read

Published:

Science
Nature | Low pay, exclusivity requirements and lack of support plague postdocs across Europe
Edge | Biological and Cultural Evolution Essay by Freeman Dyson

Our double task is now to preserve and foster both biological evolution as Nature designed it and cultural evolution as we invented it, trying to achieve the benefits of both, and exercising a wise restraint to limit the damage when they come into conflict. With biological evolution, we should continue playing the risky game that nature taught us to play. With cultural evolution, we should use our unique gifts of language and art and science to understand each other, and finally achieve a human society that is manageable if not always peaceful, with wildlife that is endlessly creative if not always permanent.

Nature | The ten commandments for learning how to code
The Atlantic | Scientists Are Totally Rethinking Animal Cognition
Nautilus | How the Biggest Fabricator in Science Got Caught
On one hand, it is good to pre-screen data with a statistical tool, but on the other, is it that hard to generate data that appears to be experimentally derived? I can imagine, instead of coming up with the numbers oneself, one could sample from a random number generator with specified distribution. How would one detect this sort of fraud?
Nautius | Why Misinformation Is About Who You Trust, Not What You Think
NY Times | Why Do South Asians Have Such High Rates of Heart Disease?

Studies show that at a normal body weight — generally considered a body mass index, or B.M.I., below 25 — people of any Asian ancestry, including those who are Chinese, Filipino and Japanese, have a greater likelihood of carrying this dangerous type of fat.

Eat Meat. Not Too Much. Mostly Monogastrics.

…a diet including chicken and pork, but no dairy or beef, has lower greenhouse gas emissions than a vegetarian diet that includes milk and cheese, and almost gets within spitting distance of a vegan diet.

The Scientist | Tiny, Motorized Pill Delivers Vaccine to Mouse Intestine
Vox | How one scientist coped when AI beat him at his life’s work AlphaFold
NatGeo | Life probably exists beyond Earth. So how do we find it?
Phys.org | Working proteins make good use of frustration
Nature | Quantum ‘spookiness’ explained (video)
Sci Am | Why Do the Northern and Southern Lights Differ?
Professor’s ‘grave misconduct’ in UMN lab leads to discipline
Nature | What 50 principal investigators taught me about my failure to land tenure
Nature | Three secrets of survival in science advice

All LSTABs face a dilemma. Politicians generally prefer direct answers to their questions. In other words, they want policy recommendations. They have been known to ask for ‘one-handed scientists’, so that they don’t have to hear ‘on the other hand’.

NY Times | Everywhere in the Animal Kingdom, Followers of the Milky Way
Chemistry World | Molecular movie reveals how twisting methyl disturbs aspirin electrons
The Atlantic | The Women Who Contributed to Science but Were Buried in Footnotes
Wired | Monkeys With Superpower Eyes Could Help Cure Color Blindness
Aeon | Becoming: From zygote to tadpole, in six stunning minutes (video)
Wired | This Jagged Little Pill Could Make Diabetes Easier to Treat
Nature | The science of tea’s mood-altering magic

Borgwardt says the Korean study shows that tea has “a relatively strong effect”, on a par with that of 2.5 hours of exercise per week. Epidemiological studies suggest that long-term habitual consumption of green tea might reduce the risk of dementia. One study of people aged over 55 in Singapore, for example, found that those who drank as little as one cup of tea per week performed better at memory and information-processing tasks than did non-tea-drinkers2.

3QD | A Truly Amazing And Beautiful Connection Between Math And Physics
In the Pipeline | Targets Versus Drugs
The Atlantic | Feed a Cold, Don’t Starve It
Nautilus | The Real Secret of Youth Is Complexity
Nature | Forget everything you know about 3D printing — the ‘replicator’ is here
Promises, promises, and precision medicine

However, nearly two decades after the first predictions of dramatic success, we find no impact of the human genome project on the population’s life expectancy or any other public health measure, notwithstanding the vast resources that have been directed at genomics. Exaggerated expectations of how large an impact on disease would be found for genes have been paralleled by unrealistic timelines for success, yet the promotion of precision medicine continues unabated

For science, or the ‘motherland’? The dilemma facing China’s brightest minds
Sci Am | Hollywood: Can You Get Climate Change Right for Once?

“Twelve years until we all die” is catchier than “under some reasonable but debatable assumptions about economic growth, policy choices, and the physical climate sensitivity, the carbon budget to stay below the arbitrary threshold of a 1.5 degree C temperature increase relative to pre-industrial conditions appears to be exceeded by 2030”.

Paper
PNAS | Mobile platform for rapid sub–picogram-per-milliliter, multiplexed, digital droplet detection of proteins
ChemRxiv | Click, Zoom, Explore: Interactive 3D (i-3D) Figures in Standard Manuscript PDFs [via Chemistry World] Quite cool. But not everyone uses Adobe Acrobat reader…
PLOS Comp Bio | DeepDrug3D: Classification of ligand-binding pockets in proteins with a convolutional neural network
Nature | Ultra-large library docking for discovering new chemotypes
Chem Comm | Enantioenrichment of racemic BINOL by way of excited state proton transfer
Others
Believers without belief
Nature | Gifts of Prometheus A sci-fi short story
How Chinese novelists are reimagining science fiction
Awesome Python Python resources list
Beware Isolated Demands For Rigor
The Proverbial Murder Mystery
Mc Sweeney’s | How to Finish Your Dissertation Before the Heat Death and Gradual Extinction of the Universe
SMBC | Robot Love
xkcd | Error Bars
Indonesia and the West: From Debussy to Lou Harrison

Link roundup: Jan 2019

4 minute read

Published:

Science
Nature | Can quantum ideas explain chemistry’s greatest icon?
Quizzes from Harvard’s The Music Lab If you have always suspected that you are tone deaf, have I got a quiz for you.
Nature | Extreme chemistry: experiments at the edge of the periodic table

This is somewhat as expected: the strength of chemical bonding tends to decrease down a periodic group, as atoms get larger. But to fully explain superheavies’ chemistry, Pershina’s calculations must also take into account relativistic effects. In very heavy atoms, which have super-strong interactions between the innermost electrons and the highly charged nuclei, the electrons are travelling so fast (potentially at more than 80% of the speed of light) that their mass increases, as special relativity predicts. This pulls them farther in towards the nucleus, which can mean that they screen the outer electrons from the nuclear charge more effectively. That alters the outer electrons’ energies and, consequently, their chemical reactivity.

Nature | Flying squirrels are secretly pink
Harvard Business Review | Time for Happiness
In the Pipeline | Exercise And Its Signaling
In the Pipeline | Quinine’s Target Quinine’s target has been identified. This is significant step in malaria research.
BBC | A bit of meat, a lot of veg - the flexitarian diet to feed 10bn
The Smithsonian | The Statistician Who Debunked Sexist Myths About Skull Size and Intelligence
PopSci | Saturn is ancient, but its rings are only as old as the dinosaurs
Nature | Watch: Robot reveals how ancient reptile ancestor moved It’s cool that they even make interactive demo
Nature | Cryptic DNA sequences may help cells survive starvation
In the Pipeline | Nivien’s Shot Drug research is hard
In the Pipeline | Come One, Come All to These Kinases.
Is Sunscreen the New Margarine?
Nature | Designer protein delivers signal of choice Layman summary of a new paper
The Conversation | The periodic table is 150 – but it could have looked very different
Science | Four lessons about transitioning from academia to the ‘real world’
Brain Pickings | Love After Life: Nobel-Winning Physicist Richard Feynman’s Extraordinary Letter to His Departed Wife
The Guardian | Why exercise alone won’t save us
The Scientist | Can Viruses in the Genome Cause Disease?
The Atlantic | Why Exaggeration Jokes Work
Wired | How a Reclusive Lizard Became a Prize Find for Wildlife Smugglers
3 Quarks Daily | The vast and mysterious real numbers
Paper
PLOS Comp Bio | Inherent versus induced protein flexibility: Comparisons within and between apo and holo structures
Science | An enantioconvergent halogenophilic nucleophilic substitution (SN2X) reaction
Science | Porphyromonas gingivalis in Alzheimer’s disease brains: Evidence for disease causation and treatment with small-molecule inhibitors
PLOS Comp Biol | Ten simple rules on how to create open access and reproducible molecular simulations of biological systems
ACS Catalysis | Structure-Guided Triple-Code Saturation Mutagenesis: Efficient Tuning of the Stereoselectivity of an Epoxide Hydrolase
Cell Chem Bio | What Makes a Kinase Promiscuous for Inhibitors?
Nature | Enzymatic assembly of carbon–carbon bonds via iron-catalysed sp3 C–H functionalization
It’s nice to see that even though Frances Arnold just received the Nobel Prize, she is still actively publishing papers. Or maybe I notice just because I am on the lookout for publications on protein design ¯\_(ツ)_/¯
PNAS | Dietary sugar silences a colonization factor in a mammalian gut symbiont [via Scientific American]
Others
What Was It About Animorphs? I never finished reading Animorphs when I was a teenager because the library didn’t have the complete collection. Reread everything last year and glad that I did.
Language Log | Slavs and slaves
NYT | Virginia Woolf? Snob! Richard Wright? Sexist! Dostoyevsky? Anti-Semite!

I think we’d all be better readers if we realized that it isn’t the writer who’s the time traveler. It’s the reader. When we pick up an old novel, we’re not bringing the novelist into our world and deciding whether he or she is enlightened enough to belong here; we’re journeying into the novelist’s world and taking a look around.

As Tintin turns 90, the comic book hero is still teaching children about the world
I have a similar anecdote with the author about the informativity of comic books. Though it was with Doraemon, of all things.
Language Log | Sinographs for “tea” Fascinating. Adding The True History of Tea to my to-read.
Buzzfeed News | How Millennials Became The Burnout Generation
The Next Level of Data Visualization in Python

Link roundup: Dec 2018

1 minute read

Published:

Science
TED talk | Hans and Ola Rosling: How not to be ignorant about the world Classic Hans Rosling TED talk [via 3 Quarks Daily]
Nautilus | Iron Is the New Cholesterol Donate blood, people!
In the Pipeline | We Have Given People Amyloid Disease
Kurt Gödel and the romance of logic
Nature | Enzymes engineered to trap reaction intermediates with link to the paper therein
The Scientist | Scientists Don’t Stay for Long in Their Jobs Anymore: Study
What’s the Most Dangerous Food of All Time?
Synthetic biology: A call for a new culture of responsibility
Science | Chess, a Drosophila of reasoning
The Scientist | Book Excerpt from Gene Machine “…author Venki Ramakrishnan relays the moment when he and collaborators finally solved the structure of a ribosomal subunit.”
The Atlantic | The CRISPR Baby Scandal Gets Worse by the Day
Popular Science | Cannabis gets its high-inducing power from ancient viruses
Paper
BMJ | Key opinion leaders’ guide to spinning a disappointing clinical trial result [via In the Pipeline]
Science | Molecular to organismal chirality is induced by the conserved myosin 1D [via In the Pipeline]
Proc. R. Soc. London, Ser. A | The origins of quantum biology A nice historical review
J Med Chem | qFit-ligand Reveals Widespread Conformational Heterogeneity of Drug-Like Molecules in X-Ray Electron Density Maps
Nature | Mannose impairs tumour growth and enhances chemotherapy [via In the Pipeline]
J Med Chem | Two Decades under the Influence of the Rule of Five and the Changing Properties of Approved Oral Drugs
Others
Aeon | Who decides what words mean [via Language Log]
Graphical vi-vim Cheat Sheet and Tutorial
The Atlantic | The World’s Most Efficient Languages

machine learning

music

Thaxted

9 minute read

Published:

I first heard the hymnal tune Thaxted in Corrinne May’s The answer. Her lyrics is a simple psalmic consolation, and paired with the simple tune, it proves to be indelible. The Methodist church I was worshipping at had it sung in the service a number of times.

others

Book notes: On not speaking Chinese

31 minute read

Published:

This book is quite different from my usual reading, which is mostly fiction, science-fiction, and popular science. This book is categorically a humanities book. In fact, some chapters were previously published in humanities journal. Nevertheless, I persevered through, since the subject is close to my heart (and my identity). Also, Ien Ang’s writing is not boring academic prose. It is certainly not easy reading, but it is very readable and her personal stake in the subject also helps. The book is an academic, yet also personal, essay.

personal essay

2021 book list

1 minute read

Published:

Compared to 2020, I slowly regained my reading habit again. One notable book is Camus’ The Plague that I didn’t finish in 2020, but picked it up again. Nothing really stood out for me, but I would recommend the starred ones.

2020 book list

1 minute read

Published:

Hopefully in 2020 I will read even more!

2019 book list

14 minute read

Published:

philosophy

‘This is not a post’ post

1 minute read

Published:

Magritte’s “This is not a pipe” painting is one of Douglas Hofstadter’s obsessions in Gödel, Escher, Bach: An Eternal Golden Braid. It may be a Treachery of images like the title suggests, but it is also about the treachery of language, the self-referential nature that Hofstadter calls ‘a strange loop’. For example, the famous “This sentence is not true”, a variant of liar’s paradox. If the statement is true, then it’s “not true”. If the statement is false, then it’s negated so that the falsity is “not true”. It is something that continues to endlessly boggle the mind. One might think it is a philosopher’s fancy – that, it may be – but consider that Gödel’s incompleteness theorems need that self-reference as a foundation. I concede that it is not something that may affect our daily lives, but, you know, it can make one ponder about computability, the nature of consciousness, and stuff.

Now, I have observed this self-reference in some objects, though I don’t suppose the manufacturers have the nature of consciousness in mind. Behold, the “this is not a safety barrier” safety barricade and the “this is not a lifesaving device” kickboard. You can see that these two things do not have identity crises: it’s actually the very opposite; ‘they’ are certainly sure about their functions. The safety barricade: I can function as a safety barrier, but not 100% of the time. Similarly, the kickboard: I can function as a lifesaving device, but not 100% of the time. You can almost hear the echoes of the underlying subtext (so don’t sue me), can’t you?

You can ponder this more while looking at my terrible drawing:

NB: I found it highly amusing that the safety barricade is embossed/printed/stenciled/stickered with “This is not a safety barrier”, but spray-painted with “SB”. That is one way to solve the linguistic and legalistic quandary I suppose: “It’s not a safety barrier; it is just, you know, SB”.

2021 book list

1 minute read

Published:

Compared to 2020, I slowly regained my reading habit again. One notable book is Camus’ The Plague that I didn’t finish in 2020, but picked it up again. Nothing really stood out for me, but I would recommend the starred ones.

2020 book list

1 minute read

Published:

Hopefully in 2020 I will read even more!

2019 book list

14 minute read

Published:

Swedish loanwords and pronunciation woes

2 minute read

Published:

I’m reading Oliver Sacks’ Uncle Tungsten and was delighted to find out that tungsten is a Swedish loanword (lit. heavy stone). That got me revisited my list of Swedish loanwords we have in English, as well as some names that have become scientific terms.

Revisiting Gödel

2 minute read

Published:

For years after I first encountered Gödel’s incompleteness theorems, they had utterly baffled me (just look at the Wikipedia page and tell me if it is comprehensible). So I dismissed it as one of those inexplicable-to-non-mathematicians things.

Rainbow connection

5 minute read

Published:

My most impressionable memory of seeing a rainbow happened in a tourist bus in Iceland. It was faint, like a watercolour painting on the canvas that was the pale blue sky and the treeless Icelandic landscape. I noticed it first, and a few minutes later the whole bus was teetering at one side of the bus, peering spellbound out of the window (except for the bus driver, I hope).

python

Semi-automating Mailchimp daily newsletter

1 minute read

Published:

I am in charge of uploading a Mailchimp daily email newsletter. Here is some code to pre-fill everything except the content utilising Mailchimp API. Technically you can automate the content upload, too, but it requires more html-fu than I have.

Automated form-filling with Python

2 minute read

Published:

Situation: You need to submit a lot of stuff to a website, but it only provides individual submission, not batch.

Molecular similarity network with visualised structures

less than 1 minute read

Published:

Analogous to a Sequence Similarity Network (SSN), molecular similarity network visualises Tanimoto similarity between molecules. iwatobi shows how to construct one with molecular structures here and here using Python packages RDKit, networkx, and cyjupyter.

Doing t-test in batch

1 minute read

Published:

Situation: I want to do t-test between two sets of experiment A and B. Each A and B were run in triplicates, so we have:

data_A_1.dat
data_A_2.dat
data_A_3.dat
data_B_1.dat
data_B_2.dat
data_B_3.dat

How to run t-test between every combination of A and B, as well as all A combined vs all B combined?

Simple web scraping with Python

4 minute read

Published:

The situation: I wanted to extract chemical identifiers of a set of ~350 chemicals offered by a vendor to compare it to another list. Unfortunately, there is no catalog that neatly tabulates this information, but there is a product catalog pdf that has the list of product numbers. The detailed information of each product (including the chemical identifier) can be found in the vendor’s website like this: vendor.com/product/[product_no]. Let me show you how to solve this problem with bash and Python.

Picking up Python as a scientist

4 minute read

Published:

My PhD supervisor prophetically decreed back in 2013 that “it might do thee some good to learn Python” (not his exact words).

science

2021 book list

1 minute read

Published:

Compared to 2020, I slowly regained my reading habit again. One notable book is Camus’ The Plague that I didn’t finish in 2020, but picked it up again. Nothing really stood out for me, but I would recommend the starred ones.

Documentation episode

1 minute read

Published:

Software developers know this already but when working on the latest publication recently, I was reminded that we should document obsessively.

2020 book list

1 minute read

Published:

Hopefully in 2020 I will read even more!

On efficacy

1 minute read

Published:

The term efficacy is not new for the drug industry people, but of course it has now entered the public consciousness thanks to the vaccine efforts. As Carl Zimmer pointed out, our intuitive understanding of “95% effectiveness” is that 95 out of 100 people who get the vaccine will be immune.

As you might already know, it’s not exactly that. That number means that out of certain number of symptomatic, PCR-positive participants, the placebo arm has 95% more than the vaccinated arm, where vaccine:placebo population is 1:1. Taking the numbers from the NY Times article, Pfizer waited until they had 170 cases (for statistical power): 162 in placebo, 8 in vaccine. If vaccine:placebo populations are exactly 1:1, the denominators all cancel out and efficacy = (162-8)/162 = 95%. Even if it is not exactly 1:1, usually it is close to that, so this is a good shortcut for quick calculation. For exact figure, just replace the absolute numbers as fraction in that arm instead – see how the denominators cancel out when a=b :

\Large \text{Efficacy}=\frac{\frac{162}{a}-\frac{8}{b}}{\frac{162}{a}}}

So, efficacy is a proxy for the eventual effectiveness. The former is in controlled clinical trial setting, while the latter is in messy real word setting. Some points on why there will be discrepancy between the 2:

  • Clinical trial population is biased – only certain kind of people would volunteer for the trial. You can expect that they usually are healthy and do not have underlying conditions. Behaviour-wise, they would tend to be more cautious as well.
  • Blinding is imperfect. Some people get mild reactions from the vaccine, which sort of tell you that you are in the vaccine arm.
  • Asymptomatic cases are not accounted for. The participants are not tested regularly. Instead, they are only tested when they self-report symptoms. This is the case for Moderna trials. AZ-Oxford does weekly swabs so they have data about asymptomatic cases as well.

Markov state models

less than 1 minute read

Published:

I’m trying to learn Markov state models for my MD analysis. I will put thoughts and notes here.

Notes from #whisperfest 2020

1 minute read

Published:

I’ve been following Inger Mewburn’s blog The Thesis Whisperer since my PhD days. She and “The Whisper Collective” is organising a conference this year and I’ve signed up for a couple of sessions. I will post some stuff that I learn in this post.

On The Reg live: podcasting with Inger Mewburn and Jason Downs
Should I have a website? (Tseen Khoo)
Soundtrap
Why podcast your research? (Lauren Gawne)
How to start your own podcast
Omnifocus
Narelle Lemon’s podcast, Teachers Supporting Teachers

Voices from the outside: Careers beyond academia
Times are bleak but don’t despair – just do stuff and meet people
mexec careers
Some tips:

  • Subscribe to newsletters
  • CV/Resume:
    • 6 secs for recruiters to scan, and other things that we probably already know, but good to know why they do that
    • Soft keywords – can be overused e.g. team player
    • 3-4 pages
    • Don’t use underlines, brackets
    • footer with date
    • save cover and CV together with filename NameLastDec2020.pdf (or .doc depending on req)

Why academia shouldn’t be a competition
No idea how to summarise this. I feel encouraged, I guess? This touches on some soft aspects of being an academic that I’m not used to evaluate for myself. I think one takeaway is the perennial metric-ising everything problem. On one hand, translating human beings into numbers is a sort of reductionism, but on the other, how else one is supposed to do evaluations and comparisons? Stuff that comes to mind and some that was brought up: IQ, uni ranking, being a good mentor, not being toxic, being a good colleague.

Computational chemists in relation to experimental ones

less than 1 minute read

Published:

Here is a paper buried in my reading backlog, and I am pleasantly surprised that it has useful insights particularly for me.

Even though what the authors talk about is computational chemists and medicinal chemists in pharma research setting, I still learn some stuff applicable to my own role as computational chemists collaborating with experimental biologists mosts of the time. With the advent of AI, the authors then argue that the old dynamic must change.

There is a need for computational chemists to well delineate the limits of their techniques and set expectations reasonably and equally for medicinal chemists to both appreciate the bounds of what is on offer and also recognize that an equivalent evaluation of their own “hunches and predictions” might not perform any better.

What is life, again

1 minute read

Published:

I am excited to learn that Sir Paul Nurse has an upcoming book attempting to discuss this perennial question. The title is of course an homage to Schrödinger’s earlier treatise with the same title. I read that quite a while ago, and what was quite amazing was that it was written before the structure of DNA was known. I recall that I had attended a doctoral course with the same title as well. And the content was as broad as it suggests: the course coordinator invited outside speakers for talks, and often the talks were beyond mere biology, so it was a very interesting, thought-expanding, course.

The subtitle “Understanding biology in five steps” gives the central thesis: cells, genes, evolution, life as chemistry, life as information system. Information system is of course a very curious metaphor. Schrödinger was in the era of early computing – how does our understanding of life now look like when examined in parallel to modern computing?

Nurse has a 1-hour talk, which I watched with interest, so I am looking forward to read the book.

Defining energy

less than 1 minute read

Published:

“How do you define energy?” is a question that would stump me. High school physics does not give satisfactory answer; it just gives the formula straight away. We know that it has to be of certain unit; and it fits the physics equations like such and such. Today I learned the more rigorous definition from Sabine Hossenfelder’s explainer video, but nagging me still, what is it, epistemologically?

I remember the first time I came to a similar reckoning was in chemistry lessons about electron orbitals. I was like “Huh these things are so weird how come they are like that?” and our chemistry teacher Mr A, who has philosophical penchant, just shrugged with an enigmatic smile, “That’s just what we observe them to be. These mathematical functions fit the observation.” Insert brain expansion meme here.

I have since seen many baffling things alike, especially in biology. We scientists keep pounding away at the what, what, what questions. Do we ask how and why enough? Should we? Should we not, because they are too difficult?

2019 book list

14 minute read

Published:

Book notes: The Two Cultures

6 minute read

Published:

The Two Cultures | CP Snow

The stuff Snow was talking about in this lecture feels antiquated now. Probably it was the peculiar time and place that polarised the “two cultures”. Or perhaps it was Snow’s caricaturisation. (Snow himself looked retrospectively at his 1959 lecture in Part II.)

Nevertheless we can always learn something – some of the points are interesting and and applicable. The divide of the current age though is between scientists and non-scientists – hopefully it is something we will overcome. The introduction by Stefan Collini also proves to be a commentary that is also worth reading.

science education

Book notes: The Two Cultures

6 minute read

Published:

The Two Cultures | CP Snow

The stuff Snow was talking about in this lecture feels antiquated now. Probably it was the peculiar time and place that polarised the “two cultures”. Or perhaps it was Snow’s caricaturisation. (Snow himself looked retrospectively at his 1959 lecture in Part II.)

Nevertheless we can always learn something – some of the points are interesting and and applicable. The divide of the current age though is between scientists and non-scientists – hopefully it is something we will overcome. The introduction by Stefan Collini also proves to be a commentary that is also worth reading.

Muscle memory

1 minute read

Published:

I have been teaching swimming to a friend who is relatively a beginner. I often found myself having no words to describe a certain motion or posture and go “you just have to experience it with your body”. While I do attribute this partly to my lack of training as a swimming instructor, I still think there are things that cannot be conveyed in words, especially when it comes to motoric stuff, don’t you think?

Martial art: Definitely a motoric stuff
Image credit: SMBC Comics

Anyway, thinking about this my mind wandered to the talk about failures in science. It’s like this – before I did my PhD I have of course heard things about the inevitable stress and failures (and I find myself saying the same thing to pre- and current PhD students too) but knowing it cognitively is different from experiencing it oneself, isn’t it?

Here is a recent Nature article on the subject: <Scientific progress is built on failure>. Reading this, on one hand I hope that a PhD student or a prospective one takes note and does the necessary mental preparation; but on the other hand, I cannot help but go “My son, I know these things would fall on deaf ears. You just have to experience it for yourself”.