seattleflu / augur-build

the (in development) augur build for understanding influenza dynamics in Seattle
https://seattleflu.org
0 stars 2 forks source link

Adds script to plot genetic vs. geo distance #24

Closed cassiawag closed 5 years ago

cassiawag commented 5 years ago

As requested in #20, this PR adds a plot_gen_geo_distance.py to the folder analyses. The script takes --metadata, --alignment, and --lat-longs as inputs and plots genetic distance to closest strain vs. geographic distance to closest strain. This is done for all viruses with region = seattle where location exists and is a census tract in Washington. The output is analyses/h3n2_dist_genetic_geo.png.

trvrb commented 5 years ago

This is great @cassiawag. My only request is to add --output-table and --output-figure` flags as also requested in #25. These can have sensible defaults. But having this will make automated figure export in Snakemake more convenient.

cassiawag commented 5 years ago

@trvrb: I MAJORLY screwed up this git history, and I don't know how to fix it. So I made a new branch called distance with the changes you requested and the changes you made to the script and created a PR for that.

trvrb commented 5 years ago

@cassiawag: No worries at all. I'll repair Git.

trvrb commented 5 years ago

b7939c38b603bab9421759c6779710dd8fe5633f looks messy only because the previous version of plot_gen_geo_distance.py in 54aaabbece141c8dda5861827976c915a4a71c8e and previous has a bunch of lines with unnecessary whitespace. This is the big reason I set Atom to strip whitespace.

But this was an easy fix. Things look really good. I'll go ahead and merge this.

BTW your strategy of making a new clean branch is good one. It's always a safe way to deal with Git issues.

trvrb commented 5 years ago

I decided to merge in #26 instead. Closing this PR unmerged.