Category Archives: computer stuff

MacBook Pro connection confusion

Migrating from my old MacBook Air to my new 2016 Macbook Pro has involved some confusion about adapters and accessories. Overall, I like my new Macbook, but there have been a number of annoying things. The biggest is still Apple’s decision to kill the MagSafe power connector. More minor annoyances:

  • Out of the box, the brick used to come with a 3 prong extension in addition to the stubby 2 prong power connection. Now it’s extra.  The longer cable on the brick end is really valuable when you have a bunch of people (e.g. at a conference or students in a class, or even at an airport waiting area) sharing a wall plug or power strip. Fortunately, I can recycle a bunch of these from my old power bricks that don’t work anymore for the new MacBook.
  • If you buy the power brick you now have to buy a separate USB-C charge cable.  As far as I can tell, this should work with a generic USB-C cable. What was annoying here was buying a power supply at an Apple Store and not having the Apple employee ask if I needed the cable.
  • The original Thunderbolt was a superset of MiniDisplayPort, and Thunderbolt 1 and 2 used miniDisplayPort connectors.  There is a Thunderbolt 3/USB-C to Thunderbolt 2 adaptor, but although Thunderbolt 2 is a superset of MiniDisplayPort, the adaptor works for Thunderbolt connections but not for miniDisplayPort-based adaptors. In other words, plugging a Thunderbolt Display (discontinued in 2016, but some of us still have various versions) in works. What doesn’t work is MacBook-Thunderbolt adaptor-miniDisplayPort to VGA or HDMI adaptor-monitor.
  • If you want to sync an iPhone or an iPad to your MacBook Pro, you will need either a USB-C to lightning cable or a USB-C to USB-A adaptor. This means that if you buy a brand new MacBook Pro and a brand new iPad, you can’t connect them right out of the box. The USB-C to Lightning will allow you to use the MacBook power brick to charge an iPhone or iPad with or without the MacBook in the middle, so that could reduce the number of things.

 

RIP MagSafe power

I just got a new Slate Gray 13″ MacBook Pro with the touch bar. Overall I’m sure I’m going to like it just fine, but I have to say this:

Dear Tim Cook,

The MagSafe power connector was probably one of the best things you ever did for laptops… and it’s really annoying that you’ve killed it in the new MacBook Pro.

Sigh.

Slightly less annoying is that while the USB-C to Thunderbolt 2 adaptor fortunately worked for mounting the old laptop in Target mode, it doesn’t seem to work as a Mini DiplayPort.

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 wordpress.org

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 wordpress.org 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:


About/Help

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

[jsmol acc=$tryptophan]


About/Help

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

Notes

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.

ArtemisScreenSnapz001

 

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.

ArtemisScreenSnapz004

 

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.
Thanks.|