Tuesday, February 24, 2015

Academic job searches in two dimensions

More than a few faculty members have reacted sympathetically when I've mentioned the problem of dual academic careers to them. It's hard enough for one person with extensive education to find a job: they may be exceedingly qualified for a set of jobs but only a few of those positions may be open at a time, whether we include non-academic career options or not. Adding another experienced scholar into that mix complicates the situation further. There's a reason this is called the two-body problem and not the two-body paradise of unending joy and tranquility.

How can we make it easier for couples to find jobs when they have very specific requirements?
Location is a major limiting factor. The availability of job information is likely an even larger factor: that majority of available jobs aren't posted publicly. Even among educational institutions, many of which must announce job openings, faculty participate in distinct but invisible hiring networks governed by status and prestige.

We'll have to work with what we have.
    Pairs in places. Some job search sites offer a geographic view.
As far as job searches go, I've found the following sites:

  • The HERC Dual Career search tool. I think I've mentioned this one on the blog before. It only covers the US but includes a variety of institutions and job types.
  • HigherEdJobs dual career search.  Like the HERC site, this one primarily searches the US, but includes Canada and potentially even beyond, though I haven't found any postings there yet. The listings appear to include a number of older posts - I saw some dating from 2012 - which could be a useful feature if you're trying to find out who could be hiring rather than just who is hiring right now.
  • Inside Higher Ed Careers dual career search. This search tool claims to search anywhere in the world but that may be an exaggeration.
  • EURAXESS. Not exclusively a career search site (it does have a search tool for research jobs in Europe, though the selection may be limited depending upon the field) but also a guide for academics who might like to work in Europe.
  • Many universities have dual-career assistance programs, sometimes through HERC. The programs may be referred to using other terms, i.e. Partner Opportunities. Most of them offer job search assistance to the partners of prospective hires, though one of you needs to get that far first! 
A variety of projects dedicated to this task exist (i.e., TANDEM) but they don't appear to have been organized with job seekers in mind. 

One of my recent side projects involves extending the dual-career search concept to jobs worldwide. I'm trying to make it into a meta-search by using publicly available job posts, though the major issue with this approach is variability in post format. Many of them don't even explicitly list geographic locations and a subset even list false-positive locations (a job may be headquartered in London but work may occur somewhere else). There will be some guesswork to do.

Saturday, February 21, 2015

Communication across the tree of life

