Both ! and % allow you to run shell commands from a Jupyter notebook. % is provided by the IPython kernel and allows you to run "magic commands", many of which include well-known shell commands. ! , provided by Jupyter, allows shell commands to be run within cells.
When using GenomeDiagram with Jupyter (iPython), the easiest way to display images is by converting the GenomeDiagram to a PNG image. This can be wrapped using an IPython. display. Image object to make it display in the notebook.
Capturing Output With %%capture IPython has a cell magic, %%capture , which captures the stdout/stderr of a cell. With this magic you can discard these streams or store them in a variable.
You can add the markdown cells in the jupyter notebook from the drop-down list as follows: You can also add the markdown option by using the keyboard shortcut 'm/M' immediately after adding a new cell.
You can create tables using pipes and dashes like this.
A | B
- | -
 | 
see Tables syntax
I don't have enough reputation to add comments, so I'll just put my 2 cents as a separate answer. I also found that JMann's solution didn't work, but if you wrap his implementation with table tags:
<table><tr>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
</tr></table>
then it works.
JMann's solution didn't work for me. But this one worked
from IPython.display import HTML, display
display(HTML("<table><tr><td><img src='img1'></td><td><img src='img2'></td></tr></table>"))
I took the idea from this notebook
I found the following works in a Markdown cell:
<tr>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
<td> <img src="Nordic_trails.jpg" alt="Drawing" style="width: 250px;"/> </td>
</tr>
| ||
|-|-|
| | 
| | 
<table><tr>
<td>
<p align="center" style="padding: 10px">
<img alt="Forwarding" src="images/IMG_20201012_183152_(2).jpg" width="320">
<br>
<em style="color: grey">Forwarding (Anahtarlama)</em>
</p>
</td>
<td>
<p align="center">
<img alt="Routing" src="images/IMG_20201012_183158_(2).jpg" width="515">
<br>
<em style="color: grey">Routing (yönlendirme)</em>
</p>
</td>
</tr></table>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With