Trouble porting an example

Hi Folks,

I’m trying to port the biojs example here:

http://jsbin.com/zutaqofuro/1/edit?html,js,output

My port to a notebook throws an error (TypeError: this._ensureElement is not a function) when I try to render:

https://beta.observablehq.com/@sdwfrost/displaying-multiple-sequence-alignments-with-biojs

Any ideas?

Sure! This is a sort of a ES6-module-gotcha scenario, made more confusing by the fact that msa has an export named msa… but that’s a trap and the fix is:

Change:

  var m = await msa.msa({el: display, seqs: seqs});

to

  var m = await msa.default({el: display, seqs: seqs});

And it all should be fine and dandy.