Skip to content

Instantly share code, notes, and snippets.

View cgpu's full-sized avatar
:octocat:

Christina Chatzipantsiou cgpu

:octocat:
View GitHub Profile
@mukhortov
mukhortov / README.md
Last active December 3, 2024 02:04
Migrate GitHub issues with comments and labels to Jira

Migrate GitHub issues with comments and labels to Jira

Set up the environment

  1. Instal Deno. It's a secure runtime for JavaScript and TypeScript.
  2. 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
library(flametree)
library(ggplot2)
library(gganimate)
dat <- flametree_grow(time = 13)
pic <- ggplot(
data = dat,
mapping = aes(
x = coord_x,
@lindenb
lindenb / finddups.nf
Created March 4, 2020 13:51
workflow nextflow finding duplicated files and creating a bash script to replace the duplicate with a symbolic link
params.directories="."
params.headsize=100000
params.extensions="bam bai"
params.help=false
params.extrafind=""
params.lines = 1000
params.publishDir="."
def helpMessage() {
log.info"""
@GabrielSGoncalves
GabrielSGoncalves / papermill_python_api.py
Last active March 1, 2020 22:44
executing papermill using its Python API
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')
@cgpu
cgpu / KaplanMeierPlotR.R
Created October 24, 2019 18:46 — forked from nbremer/KaplanMeierPlotR.R
Creating a Kaplan Meier plot, used in Survival Analysis, using R's ggplot2 package
#' 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
@cgpu
cgpu / ggroc.R
Created June 10, 2019 00:43 — forked from jwaage/ggroc.R
ROC curve using ggplot2 and pROC
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() +
@npearce
npearce / install-docker.md
Last active May 13, 2025 12:29
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

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/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@apreshill
apreshill / read-multiple-csv-files
Created March 18, 2016 14:50
Read multiple csv files into R
# 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,...)
@obenshaindw
obenshaindw / Add dbSNP IDs to a VCF file
Last active August 21, 2023 21:47
Add dbSNP IDs to a VCF file that doesn't have them.
#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
@rxaviers
rxaviers / gist:7360908
Last active May 18, 2025 12:46
Complete list of github markdown emoji markup

People

: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: