Skip to content

Instantly share code, notes, and snippets.

View jodyphelan's full-sized avatar

Jody Phelan jodyphelan

  • London, UK
View GitHub Profile
wget https://raw.githubusercontent.com/jodyphelan/TBProfiler/dev/conda/linux-latest.txt
conda create --name ntm-profiler-dev --file linux-latest.txt
conda activate ntm-profiler-dev
pip install --force-reinstall git+https://github.com/jodyphelan/pathogen-profiler.git@dev
pip install --force-reinstall git+https://github.com/jodyphelan/ntm-profiler.git@dev
ntm-profiler update_db
conda activate tb-profiler-dev
pip install --force-reinstall git+https://github.com/jodyphelan/pathogen-profiler.git@dev
pip install --force-reinstall git+https://github.com/jodyphelan/TBProfiler.git@dev
git clone https://github.com/jodyphelan/tbdb.git
cd tbdb
# move the parsed_who_mutations.csv and genes.csv to the current directory
# cp ~/temp/parsed_who_mutations.csv .
# cp ~/temp/genes.csv .
wget https://raw.githubusercontent.com/jodyphelan/TBProfiler/dev/conda/linux-latest.txt
conda create --name tb-profiler-dev --file linux-latest.txt
conda activate tb-profiler-dev
pip install --force-reinstall git+https://github.com/jodyphelan/pathogen-profiler.git@dev
pip install --force-reinstall git+https://github.com/jodyphelan/TBProfiler.git@dev
# If you want to use a custom refrence
tb-profiler update_tbdb --match_ref ~/refgenome/NC000962.3.fa --branch test
# If you want to install ntm-profiler
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/biocore/linux-64/mafft-7.245-0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/_r-mutex-1.0.1-anacondar_1.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2022.10.11-h06a4308_0.conda
https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2
# mamba create -n tb-profiler python bwa "samtools>=1.12" "bcftools>=1.12" requests snpEff samclip trimmomatic parallel "delly>=0.8.7" "freebayes>=1.3.5" tqdm bedtools jinja2 filelock docxtpl
wget -O pathogen-genomics-microbiome-profiler-spec.txt https://gist.githubusercontent.com/jodyphelan/92d8a63f498434f1c30bd48fcff8f8bb/raw/79d24bc7dcc72589145fbb5079ad108fe7fd51f7/microbiome-spec.txt
conda create --file pathogen-genomics-microbiome-profiler-spec.txt --name microbiome
conda activate microbiome
pip install multiqc
mv Module6 Module6_old
mkdir Module6
cd Module6
wget -O microbiome_data.tgz --no-check-certificate https://tbdr.lshtm.ac.uk/static/microbiome_data.tgz
tar -xvf microbiome_data.tgz
# mamba create -n tb-profiler python bwa "samtools>=1.12" "bcftools>=1.12" requests snpEff samclip trimmomatic parallel "delly>=0.8.7" "freebayes>=1.3.5" tqdm bedtools jinja2 filelock docxtpl
wget -O pathogen-genomics-microbiome-profiler-spec.txt https://gist.githubusercontent.com/jodyphelan/92d8a63f498434f1c30bd48fcff8f8bb/raw/79d24bc7dcc72589145fbb5079ad108fe7fd51f7/microbiome-spec.txt
conda create --file pathogen-genomics-microbiome-profiler-spec.txt --name microbiome
source activate microbiome
cd ~/data/
mkdir microbiome
cd microbiome
wget -O microbiome_data.tgz --no-check-certificate https://tbdr.lshtm.ac.uk/static/microbiome_data.tgz
tar -xvf microbiome_data.tgz
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/_r-mutex-1.0.1-anacondar_1.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2021.7.5-h06a4308_1.tar.bz2
https://conda.anaconda.org/bioconda/linux-64/entrez-direct-15.6-he881be0_1.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2
# mamba create -n tb-profiler python bwa "samtools>=1.12" "bcftools>=1.12" requests snpEff samclip trimmomatic parallel "delly>=0.8.7" "freebayes>=1.3.5" tqdm bedtools jinja2 filelock docxtpl
wget -O pathogen-genomics-tb-profiler-spec.txt https://gist.githubusercontent.com/jodyphelan/d220fb5ce97133ad5e5ae813edb7663d/raw/62bfeb6c0a6982bbb138d576e0d57bcac7605afe/pathogen-genomics-tb-profiler-spec
conda create --file pathogen-genomics-tb-profiler-spec.txt --name tb-profiler
source activate tb-profiler
pip install git+https://github.com/jodyphelan/TBProfiler/@dev
pip install git+https://github.com/jodyphelan/pathogen-profiler/@dev
cd ~/data/
mkdir tb
cd tb
wget -O tb_genomics_teaching.tgz --no-check-certificate https://tbdr.lshtm.ac.uk/static/tb_genomics_teaching.tgz
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2022.9.24-ha878542_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab24e00_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-hab24e00_0.tar.bz2
#! /usr/bin/env python
import argparse
import sys
import subprocess as sp
from tqdm import tqdm
def main(args):
background = []
foreground = []
for l in tqdm(open(args.meta)):