Skip to content

Instantly share code, notes, and snippets.

View chasemc's full-sized avatar
:octocat:

Chase Clark chasemc

:octocat:
View GitHub Profile
@chasemc
chasemc / sgnf.yml
Last active September 20, 2022 13:01
name: socialgene_nf
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- conda-forge::python>=3.10
- bioconda::hmmer>=3.3.2
include common_parameters.env
export
SHELL = /bin/bash
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
export CURRENT_UID
export CURRENT_GID
Sep-01 20:50:45.862 [main] DEBUG nextflow.cli.Launcher - $> nextflow run . -profile ultraquickstart,conda --single_outdir /home/chase/Documents/ultraqsauickstart/test -resume
Sep-01 20:50:45.917 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 22.04.0
Sep-01 20:50:46.711 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /home/chase/Documents/github/kwan_lab/socialgene/sgnf/nextflow.config
Sep-01 20:50:46.712 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/chase/Documents/github/kwan_lab/socialgene/sgnf/nextflow.config
Sep-01 20:50:46.718 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `ultraquickstart,conda`
Sep-01 20:50:46.942 [main] DEBUG nextflow.plugin.PluginsFacade - Using Default plugins manager
Sep-01 20:50:46.949 [main] INFO org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Sep-01 20:50:46.949 [main] INFO org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Sep-01 20:50:46.951 [main] INFO org.pf4j.DefaultPlug
@chasemc
chasemc / dl_subsequence_gbk.py
Created August 7, 2022 14:27
Download an NCBI genbank file for a subset of a nucleotide sequence
import requests
from pathlib import Path
def dl_subsequence_gbk(outdir, accession, n_start, n_stop):
response = requests.post(
"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi",
params={
"db": "nuccore",
"rettype": "gb",
"from": str(n_start),
# template.sub
# starter submit file for CHTC jobs
universe = vanilla
log = logs/job_$(Cluster).log
error = errors/job_$(Cluster)_$(Process).err
output = outputs/job_$(Cluster)_$(Process).out
executable = hmmsearch.sh
arguments = $(hmm_model_basename) $(fasta_file_basename)
/*
========================================================================================
Nextflow minimal test
========================================================================================
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
outdir='/home/chase/Documents/socialgene_data/buchnera'
import zstandard as zstd
def decompress_zstd(bytes_input):
dctx = zstd.ZstdDecompressor()
decompressed_domtblout = dctx.decompress(bytes_input)
return decompressed_domtblout.decode("utf-8").splitlines()
cctx = zstandard.ZstdCompressor()
compressed = cctx.compress(b"data to compress")
@chasemc
chasemc / Dockerfile
Last active August 1, 2022 13:35
Antismash Dockerfile
FROM mambaorg/micromamba:0.23.3
COPY --chown=$MAMBA_USER:$MAMBA_USER antismash.yml /tmp/env.yaml
RUN micromamba create -n antismash
RUN micromamba install --yes --file /tmp/env.yaml && \
micromamba clean --all --yes
ARG MAMBA_DOCKERFILE_ACTIVATE=1
ENV ENV_NAME=antismash
@chasemc
chasemc / stdout.pass.txt
Created April 21, 2022 15:28
stdout.pass.txt
Create directory ./tmp
easy-cluster pass.fasta mmseqs2_pass ./tmp --threads 24
MMseqs Version: 13.45111
Substitution matrix nucl:nucleotide.out,aa:blosum62.out
Seed substitution matrix nucl:nucleotide.out,aa:VTML80.out
Sensitivity 4
k-mer length 0
k-score 2147483647
Alphabet size nucl:5,aa:21