Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 2.07 KB

README.md

File metadata and controls

47 lines (35 loc) · 2.07 KB

matrix.py

matrix.py

One day I learned curses and wrote a little digital rain script.

Then I had the idea to make it show bases of DNA, as many others have done.

Then I thought it'd be cool to make it show real DNA from sequencing files. Especially when real-time sequencers like Oxford Nanopore now give output as it's generated. So you can see your reads coming in live, in the coolest way 90's cyberpunks could imagine!

Usage

This depends on a module in the bfx submodule, so you'll have to clone this with the --recursive option:
$ git clone --recursive 'https://github.com/NickSto/matrix.git'

Then, just point it to a FASTA file with -a or a FASTQ file with -q. It'll start showing bases from the file, with each "drop" showing the sequence from one read. And when one drop ends, the next picks up where it left off in the read.

Importantly, you can also give the path to a directory of FASTA or FASTQ files. Then it'll start showing each file, starting with the newest. If a new file appears, it'll immediately start reading that one. So you can point this to the directory your sequencer is depositing FASTQ's into, and it'll automatically show the newest sequence that's arrived.

You can see the rest of the options with the --help argument.

OS X bug

Unfortunately, the colors don't show correctly in the default OS X terminal. It shows up as white text on black (not very Matrix-y). If you'd really like to get it looking better, here's a workaround:

Go to Terminal > Preferences > Profiles
- You might want to create a new profile for this.
Then, select whichever profile you want to use and change these values under the "Text" tab:
- Change the Background "Color & Effects" to black.
- Change the color for "Text" to green.
- Uncheck "Display ANSI colors".
Then start a new terminal with that profile.