Skip to content

Instantly share code, notes, and snippets.

jgarces jgarces02

Block or report user

Report or block jgarces02

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jgarces02 /
Created Apr 30, 2019 — forked from pklaus/
A Script to Clear Cached RAM on Linux
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <>
if [ "$(whoami)" != "root" ]
echo "You have to run this script as Superuser!"
exit 1
jgarces02 / exome-coverage-multi.R
Last active May 6, 2019 — forked from stephenturner/exome-coverage-multi.R
R code to plot fraction of captured target bases over depth for exome experiments
View exome-coverage-multi.R
# Assumes you've already run coverageBed -hist, and grep'd '^all'. E.g. something like:
# find *bam | parallel 'bedtools coverage -hist -b {} -a /home/jgarces/genomes/sureSelect/sureSelect_v5_UTR/S04380219_Covered.bed | grep ^all > coverages/{}.hist.all.txt'
# Get a list of the bedtools output files you'd like to read in (all-in-one)
#print(files <- list.files(pattern="all.txt$"))
# Get a list of the bedtools output files you'd like to read in (by list)
args <- commandArgs(trailingOn = TRUE)
files <- scan(args[1], what = "", sep = "\n")
print(files <- paste0(files, ".hist.all.txt"))
View gist:e8f957a3670dc1e5149f9188fc0caca5
#' Complete themes
#' These are complete themes which control all non-data display. Use
#' [theme()] if you just need to tweak the display of an existing
#' theme.
#' @param base_size base font size
#' @param base_family base font family
#' @param base_line_size base size for line elements
#' @param base_rect_size base size for rect elements
jgarces02 / bash_shortcuts.txt
Created Oct 3, 2018
Some (veru useful) bash shortcuts!
View bash_shortcuts.txt
## CTRL Key Bound
Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen
Ctrl + r - Search the history backwards
jgarces02 / gist:fd9091c2199cdfd114ee69025b8d8099
Created Jul 10, 2018 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:fd9091c2199cdfd114ee69025b8d8099


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
jgarces02 / spotify.ahk
Last active Feb 22, 2020
Some Spotify keyboard shortcuts (on Windows)
View spotify.ahk
##### Version 2 (no numeric keyboard)
; "Sifth + Windows + RIGHT" for next
jgarces02 / gist:79a973fecc6e37d99ee9bcf13992a1ff
Created Apr 6, 2018
Prompt a notification when a long R process finishes
View gist:79a973fecc6e37d99ee9bcf13992a1ff
system('CMD /C ">>> ECHO The R process has finished running && PAUSE"',
invisible = FALSE, wait = FALSE)
jgarces02 / ggplot2 dual axes
Last active Dec 7, 2017 — forked from jslefche/
ggplot2 dual axes
View ggplot2 dual axes
## Dual axes for ggplot2
Modified from:
View package.R
#' Simplified loading and installing of packages
#' This code is taken and modified from jbryer (
#' This is a wrapper to \code{\link{require}} and \code{\link{install.packages}}.
#' Specifically, this will first try to load the package(s) and if not found
#' it will install then load the packages. Additionally, if the
#' \code{update=TRUE} parameter is specified it will check the currently
#' installed package version with what is available on CRAN (or mirror) and
#' install the newer version.
jgarces02 / multiplot.R
Last active May 15, 2017
Multiplot function for ggplot2 package
View multiplot.R
# Multiple plot function
# ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects)
# - cols: Number of columns in layout
# - layout: A matrix specifying the layout. If present, 'cols' is ignored.
# If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE),
# then plot 1 will go in the upper left, 2 will go in the upper right, and
# 3 will go all the way across the bottom.
You can’t perform that action at this time.