Blog

A Handshake with Scala

Scala is a JVM language that seeks to marry functional and object-oriented programming styles. It was was Designed by Martin Odersky and first appeared in 2004. While I think many projects that aspire to "best of both worlds" status end up ugly and chimeric, my explorations with Scala have revealed a really thoughtful and lovely creation that elegantly merges different paradigms. While it isn't one of the top-tier languages for for production code job hunting (think Java, C++, Python, JavaScript, etc), it made the GitHub top 15 list for most common languages recently. I suspect much of this is because it's becoming popular as a language for data science as a happy medium language between the breezy-to-write-but-relatively-slow Python and the incumbent production veteran Java that is faster but comes with…
Read More

Some light-hearted OOP (or, Some Circumstantial Evidence That I am Still Alive)

  Hello there! I am writing to let you know that I have cleared the summit of a couple of beastly projects and will be back to working on the site at at the usual semi-regular pace soon. I am also working on some pieces that are a little larger and more detailed than usual, but the delays should (hopefully) be offset with quality. In the meantime, enjoy some easy-going code humor that doesn't want to hurt no one as evidence I am still around. [embedit snippet="composedstevemiller"]
Read More

Dict-based Find and Replace Deluxe

Using a dict to perform find and replace tasks makes a lot of sense; they're simple to implement and they allow us to easily store the target with our desired replacement in one spot. There are a few hidden traps to keep be aware of, but they're easily avoided and we can be back on track reaping the benefits with just a little forethought. [embedit snippet="find_replace"] 
Read More

ASH: A Protoype Tool For Inspecting Potential Antigens/Epitopes

Hello! I have been interested in antigens/epitopes for some time now, and this is my prototype of a tool to help and informed user take a closer look at targets of interest for projects that involve them. It works using a simple scale that compares kmers on a residue to residue basis, and scores them for distinctness based on the presence of hydorphilic or hydrophobic residues and residues of structural complexity, which are widely known factors in immonogencity. Still, in the name of diligence, sources that informed these decisions can be seen below at the bottom of the post. The github to the project is here . There is a walkthrough, a readme, and a test package if you want to give it a spin. I'm actively working on this…
Read More

In Honor of MLK: “I Have A Dream” Wordcloud Example in R

Hello Everyone! I would like to wish everyone a happy MLK day. It isn't much, but as an act of respect and commemoration, I though I would share an example of how a beautiful speech can, with realative ease, be turned into a striking visual. We will, of course, be working with the monolithic "I Have a Dream" speech. I used the R programming language for this, as I have worked more extensively with text with it than Python, and don't use it as often and want to keep up my skills. If you'd like to see the rundown, here is the workbook, if not, the final product is below! Enjoy, and once again, happy Martin Luther King day! Note: This post was published on Jan 15 at approximately 9pm.…
Read More

Twitter Metadata Classifier: Trump or Clinton?

Hello all! I did a project for a data science class in which I classified tweets as being from @realDonaldTrump vs @HillaryClinton. I found a dataset on this on Kaggle. Because words and context trip up even the most clever programs on occasion, I decided to see if I could write and entirely numerical classifier. It read length of words, average words per sentence, that sort of thing. I wrote a Python function that engineers these features and a script to implement it that adds them to the original dataset. Below is the video: [embed]https://www.youtube.com/watch?v=ILCTxK-ZXJ0&t=16s[/embed] Please feel free to get in touch if you'd like to see a copy of the PDF.  
Read More

Python Overview for Perl Users

Recently, I created a quick summary of Python for Perl users for a class, so I thought I would share it here. Perl is a bit of a throwback, so for the uninitiated, it's is a high level level language developed to parse text in unix-like systems.  Quirky and known for being quick to write, if awkward to read, its regular expression and text parsing capability set the standard for languages that followed. It grew in popularity and was implemented for general purpose computing and web use, becoming known as "the duct tape that holds the Internet together". Though its uses has decreased sharply in the era of Python, JavaScript, and Ruby, it played an instrumental role in the Human Genome Project, so it still enjoys use in Bioinformatics. This…
Read More

Python’s zip() and dict() combo will love you right

Paired data in Python is user-friendly and efficient, and I find myself using it all the time. Sometimes in the course of a workflow, we end up with with multiple simple lists of information that would be easier managed as paired data. If you find yourself in this situation, there are two simple tools that work in a really intuitive way to “zip” the lists together such that the first item of list A is paired with the first item of list B. If the lists were [“Bruce”, “Peter”] and [“Wayne”, “Paker”] the out put would match them to {“Bruce”:”Wayne”, “Peter”:”Parker”}. *note that Python will also accept {“Miles”:”Morales”} :) [embedit snippet="zip-and-dict"]  
Read More