Category Archives: computer stuff

Ethernet weirdness

Not what I usually think of as wireless internet

Yes, the connected light is green and showing “connected” for my display ethernet even though the display is unplugged. And even when it’s plugged in my computer only connects to the net via the backup wifi while in my office. The jack on the wall and the cable are OK, because they work with an older laptop with a direct connect ethernet jack.

Going to have to try this.

Update: that seems to have worked! Adding details so Google might find it for those with similar problems… it seems that something in the network configuration was corrupted. The info at the link suggested

  • Remove Display Ethernet from the System Preferences from the gui
  • Unplug the display
  • delete /Library/Preferences/NetworkInterfaces.plist (using sudo… I used mv instead of rm to move it to my home directory, just in case
  • reboot
  • plug the display back in.
  • Add back the configs to the gui version of Network Preferences

I found that in doing this I had to reenter the info for my manual IP configuration and DNS servers. But now I can connect again via the ethernet from my office.

iOS 8 iBooks annoyances

I generally like the UI of iBooks better than the Kindle app, and I like being able to buy books inside the app. But there are some things about iBooks in iOS that really annoy me… some of these are new or worse in the version in iOS 8, where iBooks comes preinstalled.

  • Updates: a red circle pops up when a book has an update. I’m not sure why iBooks titles have updates in the first place, or why I should update a book I’ve already read and don’t plan to revisit, but the red dot demands attention. So you I go to my purchased list and find:
    • The update all option is gone
    • The number of books with update buttons does not match the number in the dot
    • Several of the books with update buttons don’t update: they bring up a dialog that says “The item you tried to buy is no longer available”. The update count appears to be the number of actually updatable items + 1 if you have any number that can’t be updated because they are no longer available.  Things no longer available include a lot of Project Gutenberg titles.
    • The annoying red circle used to be in a less prominent place in the UI, IIRC.
  • The all books view: At first this seemed great. iBooks collects books in a series into a stack, kind of like a folder, to make navigation easier. It even figures out if there are unpurchased items in a series you might want to buy. But there are problems:
    • the metadata being used to do these arrangements seems to have the quality control that gave us version 1 of Apple Maps.
    • a blue “new” triangle that appears on the upper right corner. This is for flagging a new purchase, which would be fine. But I have several stacks where none of the individual books are new, and I know I’ve read them, and there doesn’t seem to be any way of clearing the stupid New Triangle manually.
  • The iBooks store: Probably related to the poor metadata…
    • OK, I would be a better person if I knew more languages. But even PubMed can limit my search results to English
    • If the app knows that books are part of a series, why is it so hard to find the books in the series in the iBooks store?

Fortunately, once I’m inside a book these mostly don’t matter. But they’re the kinds of annoyances that make me slower to update whenever new versions of iOS and OSX come out.

JSmol2wp plugin released at

A while ago I wrote a WordPress shortcode plugin to embed Bob Hanson’s JSmol molecular structure viewer into WordPress posts and pages. Last weekend I finally got it into the plugin repository.

The basic usage for proteins is via a shortcode like this:

[jsmol pdb='1LMB']

The plugin fetches the appropriate record from the PDB and generates an applet like this:


If you use acc key and prefix a chemical name with a $, JSmol looks looks for the structure at NCI.

[jsmol acc=$tryptophan]


You can rotate and zoom the structure with your mouse. These default buttons in the applet are created automatically by the plugin, or you can add custom buttons that run Jmol scripts. Using the outstanding flexibility built into Bob’s code (I just wrapped it for WordPress), you can fetch small molecules from remote repositories, or load files uploaded to your WordPress installation. The plugin whitelists pdb, cif, cml, jvxl, mol, mol2, xyz, and ccp4 filetypes for upload (this might be problematic for some hosting providers).Click the About/Help link to see more examples and documentation.

WP PubMed Reflist

I committed a couple of updates to my WordPress plugin for getting reference lists from PubMed. The new version allows customization of the display. I preloaded some templates that approximate a few popular formats

NIH format

  1. Chibucos, MC, Siegele, DA, Hu, JC, Giglio, M. The Evidence and Conclusion Ontology (ECO): Supporting GO Annotations. Methods Mol. Biol. 2017;1446 :245-259. doi: 10.1007/978-1-4939-3743-1_18. PubMed PMID:27812948 .
  2. Gaudet, P, Škunca, N, Hu, JC, Dessimoz, C. Primer on the Gene Ontology. Methods Mol. Biol. 2017;1446 :25-37. doi: 10.1007/978-1-4939-3743-1_3. PubMed PMID:27812933 .
  3. Nehring, RB, Gu, F, Lin, HY, Gibson, JL, Blythe, MJ, Wilson, R et al.. An ultra-dense library resource for rapid deconvolution of mutations that cause phenotypes in Escherichia coli. Nucleic Acids Res. 2016;44 (5):e41. doi: 10.1093/nar/gkv1131. PubMed PMID:26578563 PubMed Central PMC4797258.
  4. Chibucos, MC, Zweifel, AE, Herrera, JC, Meza, W, Eslamfam, S, Uetz, P et al.. An ontology for microbial phenotypes. BMC Microbiol. 2014;14 :294. doi: 10.1186/s12866-014-0294-3. PubMed PMID:25433798 PubMed Central PMC4287307.
  5. Hu, JC, Sherlock, G, Siegele, DA, Aleksander, SA, Ball, CA, Demeter, J et al.. PortEco: a resource for exploring bacterial biology through high-throughput data and analysis tools. Nucleic Acids Res. 2014;42 (Database issue):D677-84. doi: 10.1093/nar/gkt1203. PubMed PMID:24285306 PubMed Central PMC3965092.
Search PubMed

ASM format

  1. Chibucos, MC, Siegele, DA, Hu, JC, Giglio, M. 2017. The Evidence and Conclusion Ontology (ECO): Supporting GO Annotations. Methods Mol. Biol. 1446:245-259.
  2. Gaudet, P, Škunca, N, Hu, JC, Dessimoz, C. 2017. Primer on the Gene Ontology. Methods Mol. Biol. 1446:25-37.
  3. Nehring, RB, Gu, F, Lin, HY, Gibson, JL, Blythe, MJ, Wilson, R, Bravo Núñez, MA, Hastings, PJ, Louis, EJ, Frisch, RL, Hu, JC, Rosenberg, SM. 2016. An ultra-dense library resource for rapid deconvolution of mutations that cause phenotypes in Escherichia coli. Nucleic Acids Res. 44:e41.
  4. Chibucos, MC, Zweifel, AE, Herrera, JC, Meza, W, Eslamfam, S, Uetz, P, Siegele, DA, Hu, JC, Giglio, MG. 2014. An ontology for microbial phenotypes. BMC Microbiol. 14:294.
  5. Hu, JC, Sherlock, G, Siegele, DA, Aleksander, SA, Ball, CA, Demeter, J, Gouni, S, Holland, TA, Karp, PD, Lewis, JE, Liles, NM, McIntosh, BK, Mi, H, Muruganujan, A, Wymore, F, Thomas, PD, Altman, T. 2014. PortEco: a resource for exploring bacterial biology through high-throughput data and analysis tools. Nucleic Acids Res. 42:D677-84.
Search PubMed

PNAS format

  1. Chibucos, MC, Siegele, DA, Hu, JC, Giglio, M(2017)The Evidence and Conclusion Ontology (ECO): Supporting GO Annotations. Methods Mol. Biol. 1446 :245-259.
  2. Gaudet, P, Škunca, N, Hu, JC, Dessimoz, C(2017)Primer on the Gene Ontology. Methods Mol. Biol. 1446 :25-37.
  3. Nehring, RB et al.(2016)An ultra-dense library resource for rapid deconvolution of mutations that cause phenotypes in Escherichia coli. Nucleic Acids Res. 44 (5):e41.
  4. Chibucos, MC et al.(2014)An ontology for microbial phenotypes. BMC Microbiol. 14 :294.
  5. Hu, JC et al.(2014)PortEco: a resource for exploring bacterial biology through high-throughput data and analysis tools. Nucleic Acids Res. 42 (Database issue):D677-84.
Search PubMed


The formatting options in 0.7+ allow handling of long author lists to give et al. were there are too many authors.

Because I do WordPress development only sporadically, I made some errors in the 0.7 release. I do my testing on my Mac, where unfortunately I set my laptop up to have case-insensitive filenames, and had a uppercase vs lowercase filename error in the subversion commit for 0.7. When fixing the filenames on a Mac, you can’t just use svn mv filename fileName. You get an uninformative error. You have to do it in two steps doing something like this:

  • svn mv filename filename.tmp
  • svn mv filename.tmp fileName

Learning Artemis

For editing genome annotations, many of my colleagues use Artemis while others use Apollo. For my own use, I’ve usually just made scripts that generate GFF and visualized that in Gbrowse, Jbrowse, or IGV. For the genomics class I co-teach, we’ve had students edit GFF in a text editor (emacs!) and display it in IGV. But this year we shifted to doing more stuff that we used to do on the command line to our local teaching Galaxy, so after many years of avoiding them, I need to quickly get up to speed with Artemis and/or Apollo (in the long run, we’re going to use WebApollo, but that isn’t happening before the next homework assignment). Desktop Apollo stopped development and it’s not clear what the status of Artemis is, so this learning exercise may not be that useful.

To teach the kinds of things that MAKER does as a complete workflow, we are showing students how to take pieces of ab initio and data-driven evidence and assemble by hand the kind of evidence stack that MAKER automates. This means that we want to start with an undecorated fasta file of our artificial genome and load a bunch of gff, gtf, and bam files.

Everything below was done on a MacBook Air running OSX 10.9 (Mavericks).

Loading a fasta file

It seems like there are a couple of ways to do this. I was able to load my fasta file using either File > Read an entry or by invoking a project manager (which only seems to be available from the File menu if nothing else is opened). I initially opened a copy of my fasta file from a directory I had used with IGV, but found that this caused saves to fail because there was also a fasta index file present. Copying the file into my artemis working directory, I was able to open and save. This is what the viewer looks like.



The top line of the viewer shows a selector for feature sets, aka “Entries” in Artemis’ jargon. Below the entry bar (which can be hidden), the viewer shows an overview and a detailed view. Scroll bars on the right allow you to adjust the zoom of each; you can make the lower panel more of an overview than the top if you want. Double clicking on either panel jumps the other to the area you are viewing. A variety of graph options for things like GC content are available and open as additional panels. As you zoom out, Artemis shows stop codons in all 6 reading frames. As you zoom in, you get amino acid and DNA sequences.

Layers of annotations are “Entries”, so I can load additional files in different formats or create them using Artemis’ built-in tools. For example, Create > Mark Open Reading Frames gives this:ArtemisScreenSnapz002Several things have changed.

  • We have a new entry “ORFS_100+” (I used the default lower limit of 100 aa for ORF calling) on the entries bar.
  • The panels are now decorated with aqua blocks showing CDS features
  • The bottom panel shows a textual list of CDS features

More tracks/entries

I loaded a couple more entries as gff files:

  • Augustus gene prediction
  • Blastx parsed with a bioperl script I wrote


To get this view I tried some additional options from the Display menu. I tried Display > Show One Line Per Entry View. This is Display > Feature Stack View. These two create another panel above the overview genome panel.



There are some nice things about the display, but other parts are kind of a mess:

  • I like how the coding exons are linked across different reading frames
  • The parent-child feature relationships seem to be incomplete. CDS features are linked within a transcript, but parts of the same gene feature are displayed separately, and are stacked onto each other in a way that is hard to see.

Create a new set of annotations

Create > New Entry adds an entry to the entry bar called “no_name”. Yes, really. There’s no field to name the entry when you create it. You have to use Entries > Set Name of Entry and pick the no_name entry before you can rename it.

Features can be copied from the evidence entry sets to your custom entry and then edited. But I think I haven’t found the right way to copy a feature set (e.g. gene, transcript, introns, cds etc.) together.

That’s where I am so far… more later, perhaps.

More info

Artemis manual (ftp/pdf)

Artemis tutorials:



Your spambot needs debugging

Found an amusing spam in my comment moderation queue. Excerpt:

{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I
never found any interesting article like yours.

{It’s|It is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all
{webmasters|site owners|website owners|web owners} and
bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.|
I {couldn’t|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can’t} {in finding|find|to find}
your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service.
Do {you have|you’ve} any? {Please|Kindly} {allow|permit|let}
me {realize|recognize|understand|recognise|know} {so
that|in order that} I {may just|may|could} subscribe.

Dealing with ShellShock on our older mac servers

We have a couple of machines that are still running Snow Leopard, so the Apple patch won’t work. One option is to recompile bash and its patches from source, but why do that when I already have MacPorts on those machines.

Testing the vulnerabilities

From Stack Exchange, there are multiple vulnerabilities:
The first one is tested with this:
$env x='() { :;}; echo vulnerable' bash -c 'echo hello'
if the shell is vulnerable, it will echo vulnerable and hello. Otherwise it just echoes hello.

A second vulnerability is tested with
$env X='() { (a)=>\' sh -c "echo date"; cat echo
if you’re OK, you will see something like
cat: echo: No such file or directory

sh: X: line 0: syntax error near unexpected token `='
sh: X: line 0: `X () { (a)=>\'
sh: error importing function definition for `X'
cat: echo: No such file or directory

The important thing is that you don’t want to see an actual date and a file created called echo.

The third vulnerability redefines the ls command
$ env ls="() { echo 'Game over'; }" bash -c ls
Vulnerable systems will echo Game over.

Installing the fix

Getting it installed is easy after updating to the latest versions of the ports
sudo port selfupdate
sudo port upgrade outdated
sudo port install bash

But this only applies the MacPorts bash for the user. To make it the default, we have to make it the default shell for an intruder. To do this we need to edit /etc/shells to replace /bin/bash with /opt/local/bin/bash.

I think this is enough. But I still have some concerns. The bash version in MacPorts seems to be 4.3.28. Apple’s official release after the patch is 3.2.53 (apparently this is equivalent to 3.2.54 in terms of patches). The MacPorts version is still vulnerable to the second problem. I’ll be watching MacPorts for updates, but I am also looking at whether the machines, which are too old for Mavericks, can be updated to Lion or Mountain Lion.

Update: MacPorts pushed another bash update over the weekend

Mail in Mavericks is screwed up


What’s going on here?

Around the same time that I got this new laptop, TAMU switched from hosting its own mail to a Google Apps-based system. As part of the changeover, you can import your mailboxes from the old system to the new system. After hooking up the new account in as an IMAP account, there are messages where what you select is not what you get: The sender and subject are for a different message somewhere else in the mailbox. In fact, this is the case for all of the imported messages; new arrivals seem to match up. There are also many unrelated messages grouped as if they belong in the same thread.

Now, blaming this on Mavericks might seem unfair, as there are multiple partners involved here: A&M’s import system, Google, and Apple. But this mismatch doesn’t happen on the old laptop running Lion, or on my iPad or iPhone.

Various posts online suggest rebuilding the mailbox. This didn’t work for me. In the web gmail, I deleted the label for the import, unstarred everything and marked everything a not important. I did another rebuild… not joy. Rebuilt the Spotlight index. I think that may have fixed it.

New laptop

I’ve been working on a 2011 MacBook Air since Spring of 2012. A&M is really nice in having a program to subsidize computer purchases for faculty, but unfortunately I had do spend my faculty workstation funds a month or so before Apple updated the Airs, which meant that I got the version where 250G was the maximum SSD and the ports were USB2 instead of USB3. I’ve been meaning to replace it since I started getting close to filling up the disk. Plus I’ve actually worn the letters off several of the keycaps (as you can see in the picture)!


The SSD was so full that I moved my iTunes and iPhoto libraries to an external Volume using a Nifty Minidrive microSD card holder. But Time Machine keeps marking that Volume as one to not back up, even though I could have sworn that I changed that setting many times.

So, I finally decided to pull the trigger and order a new MacBook Air (spending my own money, as I’m not eligible for another workstation yet, and I don’t have the matching grant money right now anyway). It arrived today, so now I’m setting it up. This post is for notes on what worked and what didn’t

Migration assistant

The old Air was still running Lion while the new one came with Mavericks. I was running Lion because I didn’t want to deal with reinstalling MacPorts for the web development I do on my laptop, and I also figured that I was going to get a new machine anyway.  This meant that even though I attached the two laptops to each other using a thunderbolt cable, they didn’t handshake, so the transfer started using WiFi. Time estimate: more than 8 hours!  Attaching ethernet cables (I have one USB to ethernet and one thunderbolt to ethernet adaptor) during the transfer didn’t work, so I aborted the transfer and restarted it after I had created a temporary user on the new Mac. Using Ethernet the time was closer to 4 hours.

Interestingly, after the transfer, the old MacBook renamed itself because both machines had the same network names. The aborted transfer also did something very weird to the Applications folder. There is now a nameless folder with copies of all the Applications and a symlink to Applications. Deleted that.

Migration assistant seems to have moved my ssh keys.

iWork apps

Launching the App Store, I was prompted to accept the iWork apps. Cool. Got them.


Xcode does not automatically update, so I did that in the App store. Based on this post and the MacPorts documentation, it seems that I also needed to reinstall the command line tools, using

sudo xcode-select --install

but then I discovered that updating Xcode via the App Store isn’t good enough; it just updated to a higher version of 4.x instead of going to 5.x. I had to trash the old one and reinstall from the App store. The command line tools have to be downloaded from the Apple Developer Site. I really don’t understand why Apple took these outside of the XCode installation.


MacPorts recommends reinstalling, so I downloaded the package installer and installed it.  The migration guide suggests uninstalling everything. After confirming that

sudo port selfupdate
sudo port upgrade outdated

failed, I went ahead and did

port -qv installed > myports.txt  
sudo port -f uninstall installed  
sudo port clean all

and then reinstalled the things I think I need.  This was not straightforward as it should be. I think it turned out that I needed to reset xcode-select to use the Command Line tools that are separate from XCode.

xcode-select -r

This allows me to install the desired modules in MacPorts, even though every one of them gives a warning about how it will probably fail because XCode is not installed (even though it is).

On launching, it updated the database… badly for the IMAP account used by TAMU’s recent migration to Gmail. I’m seeing problems where messages have to be clicked multiple times in order to go to the trash, and worse, there are cases where the sender and subject of the email selected in the mail browser doesn’t match the one in the preview window. This has been seen by others.  Rebuilding didn’t help, but deleting the account and recreating it seems to have worked.

Time Machine

There isn’t anything in the Time Machine Preference Panel to set the backup to inherit the history from the old machine, but the first time I started a backup, it prompted me to ask if I wanted to do that.  I’m wondering how long the first backup will take… I started on Saturday afternoon and it’s been preparing backup for at least a couple of hours.

UPDATE: despite estimating that it would take much longer, the backup completed sometime earlier than 9:20 PM on Saturday. Sweet!

Microsoft Office

As expected, Word complained about needing a product key. Once I found it in my Amazon account, things seem to work.


I use MacPorts php with the Apple Apache2 to do web development (mostly in Mediawiki and WordPress). It seems that the Migration Assistant didn’t move files owned by the www user.  Rather than dig the desired files out of the old machine (by this time the new laptop and I were at work and the old laptop is at home), I downloaded new versions and installed fresh.