- i: insert mode
- o: insert mode, but one line below
- esc: exit insert mode and return to command mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(readr) | |
library(metacoder) | |
# read in gdtb rs207 lineage/taxonomy information and format | |
# csv available here: https://osf.io/p6z3w/ | |
gtdb_lineages <- read_csv("gtdb-rs207.taxonomy.csv.gz") %>% # read in gtdb rs207 lineage information | |
mutate(full_lineage = paste(sep = ";", superkingdom, phylum, class, order, family, genus, species)) %>% # format lineage into single string | |
select(ident, full_lineage) # keep columns that will be used by metacoder |
Login (requires password and duo authentication)
ssh -l <your-xsede-username> login.xsede.org
gsissh rmacc-summit
# OR to get a specific login node
gsissh login12.colorado.xsede.org
Check disk usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(jsonlite) | |
library(dplyr) | |
carpentries_json <- read_json("https://feeds.carpentries.org/dc_past_workshops.json") | |
carpentries_df <- do.call(rbind, lapply(carpentries_json, rbind)) | |
carpentries_df <- carpentries_df %>% | |
as.data.frame() %>% | |
mutate_all(as.character) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
## Intro to plotting with ggplot2: other goodies 2020-02-20 | |
################################################################################ | |
# Getting started --------------------------------------------------------- | |
# First let's download a data set called "portal_data_joined.csv" | |
# We'll put it in our data folder inside of our project directory. | |
# If you don't already have a data directory, you can create one in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a horizontal scroll bar for code chunks in an html doc: | |
```{css, echo=FALSE} | |
pre, code {white-space:pre !important; overflow-x:auto} | |
``` | |
Change the width of a markdown figure: | |
![](figures/dag_quant.png){ width=30% } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import sourmash | |
if __name__ == "__main__": | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-k", "--ksize", type=int, default=51) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knitr::purl(input = "/path/to/file.Rmd", "/path/to/output_script.R", documentation = 0) |
Sum over a column in a csv:
cat file.csv| cut -d "," -f 2 | paste -sd+ - | bc
Pretty view a csv in less:
cat file.csv | column -t -s, | less -S
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -b tr_sourmash_2019 origin/tr_sourmash_2019 --track |
NewerOlder