Skip to content

Instantly share code, notes, and snippets.

View cgpu's full-sized avatar
:octocat:

Christina Chatzipantsiou cgpu

:octocat:
View GitHub Profile
@cgpu
cgpu / finddups.nf
Created June 16, 2021 02:05 — forked from lindenb/finddups.nf
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"""
@cgpu
cgpu / packer-nextflow.yaml
Created March 17, 2021 20:50 — forked from alanbchristie/packer-nextflow.yaml
An example of a Nextflow Packer file in YAML
---
# Packer machine image configuration for a Nextflow/Docker machine.
#
# To use this file (Packer expects a JSON file) you need to
# use the project's yaml2json module to convert it to JSON.
# From this directory and a Suitable Python (see root's requirements.txt)
# you can run...
#
# ../../../yaml2json.py < nextflow.yml > nextflow.json
@cgpu
cgpu / sra-paired.sh
Created May 1, 2020 22:59 — forked from slowkow/sra-paired.sh
Check if an SRA file contains paired-end data.
#!/usr/bin/env bash
# sra-paired.sh
# Kamil Slowikowski
# April 23, 2014
#
# Check if an SRA file contains paired-end sequencing data.
#
# See documentation for the SRA Toolkit:
# http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=toolkit_doc&f=fastq-dump
@cgpu
cgpu / read-multiple-csv-files.R
Created April 29, 2020 22:31 — forked from apreshill/read-multiple-csv-files
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,...)
@cgpu
cgpu / get_content.groovy
Created April 19, 2020 14:36 — forked from kdabir/get_content.groovy
get content from url and write to a file in groovy
// saving from url to a file (append)
new File("output.xml") << new URL ("http://some.url/some/path.xml").getText()
@cgpu
cgpu / papermill_python_api.py
Created March 1, 2020 22:44 — forked from GabrielSGoncalves/papermill_python_api.py
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')
# print everything after loop is finished
for (i in 0:101) {
print(i)
Sys.sleep(0.01)
}
# simplist way to print within loop
for (i in 0:101) {
print(i)
Sys.sleep(0.01)
@cgpu
cgpu / plink_pruning_prep.sh
Created November 27, 2019 17:14 — forked from janxkoci/plink_pruning_prep.sh
This simple script prepares your VCF dataset for pruning with Plink. It takes name of the input VCF as argument and produces new, annotated VCF.
@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 / gist:6b15bc8af08ba319c8fd793e5c07f789
Created October 16, 2019 20:46 — forked from rxaviers/gist:7360908
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: