Skip to content

Instantly share code, notes, and snippets.

View justincbagley's full-sized avatar
🎯
Focusing

Justin C. Bagley justincbagley

🎯
Focusing
View GitHub Profile
@justincbagley
justincbagley / How_To_Install_&_Run_dadi-mod.md
Last active May 3, 2017 17:18
How to Install and Run Modified ```∂a∂i``` v1.6.3 from Tine *et al.* (2014)

How To Install and Run Modified ∂a∂i v1.6.3 from Tine et al. (2014)

This file describes how I installed Tine et al.'s modified version of ∂a∂i software on the BYU FSL supercomputing cluster marylou, and got it working, on April 15, 2017. Tine et al.'s modification of ∂a∂i permits models of heterogeneous migration between lineages, consistent with introgression of specific regions of the genome.

STEP #1. Download ∂a∂i mod distribution.

Tine et al.'s modification of ∂a∂i v1.6.3 is distributed in a "dadi-1.6.3_modif" folder containing the distro, which is available as part of a blog post at this SEA Lab website. Go to the bottom of the blog post and then download the modified ∂a∂i archive from this link.

STEP #2. Python virtual environment setup on supercomputer.

@justincbagley
justincbagley / How_to_Set_Substitution_Models_in_Seq-Gen.md
Last active August 28, 2017 04:17
How to Set DNA Substitution Models in Seq-Gen

How to Set DNA Substitution Models in Seq-Gen

August 27, 2017, Justin C. Bagley, Richmond, VA

In this Gist, I briefly provide some examples of how to set DNA substitution models in the program Seq-Gen (Rambaut and Grassly 1997). This software is available for download through Andrew Rambaut's website, and its infrequent development can also be tracked on GitHub at the Seq-Gen GitHub repository.

HKY + G

Here is an example using an alpha shape parameter of 0.5 (-a) for gamma-distributed rate heterogeneity, 4 discrete gamma categories (-g), empirical (fixed) base frequencies (-f), and a Ts:Tv ratio of 1.5 (-t): seqgencommand = -mHKY -l9077 -a0.5 -g4 -f0.314,0.198,0.218,0.270 -t1.5

@justincbagley
justincbagley / Correction_About_Tine2014_∂a∂i_Code-Version.md
Last active August 28, 2017 04:25
Correction About Tine et al.'s ∂a∂i Code/Version

August 28, 2017, Justin Bagley, Richmond, VA

In a previous Gist, I described a complicated set of operations for installing and running Tine et al.'s (2014) modified version of ∂a∂i v1.6... in which I suggested/implied that it was necessary to install their mod'd version to estimate heterogeneous migration rates. It turns out that this was wrong. ∂a∂i v1.7+ can handle Tine et al.'s (2014) code directly within the regular Python input files submitted to the program. So, all you need to do is install the latest version of ∂a∂i from Sourceforge and use the correct formatting/code in your input files. There is no need to go through my instructions to install Tine et al.'s ∂a∂i version.

Convert Word (.docx) to LaTeX using Pandoc

This is easy to do using Pandoc. Here's an example using an imaginary scientific manuscript file named "manuscript.docx" on my MacBook Pro; execute the following in Terminal:

pandoc /path/to/manuscript.docx -o manuscript.tex

This outputs a .tex file that can be edited and typeset in a LaTeX editor like TeXMaker or TeXShop

How I Installed BEAGLE Library On Linux

Justin C. Bagley, September 11, 2017, Richmond, VA, USA

Preliminaries

I've previously written blog posts on my website (www.justinbagley.org) about setting up Mac and Windows computers for running BEAST (Bayesian Evolutionary Analysis Sampling Trees) here and here, and those posts touched on installing BEAGLE. This Gist provides some notes on how I recently installed the BEAGLE API/library for scientific computing on a Linux supercomputer.

In all code examples that follow, "$" is the UNIX/Linux prompt; this was not typed and shouldn't be typed if following along with this Gist. Lines that do not start with the prompt are output to screen and likewise also should not be typed as input. The pound sign comments out the remainder of a line, allowing for note

How To Setup A Linux Supercomputer Account for RAD-seq Analysis

Justin C. Bagley, September 5, 2017, Richmond, VA, USA

What I describe here are a series of steps for setting up a Linux supercomputer account for RAD-seq (e.g. ddRAD-seq, 2bRAD) analysis, essentially assuming that you had been handed a new account and were starting from scratch. Part of the narrative is given in first person, reflecting my experiences when doing this recently on the VCU CHiPC's Godel supercomputer; other parts are written in third person as straightforward procedues/advice. In all code examples that follow, "$" is the UNIX/Linux prompt; this was not typed and shouldn't be typed if following along with this Gist. Within code snippets, lines just below a line starting with the prompt, but that do not start with the prompt, are output to screen and likewise also should not be typed as input. The pound sign comments out the remainder of a line, allowing for comments and notes to be added; some o

How To Install RADseq SNP-calling Software On A Linux Supercomputer

Justin C. Bagley, February 12, 2018, Richmond, VA, USA

Below, you will find a series of steps for installing on Linux three of the main software programs used for de novo assembly and SNP calling from RADseq-type next-generation sequencing data (given in no particular order): 1) ipyrad (Eaton 2014; Eaton and Overcast 2016), 2) dDocent (Puritz et al. 2014), and 3) Stacks v2.0beta (Catchen et al. 2013), and their dependencies. We will install all three because, even though a given RADseq paper will inevitably present results based on SNPs gleaned mainly from using one of these programs, Stacks is a dependency of dDocent and it is a good idea to compare results from multiple assemblers to ensure they converge on a similar number of SNPs.

As in my other Gists, "$" in the code below references the Linux prompt, which is not to be typed if following along with me. Within code snippets, lines just below a line starting with

Keybase proof

I hereby claim:

  • I am justincbagley on github.
  • I am justincbagley (https://keybase.io/justincbagley) on keybase.
  • I have a public key ASCxJVNMZzqQcBR8GRqlRF6noG-EgEvy0fGe0Qa3A-yXbAo

To claim this, I am signing this object:

@justincbagley
justincbagley / How_I_Got_svg-resizer_Working_on_Mac.md
Created May 3, 2017 18:05
How I Got svg-resizer Working On Mac

How I got svg-resizer working on Mac OSX:

svg-resizer is a command line interface Javascript utility useful for single or batch resizing SVG files (with '.svg' file extensions). It's great for OSX, and I am attempting to use it in my latest shell scripts. Below I provide notes on the series of steps that I used to install svg-resizer and get it working on my macOS Sierra machine, on date February 20, 2017.

1. Install librsvg2 using Homebrew

@justincbagley
justincbagley / Queue_check_function_for_godel.md
Last active December 19, 2019 19:38
Queue check function `myq` for godel supercomputer

Queue check function for godel

December 19, 2019

Justin C. Bagley, Ph.D.
University of Missouri-St. Louis (UMSL)
Virginia Commonwealth University (VCU)

myq