A squid, the traditional model of quorum sensing. It glows because the Vibrio inside it glow. They have to stay coordinated to glow. Quorum sensing lets that happen. More details and photo source here.
I was looking for a recent review of quorum sensing this morning - specifically in the context of bacterial communication across domains of life - and found this minireview in Frontiers in Plant Science. It isn't about plants. Rather, it uses Pseudomonas aeruginosa interactions with human cells as an example of inter-kingdom interactions* and the resulting behavior changes. It's not the most comprehensive review of inter-kingdom quorum sensing out there (this 2008 review by Hughes and Sperandio comes to mind, plus I'm sure there's more recent reviews I haven't found yet**) but it covers some important developments from the past few years.

As usual, here's my question: where do phages fit into the picture? If we conclude, as Holm and Vikström do, that this particular bacteria-host relationship would be quite different without quorum sensing molecules, the next logical step is to examine factors in the environment with other impacts on quorum sensing (and AHL production, specifically). Those factors certainly include other bacterial cells but they also include phages. There is clearly a precedent for studying phage-host interactions as they occur in quorum sensing: E. coli has been found to reduce the number of potential lambda phage receptors on its surface in response to AHL levels and quorum sensing genes have even been found in a phage infecting C. difficile. It's time to include the viral component of the microbiome in our quorum sensing models.

*It's surveillance rather than a two-way conversation, unless you consider phagocytosis to be a good metaphor for small talk.
**I should probably mention this 2009 Ng and Bassler review, too, because of Bonnie Bassler.

Thursday, February 19, 2015

I was getting ready to write something* to replace Biopython's SwissProt module today as it can't parse Uniprot entries yet. Just as I was starting to do so, I found BioServices, which appears to plug some of the holes in Biopython with regards to services like Uniprot and KEGG. These services all have REST APIs so they aren't difficult to retrieve individual entries from. Writing a new parser for each service, though, is tedious and I'm glad there's an off-the-shelf solution.

One caveat: the Uniprot search function is billed as "a bit unstable". I haven't been able to get it to complete any searches successfully. BioServices may be more useful if a list of accession IDs is already available, though that defeats the purpose for me.

Additional caveat: the REST API does most of the work already in accessing Uniprot, so if you're willing to get your hands dirty then you can access the database contents easily with BeautifulSoup and the right urls. A simple proteome query may look like this:
"http://www.uniprot.org/proteomes/?query=" + your_query_here + "&fil=reference%3Ayes&sort=score"

*And in the end, I wrote it myself anyway.

Sunday, February 15, 2015

Overcome thoroughly the manner of working like extinguishing fire

Not a catchy slogan but free recipes are always nice.
I read this BBC magazine piece about North Korean propaganda slogans this evening. It triggered two questions:
1. Where's the inflection point between "North Korea as convenient source of surreal entertainment" and "North Korea as source of genuine misery and an extant totalitarian state"?

2. Wouldn't propaganda slogans serve as excellent candidates for Markov tomfoolery?

I only have an answer for the second question. The answer is, of course, Yes.

I started off using the BBC's translated list of NK slogans and generated new ones in a very basic fashion. A few examples follow:

Let the whole nation join efforts to open up a broad avenue to independent reunification in this year that marks the 70th anniversaries of national resurrection and legendary hero of the proclivity to imports and ensure domestic production of coal and cement to the death!

Let us fiercely raise the sports wind across the Party Central Committee headed by the Moranbong Band to bring about a great golden age of construction by thoroughly applying the spirit of the office of the dignified powerful Paektusan nation.

Let us glorify the Kumsusan Palace of the Songun revolution and the 25th anniversary of the Workers' Party of Korea as the buglers of the country prospers; the less books we read, the later the country in all aspects as the major fronts of building a thriving socialist country.

OK, so these are virtually indistinguishable from the original slogans. It isn't a large text sample, but perhaps more importantly, there's noticeable consistency (about a third of the ~300 slogans begin with "Let us").  It isn't surprising: propaganda is intended to be simple, inspirational, and accessible. It doesn't usually vary from the basic idea of inspiration plus action equals solidarity.

With that it mind, I should add additional slogans to the training set. They should ideally include material from a variety of movements and political entities. This means that the final product will make less contextual sense, but hey, the goal here is to generate content in the absence of context.

Friday, February 13, 2015

Here's one more option for generating plots in R: plotrix.
It can create some novel things like nested bar graphs and can search for empty space in plots.
There are a number of examples here. The 3D plots are probably best avoided but many of these examples include features not present in ggplot2.
Continuing the music adventure from yesterday, today's genre is Crossover Jazz.
Spotify doesn't use this genre annotation for any specific artist but Wikipedia tells me the term could apply to everyone from Al Jarreau to Spyro Gyra. In some ways, it's an early or more moderate form of Smooth Jazz (as in Kenny G, though he's a crossover jazz musician as well).

I'm going to start off with Gerald Albright and Chuck Loeb, then go from there.

How is it making me feel?
Most of the time I feel like I'm on the Weather Channel during a calm day. Even when it's improvisational, this music tends to feel restrained and commercial, like it's trying to avoid being obtrusive. This effect leaves me feeling restless.

What was memorable?
Gerald Albright - Slam Dunk was one of the few tracks I've heard so far today which sounded like the Wikipedia genre description.

Thursday, February 12, 2015

It's easy to build habits when it comes to media consumption. How can we expand our horizons when we become increasingly content with the same thing? This quandary is one reason why I've enjoyed the emergence of streaming music services. Musical horizon-broadening is frictionless.

So, how do we start? Randomly, of course. I wrote a small script to provide lists of artists from randomly-chosen music genres available on Spotify. The spotipy library was very helpful. Today, I'll delve into the history of a single genre, depending upon what the script tells me to listen to.

That genre is: Merengue!

Peaks. Yes, I know what the difference is. From Tamorlan on Wikimedia Commons.
Spotify tells me I should start with Juan Luis Guerra, so he's first. Then it's Frank Reyes and Antony Santos. After them, it'll be some Toño Rosario and, in an effort to find some historical context, Wilfredo Vargas.

Observations:
How did I feel?
Fairly happy - even the more downtempo songs have a steady pace (which makes sense as this is dance music, after all). It's easy to work with it in the background as I know just enough Spanish to understand the lyrics but not enough to follow the lyrical context. It usually seems to be something about dancing or grandmothers.

What was memorable?
El Baile del Perrito.
Antony Santos - Me Quiero Morir (With that title, I guess it's actually merengue bachata)

Wednesday, February 11, 2015

This project is exactly the kind of thing most of my projects seem to turn into*, though much more competently implemented.

It's an automation bot for Tinder. It builds an average face out of a set of liked/disliked faces, then makes choices about newly provided Tinder profiles based on eigenfaces made using the average face. After that point, it's a chatbot: it carries on conversations with the users behind matching profiles, continuing the conversation if it gets positive responses.

But does it work? That is, does it accomplish the same goal as having a human operator? According to its creator:
What do girls think of the bot? I've gone on at least 10 dates with the help of the bot and I've shown my partners the bot in its entirety. One date literally didn't believe me and thought I was pulling her leg. Another person thought it was really cool and wanted the full tour. All were in agreement that it is not creepy, though some felt it was borderline. Kind of nice considering it's not something you'd come across everyday.
The obvious question here is how well it works for other people.

* I'm not trying to automate dating, but I am trying to automate tedious processes among systems with emergent properties.

Monday, February 09, 2015

A multitude of R plot examples

You don't have to do it all by hand anymore. Note: I don't work with this kind of data.

Here's what happens more often than it should when I sit down to make some figures:

  1. I start with R and remember seeing an example similar to what I'm trying to make
  2. Searching for the example leads me back to the helpful but limited ggplot2 docs or a Stackoverflow question
  3. I piece together what I need from what I've found, knowing all the while that a better example was out there somewhere

This kind of thing drives me crazy, so here's a short list of places where decent R graph examples can be found. Hopefully these sites help others find what they need. One caveat: just because R can spit out a particular figure doesn't mean that figure is appropriate or represents the data well. Your mileage may vary, etc.


  • R Graph Catalog. Intended to complement a guidebook, this set of examples covers a wide variety of presentations and audiences. It filters graph types based on whether they're recommended or not (but hey, you can still use the examples). All code is included right on the site and on Github.
  • Quick-R Graphs. This site covers the basics and includes some useful figures like a plotting symbol chart.  
  • Cookbook for R Graphs. Another book accompaniment.
  • Plotly R Library. Here's where things start to get exotic. Plotly isn't R specific but supposedly plays nice with ggplot2. It could be worth using for interactive charts.
  • Gvis cookbook. A ggplot2 alternative. It also allows for interactive graphs.
  • Wikibooks R Programming Graphics. A few more examples, including some in 3D (those should probably be avoided, honestly).
  • R-bloggers. Not a list of examples as much as a source for examples, especially those of the bleeding-edge kind.
If you're getting tired of finding example graphs, there's also GrapheR, a GUI for producing R graphics.

Edit: wanted to add a postscript about some hacky ways to make ggplot2 display patterns.

Edit 2: I found one more resource in the ZevRoss ggplot2 cheatsheet. It's primary a guide to themes in plots, one of the more fiddly aspects of plotting in R.


Friday, February 06, 2015

The Wikipedia-based poetry project is working differently now. I've taught it to combine Markov chain results with raw bits of related WP pages. As a result, I'm getting farther away from a purely generative model and closer to one reflecting human writing. It still has some distance to cover. Here's a recent example:
he was
arrested at his home
in bloomington, minnesota. the
eastern half
he once entertained the possibility that any
could pass 32nd state on may 11, 1858, created from the
braddock takes
maggie with him after that moved to the term article is also used loosely by some
to include the determiner some. use of the prize
is not used at
present. the hurricanes' aim to
she also included the policy
of isolationism; the
historian manfred the worst wreck in the prussian minister of
war also used loosely
by
some to include the determiner
It's always going to sound like an encycopedia, but eventually it will sound like a self-aware encyclopedia wracked with dread.

Thursday, February 05, 2015

Music: Bersarin Quartett

There was a site where graphics like this could be produced easily but I don't recall its name. It was something difficult to search for, like "Flame" or "Ember".

Today's music is the lovely Bersarin Quartett. Try this track: