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 / unzipper_function.md
Created October 26, 2021 15:41
unzipper - a shell function for unzipping files and folders to add to your path on macOS

unzipper

A useful function to add to your ~/.bash_profile or ~/.bashrc file on macOS that automates custom unzipping of regular-zipped or gzipped files and folders on Mac.

This is a companion function/script to my zipper function posted in a Gist here.

Add in your path as a full shell script by copying all below and saving into a file named unzipper located in your $PATH (e.g. /usr/bin), or copy and paste just the function into ~/.bash_profile or ~/.bashrc then restart Terminal.

#!/bin/sh
@justincbagley
justincbagley / zipper_function.md
Last active October 9, 2024 11:34
zipper - a shell function for zipping files and folders to add to your path on macOS

zipper

A useful function to add to your ~/.bash_profile or ~/.bashrc file on macOS that automates custom zipping of files and folders. This function also checks to make sure that the resulting gzipped folder has the same date as the last date of modificationf or the folder.

Add in your path as a full shell script by copying all below and saving into a file named zipper located in your $PATH (e.g. /usr/bin), or copy and paste just the function into ~/.bash_profile or ~/.bashrc then restart Terminal.

#!/bin/sh

# zipper
@justincbagley
justincbagley / Markdown_rendering_quest.md
Last active August 12, 2021 00:27
The Markdown Rendering Quest Continues

The Markdown Rendering Quest Continues

GitHub Markdown

Everyone loves GitHub-flavored Markdown. A problem of interest for some time now is rendering, editing, and saving Markdown with GitHub rendering style.

This is something that has interested me since at least 2018. Indeed, I have been using grip for Markdown preview, conversion, and saving to PDF on macOS for years, as I detailed previously in one of my other popular Gists here.

Problem: GitHub API Limits

@justincbagley
justincbagley / PartitionFinder_Citations.md
Last active December 30, 2020 20:50
Curated list of citations relevant to PartitionFinder by Rob Lanfear

PartitionFinder Citations

v1.1.0 manual:

v1.1.0 software:

  • Lanfear, R., Calcott, B., Ho, S.Y. and Guindon, S., 2012. PartitionFinder: combined selection of partitioning schemes and substitution models for phylogenetic analyses. Molecular Biology and Evolution, 29(6), 1695-1701.
@justincbagley
justincbagley / Reasons_To_Prefer_CLI_Software_to_GUIs.md
Last active October 21, 2024 07:42
Reasons to Prefer Command Line Interface (CLI) Software to GUIs

Reasons to Prefer Commalind Line Interface (CLI) Software to GUIs

One common question, upon seeing someone working in a terminal is,

"Why don't you use a nice-looking, easy-to-use GUI software instead?"

And a perrenial related question discussed among developers is along the lines of,

@justincbagley
justincbagley / dDocent_utility_scripts.md
Last active May 9, 2020 14:00
Handy utility shell scripts for cleaning dDocent run folders

dDocent Utility Shell Scripts

Justin C. Bagley, Ph.D.

University of Missouri-St. Louis

This Gist provides a handful of utility shell scripts for use with dDocent, which I wrote in March 2020. Specifically, these scripts are meant to be placed in dDocent run subfolders, in order to provide means of quickly cleaning up the workspace after failed or stopped (ctrl + C) runs. They are sufficiently generic to clean any dDocent run folder, and they range from a minor clean to a deep clean (removes essentially everything generated during run).

Files

  • deep_clean_ddocent_folder.sh
@justincbagley
justincbagley / clean_raxml_gist.md
Created April 22, 2020 19:22
clean_raxml function for cleaning RAxML run directories

For those interested in running RAxML for phylogenetic inference using maximum-likelihood, here is a little function for cleaning up (within a RAxML run directory) after a failed RAxML run. Just add the following function to your ~/.bash_profile (on Mac) or ~/.bashrc (on Linux supercomputer) and do source ~/.bash_profile (or simliar) to have it on hand from the cli.

## CLEAN RAXML RUN DIR (TO CLEAN UP AFTER FAILED RUNS, BEFORE RESUBMITTING TO QUEUE)

clean_raxml () {
        rm ./*.txt; rm ./*.reduced; rm ./RAxML_info* ;
}

Install nQuire Software

nQuire is a software program (Weiß et al. 2018) that estimates sample ploidy levels from next-generation sequencing (NGS; e.g. Illumina) reads for one or multiple samples, starting from BAM file(s) (extension '.bam'; Li et al. 2009) for the sample(s). It is assumed that the .bam input file(s) were output by an aligner such as bwa (Li and Durbin 2009) and contain information on reads mapped to an appropriate reference (draft reference genome, pseudo-reference genome assembly, etc.). Find the nQuire paper here or using the reference below.

nQuire is available through a GitHub repository, and installation instructions are given in the main README for the repo. I have had success installing nQuire, following the given instructions, on both macOS High Sierra v10.13+ and CentOS 6/7 Linux OS's.

INSTALL nQuire

git clone --recursive https://github.com/clwgg/nQuire
@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

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: