Skip to content

Instantly share code, notes, and snippets.

View chasemc's full-sized avatar
:octocat:
I may be slow to respond.

Chase Clark chasemc

:octocat:
I may be slow to respond.
View GitHub Profile
@chasemc
chasemc / parse_pfamscan.R
Created January 12, 2022 13:30
Parse pfamscan.pl output in base R
pfam_df <- readLines("pfamscan_out.txt")
pfam_df <- lapply(pfam_df, function(x){
x <- scan(text = x, what = "text", comment.char = "#", quiet = T)
if (!identical(x,character(0))){
return(x)
}
})
pfam_df <- do.call(rbind.data.frame, pfam_df)
@chasemc
chasemc / example_prioritize.R
Last active March 22, 2022 21:52
Example for the current prioritization function in the IDBac "prioritizer" branch
library(remotes)
remotes::install_github("chasemc/IDBacApp@prioritizer")
library(IDBacApp)
library(here)
# connect_to_idbac_database
pool <- IDBacApp::idbac_connect('VNBacterialLibrary_db-2_0_0', # name of sqlite database
here::here('data')) # directory containing sqlite database
# get_protein_peaks

Contributor Covenant Code of Conduct

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual

@chasemc
chasemc / stdout.fail.txt
Created April 21, 2022 15:27
stdout.fail.txt
Create directory ./tmp
easy-cluster fail.fasta mmseqs2_fail ./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
@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
@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
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")
/*
========================================================================================
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'
# 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)