Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar

icaoberg icaoberg

View GitHub Profile
@icaoberg
icaoberg / Singularity
Last active April 23, 2021 13:09
Basic Spack+Singularity recipe
Bootstrap: docker
From: spack/ubuntu-bionic
%labels
MAINTAINER icaoberg
EMAIL icaoberg@psc.edu
WEBSITE http://github.com/icaoberg/singularity-<PACKAGE-NAME>
COPYRIGHT Copyright © 2021 Pittsburgh Supercomputing Center. All Rights Reserved.
VERSION <PACKAGE-VERSION>
@icaoberg
icaoberg / script.sh
Created February 25, 2021 16:28
List files in B but not A
#!/bin/bash
grep -v -xFf A.tsv B.tsv
@icaoberg
icaoberg / sshow
Created May 27, 2020 19:34
sshow
#!/bin/bash
watch "scontrol show jobid $1 | grep StdOut | cut -d"=" -f2 | xargs tail -n 25"
@icaoberg
icaoberg / script.sh
Created February 20, 2020 20:55
[CELLORGANIZER] demo2D11 for Sergiu Sanielevici at PSC
#!/bin/bash
# @icaoberg 20/02/2020
# This script will
# * Download and extract a pre-release version of CellOrganizer v2.9.0
# * Run demo2D11. A training demo created for Sergiu Sanielevici
#
# For more information about CellOrganizer, visit the last release documentation
# http://www.cellorganizer.org/docs/2.8.1/
#
@icaoberg
icaoberg / example02.sh
Last active February 3, 2020 23:20 — forked from arq5x/go.sh
[bedtools] Compute average scores for share intervals
# icaoberg - this example is fork that uses a bedtools in a Singularity container
CONTAINER=../../singularity-bedtools.simg
echo "chr1 10 50 10" > a.bed
echo "chr1 20 40 20" > b.bed
echo "chr1 30 33 30" > c.bed
# Find the sub-intervals shared and unique to each file.
if [ -f $CONTAINER ]; then
singularity run --app bedtools $CONTAINER multiinter -i a.bed b.bed c.bed | column -t
@icaoberg
icaoberg / .gitignore
Last active February 3, 2020 23:21 — forked from arq5x/make-master-hmm.sh
[bedtools] For Gemini: Create a master ChromHMM track from the 9 distinct cell types.
*.txt
*.bedg
@icaoberg
icaoberg / rrename.sh
Created January 22, 2020 07:03
[UTILITIES] Random rename
#!/bin/bash
shopt -s nullglob
FILE=$1
if [ -f $FILE ]; then
mv -v "$FILE" $(uuidgen).${FILE##*.}
fi
@icaoberg
icaoberg / script.sh
Created December 12, 2019 18:24
Get number of tasks for a specific project on TaskWarrior
!/bin/bash
# icaoberg yes, i know there are better cleaner ways...
task project:$1 list | grep tasks | cut -d" " -f 1 | sed '/^[[:space:]]*$/d' | awk '{$1=$1;print}'
@icaoberg
icaoberg / Singularity
Created November 13, 2019 20:05
Singularity script for basic, empty Ubuntu 16.04
Bootstrap: docker
From: ubuntu:16.04
IncludeCmd: yes
%labels
Maintainer icaoberg AT alumni DOT cmu DOT edu
Version v1.0
%runscript
@icaoberg
icaoberg / script.sh
Created August 22, 2019 14:44
Convert all webp files to png
#!/bin/bash
for F in *.webp
do
dwebp $F -o $F.png
done