Skip to content

Instantly share code, notes, and snippets.

View toddknutson's full-sized avatar

Todd Knutson toddknutson

View GitHub Profile
@toddknutson
toddknutson / git.migrate
Created October 3, 2019 16:45 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@toddknutson
toddknutson / gist:90430a0dd736898037ed18bcd044df7f
Last active December 4, 2018 21:23
biostars.org_ 352930. "readX" could be the first read (A00223:8:H7YG3DMXX:1:1101:8892:7623)
@SQ SN:chrM LN:16571
@SQ SN:chr1 LN:249250621
@SQ SN:chr2 LN:243199373
@SQ SN:chr3 LN:198022430
@SQ SN:chr4 LN:191154276
@SQ SN:chr5 LN:180915260
@SQ SN:chr6 LN:171115067
@SQ SN:chr7 LN:159138663
@SQ SN:chr8 LN:146364022
@SQ SN:chr9 LN:141213431
((C:2,D:5):3[1],(A:0.1,(B:0.9,X:0.7):4[3]):6[2],E:0.5);
#' Convert a list of vectors to a data frame.
#'
#' This function will convert a list of vectors to a data frame. This function
#' will handle three different types of lists of vectors. First, if all the elements
#' in the list are named vectors, the resulting data frame will have have a number
#' of columns equal to the number of unique names across all vectors. In cases
#' where some vectors do not have names in other vectors, those values will be
#' filled with \code{NA}.
#'
#' The second case is when all the vectors are of the same length. In this case,