This file contains hidden or 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
| mmseqs2 = function (seqs, db, threads=24, preamble="mamba activate mmseqs2;") { | |
| id = uuid::UUIDgenerate() | |
| tmpdir = glue::glue("tmp/{id}") | |
| dir.create(tmpdir, recursive = T) | |
| fafile = glue::glue("{tmpdir}/input.fa") | |
| writeLines(paste(sprintf(">%d", seq_along(seqs)), seqs, sep = "\n"), fafile) | |
| cmd = glue::glue( | |
| "{preamble} ", |
This file contains hidden or 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
| kview = function(df) { | |
| fn = paste0(tempfile(), ".tsv") | |
| readr::write_tsv(df, fn, na="") | |
| system(sprintf("libreoffice --calc %s", fn)) | |
| return(invisible(df)) | |
| } |
This file contains hidden or 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 | |
| set -xe | |
| mkdir -p ~/.local/opt | |
| cd ~/.local/opt | |
| wget -O git-annex-standalone-amd64.tar.gz https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz | |
| rm -rf git-annex.linux | |
| tar xvf git-annex-standalone-amd64.tar.gz | |
| mkdir -p ~/.local/bin | |
| ln -sf $PWD/git-annex.linux/{git,git-annex,git-annex-shell,git-receive-pack,git-upload-pack,git-shell} ~/.local/bin | |
| set +x |
This file contains hidden or 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
| as.numeric.verbose = function(x) { | |
| # this code will parse german-style comma-as-decimal numbers or | |
| # english-style dot-as-decimal numbers. | |
| x = ifelse(grepl('^\\d+,\\d+$', x, perl=T), sub(',', '.', x, fixed=T), x) | |
| x.num = as.numeric(x) | |
| # Find which values got coerced to NA | |
| coerced = which(!is.na(x) & is.na(x.num)) | |
| if (length(coerced) > 0) { | |
| cat("Following values coerced to NA:\n") | |
| print(paste(coerced, x[coerced])) |
This file contains hidden or 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 | |
| echo "This is the Chromosome 4 finder script" | |
| grep '^Chr2' data/genes.bed > data/chr4.bed | |
| wc -l data/chr4.bed |
This file contains hidden or 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
| dpkg-checkbuilddeps: error: Unmet build dependencies: python3-pytools | |
| [1;33mW: Unmet build-dependency in source[0m | |
| dpkg-buildpackage: info: source package snakemake | |
| dpkg-buildpackage: info: source version 3.9.0+dfsg-1 | |
| dpkg-buildpackage: info: source distribution UNRELEASED | |
| dpkg-buildpackage: info: source changed by Kevin Murray <[email protected]> | |
| dpkg-source --before-build snakemake | |
| dpkg-source: info: applying 0001-Use-the-inbuild-sphinx.ext.napoleon.patch | |
| dpkg-source: info: applying 0003-Use-debian-s-mathjax-package.patch | |
| dpkg-source: info: applying 0003-Compat-fix.patch |
This file contains hidden or 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 | |
| declare -A urls | |
| urls[0.5]='https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5-latest-linux-x86_64.tar.gz' | |
| urls[nightly]='https://s3.amazonaws.com/julianightlies/bin/linux/x64/julia-latest-linux64.tar.gz' | |
| set -xeuo pipefail | |
| MAINVER=0.5 | |
| PREFIX=${PREFIX:-$HOME} |
This file contains hidden or 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
| tara init af2573173e19a6ada1ab4a3486468336e05607e9 | |
| Wed Jun 8 15:26:44 2016 +1000 |
This file contains hidden or 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
| template<typename Data> | |
| class concurrent_queue | |
| { | |
| private: | |
| std::queue<Data> the_queue; | |
| mutable std::mutex the_mutex; | |
| std::condition_variable the_condition_variable; | |
| public: | |
| void push(Data const& data) | |
| { |
This file contains hidden or 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 | |
| if [ $# -lt 1 ] | |
| then | |
| echo "USAGE: run-debci-test <PKG.changes> [<outdir>]" | |
| exit 1 | |
| fi | |
| if [ $# -eq 2 ] | |
| then |
NewerOlder