This file contains 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
# grab an off the shelf container with cuda9 | |
FROM nvidia/cuda:9.0-devel-ubuntu16.04 | |
# update gcc to gcc-6 as the default gcc-5 is too old | |
RUN apt-get update && apt-get install -y software-properties-common wget git | |
RUN add-apt-repository ppa:ubuntu-toolchain-r/test | |
RUN apt-get update && apt-get install -y gcc-6 g++-6 | |
# update cmake as the default is too old | |
RUN wget -qO- "https://cmake.org/files/v3.15/cmake-3.15.1-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/ |
This file contains 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(tidyverse) | |
assemblies=read_tsv('kraken_summary.bond.tsv') | |
short_name <- c( | |
"Bacillus subtilis" = "bs", | |
"Cryptococcus neoformans" = "cn", | |
"Enterococcus faecalis" = "ef", | |
"Escherichia coli" = "ec", | |
"Lactobacillus fermentum" = "lf", |
This file contains 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
rm counties.* | |
rm *csv | |
# England ###################################################################### | |
curl -O -J -L https://www.registers.service.gov.uk/registers/local-authority-eng/download-csv | |
# https://www.datadictionary.nhs.uk/data_dictionary/nhs_business_definitions/l/local_authority_de.asp? | |
# A Local Authority, in relation to England is: | |
## a County Council | |
awk -F',' '$6=="CTY" {print $7}' local-authority-eng.csv >> counties.eng.ls |
This file contains 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
#!/bin/bash | |
USER_ID=${LOCAL_USER_ID:-9001} | |
echo "starting with UID : $USER_ID" | |
echo "creating RAMPART user" | |
useradd --shell /bin/bash -u $USER_ID -o -c "" -m rampart | |
echo "raising RAMPART on $CLIENT $SERVER" |
This file contains 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
# kraken2-microbial database | |
## Monday 3rd September 2018 | |
## s.nicholls.1 | |
KDB=$1 | |
kraken2-build --download-taxonomy --threads 24 --db $KDB | |
kraken2-build --download-library archaea --db $KDB | |
kraken2-build --download-library bacteria --db $KDB |
This file contains 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
# Fail2Ban configuration file | |
# | |
# NOTE | |
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives. | |
# | |
# Author: http://www.go2linux.org | |
# Modified by: samnicholls.net | |
# * Mon 6 Jun 2016 - Updated failregex to capture HOST group correctly | |
[Definition] |
This file contains 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
#!/usr/bin/env nextflow | |
params.testdir = "/cephfs/covid/software/sam/nf-test/" | |
params.fofn_single = [params.testdir, 'samples.csv'].join('/') | |
single_manifest_ch = Channel | |
.fromPath(params.fofn_single) // open say, a CSV | |
.splitCsv(header:true) // split text stream into CSV records | |
.map { row-> file(row.path) } // coerce the record and return a file for each line | |
.collect() // emit all items as one |
This file contains 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 argparse | |
import sys | |
import random | |
import numpy as np | |
import pysam | |
parser = argparse.ArgumentParser(description="A very very very bad read generator.") | |
parser.add_argument("shred", type=int) | |
parser.add_argument("fasta") |
This file contains 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
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
p = subprocess.Popen("git ls-files --others --exclude-standard", shell=True, stdout=subprocess.PIPE) | |
out, err = p.communicate() | |
migrations = [] | |
for unchecked_rp in out.decode('UTF-8').split('\n'): | |
if "migrations" in unchecked_rp: |
This file contains 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
# Nicer syntax but leads to ugly job names, | |
# and doesn't work when variables strings are long | |
# See https://gitlab.com/gitlab-org/gitlab/-/issues/362262 | |
my-job: | |
extends: base-job | |
parallel: | |
matrix: | |
- OWLS: 1 | |
CATS: 0 | |
- OWLS: 0 |