Skip to content

Instantly share code, notes, and snippets.

View pditommaso's full-sized avatar
💭
Vita brevis, ars longa

Paolo Di Tommaso pditommaso

💭
Vita brevis, ars longa
View GitHub Profile
@pditommaso
pditommaso / setupGithubRepo
Created October 26, 2021 15:19 — forked from stephenhardy/setupGithubRepo
Initial setup steps for a git and github project
-- Initial setup
mkdir <YOURPROJECT>
cd <YOURPROJECT>
git init
-- Link to GitHub hosted repos
git remote add origin <git@github.com:YOURACCOUNT/YOURREPO.git>
git pull origin master
@pditommaso
pditommaso / ignite_batch.sh
Created May 2, 2019 17:36 — forked from dtrudg/ignite_batch.sh
Nucleus nextflow ignite sbatch script
#!/bin/bash
#SBATCH --job-name=ignite-nf-wordcount
#SBATCH --output=nf_ignite_%j.log
# Create the ignite allocation across 4 32GB nodes
#SBATCH --partition=32GB
#SBATCH -N 4
# This creates a random cluster seed, so the ignite cluster can communicate
# with itself and not clash with other running ignite clusters on Nucleus.
@pditommaso
pditommaso / demo.nf
Last active April 21, 2019 09:32 — forked from egonw/demo.nf
Using Bioclipse in Nextflow.
#!/usr/bin/env nextflow
@Grab(group='net.bioclipse.bacting', module='managers-cdk', version='0.0.3')
import net.bioclipse.managers.CDKManager
params.str = "./data.tsv"
params.size = 5000
process splitWikidata {
input:
file str from Channel.fromPath(params.str)
@pditommaso
pditommaso / dgm.json
Created January 16, 2019 20:58 — forked from wololock/dgm.json
[
{
"name": "org.codehaus.groovy.runtime.dgm$0",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true
},
{
"name": "org.codehaus.groovy.runtime.dgm$1",
@Grab(group = "org.reflections", module = "reflections", version = "0.9.11")
import groovy.json.JsonOutput
import org.codehaus.groovy.reflection.GeneratedMetaMethod
import org.reflections.Reflections
import org.reflections.util.ConfigurationBuilder
def reflections = new Reflections(new ConfigurationBuilder().build())
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect {
@pditommaso
pditommaso / 00_cmd.sh
Created January 24, 2018 23:14 — forked from lh3/00_cmd.sh
Scripts and command lines to create universal mask for hs37d5
#
# generate 01compositional.bed.gz
#
# low-complexity by mDUST
mdust hs37d5.fa -c -w7 -v28 \
| hs37d5.mdust-w7-v28.txt \
| cut -f1,3,4 \
| gawk -vOFS="\t" '{--$2;print}' \
| bgzip > 01compositional/hs37d5.mdust-w7-v28.bed.gz
@pditommaso
pditommaso / raid_ephemeral.sh
Last active December 23, 2017 23:14 — forked from joemiller/raid_ephemeral.sh
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"
yum -y -d0 install mdadm curl
@pditommaso
pditommaso / NF_logo.png
Created June 14, 2017 15:53 — forked from ewels/NF_logo.png
NextFlow Multipart HTML Emails
Save NextFlow logo as this file.
@pditommaso
pditommaso / Hello.g4
Created March 26, 2017 13:55 — forked from mattmcd/Hello.g4
Simple ANTLR4 grammar example
// define a grammar called Hello
grammar Hello;
r : 'hello' ID;
ID : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;
@pditommaso
pditommaso / diff2html.sh
Created September 23, 2016 09:49 — forked from stopyoukid/diff2html.sh
Script that takes a git diff and outputs an html file in GitHub style
#!/bin/bash
#
# Convert diff output to colorized HTML.
# (C) Mitch Frazier, 2008-08-27
# http://www.linuxjournal.com/content/convert-diff-output-colorized-html
# Modified by stopyoukid
#
html="<html><head><meta charset=\"utf-8\"><title>Pretty Diff</title><style>body {text-align: center;}#wrapper {display: inline-block;margin-top: 1em;min-width: 800px;text-align: left;}h2 {background: #fafafa;background: -moz-linear-gradient(#fafafa, #eaeaea);background: -webkit-linear-gradient(#fafafa, #eaeaea);-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa',endColorstr='#eaeaea')\";border: 1px solid #d8d8d8;border-bottom: 0;color: #555;font: 14px sans-serif;overflow: hidden;padding: 10px 6px;text-shadow: 0 1px 0 white;margin: 0;}.file-diff {border: 1px solid #d8d8d8;margin-bottom: 1em;overflow: auto;padding: 0.5em 0;}.file-diff > div {width: 100%:}pre {margin: 0;font-family: \"Bitstream Vera Sans Mono\", Courier, monospace;font-size: 12px;line-height: 1.4em;text-indent: 0.5em;}.file {color: