- Instal Deno. It's a secure runtime for JavaScript and TypeScript.
- Generate a personal access token for GitHub. And save it to
~/.github-oauth
. You can use the following command to save it:echo generated_github_personal_access_token_goes_here > ~/.github-oauth
This file contains hidden or 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(flametree) | |
library(ggplot2) | |
library(gganimate) | |
dat <- flametree_grow(time = 13) | |
pic <- ggplot( | |
data = dat, | |
mapping = aes( | |
x = coord_x, |
This file contains hidden or 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
params.directories="." | |
params.headsize=100000 | |
params.extensions="bam bai" | |
params.help=false | |
params.extrafind="" | |
params.lines = 1000 | |
params.publishDir="." | |
def helpMessage() { | |
log.info""" |
This file contains hidden or 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
import papermill as pm | |
pm.execute_notebook('weather_forecast_using_pyowm.ipynb', | |
'weather_forecast_using_pyowm_output.ipynb', | |
parameters={'city':'Sao Paulo,BR'}, | |
kernel_name='papermill-tutorial') |
This file contains hidden or 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 Kaplan-Meier plot using ggplot2 | |
#' | |
#' @param sfit: a survfit object | |
#' @param table: logical: Create a table graphic below the K-M plot, indicating at-risk numbers? | |
#' @param returns logical: if TRUE, return an arrangeGrob object | |
#' @param xlabs: x-axis label | |
#' @param ylabs: y-axis label | |
#' @param ystratalabs: The strata labels. Default = levels(summary(sfit)$strata) | |
#' @param ystrataname: The legend name. Default = "Strata" | |
#' @param timeby numeric: control the granularity along the time-axis |
This file contains hidden or 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
ggroc <- function(roc, showAUC = TRUE, interval = 0.2, breaks = seq(0, 1, interval)){ | |
require(pROC) | |
if(class(roc) != "roc") | |
simpleError("Please provide roc object from pROC package") | |
plotx <- rev(roc$specificities) | |
ploty <- rev(roc$sensitivities) | |
ggplot(NULL, aes(x = plotx, y = ploty)) + | |
geom_segment(aes(x = 0, y = 1, xend = 1,yend = 0), alpha = 0.5) + | |
geom_step() + |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
This file contains hidden or 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
# stack overflow answer from Joran Ellis: | |
# http://stackoverflow.com/questions/5319839/read-multiple-csv-files-into-separate-data-frames | |
# If the path is different than your working directory | |
# you'll need to set full.names = TRUE to get the full | |
# paths. | |
my_files <- list.files("path/to/files") | |
# Further arguments to read.csv can be passed in ... | |
all_csv <- lapply(my_files,read.csv,...) |
This file contains hidden or 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
#GATK Method <- Slower and keeps original ID plut dbSNP rsID | |
# R=Reference FASTA | |
# V=VCF file to add IDs to | |
# --dbsnp = dbsnp VCF -- download from NCBI FTP | |
java -jar GenomeAnalysisTK.jar -R /reference/Homo_sapiens_assembly19.fasta -T VariantAnnotator -V vcf_to_add_id_to.vcf --dbsnp /reference/dbsnp_137.b37.vcf.gz --out /data/Broad.chr1.annotated.vcf | |
#bcftools Method <- Faster, replaces existing ID with dbSNP rsID | |
/usr/bin/htslib/bcftools/bcftools annotate -a /reference/dbsnp_137.b37.vcf.gz -c ID vcf_to_add_id_to.vcf |
People
![]() :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: |
NewerOlder