Skip to content

Commit

Permalink
Add rna inputs workflow (#11)
Browse files Browse the repository at this point in the history
* feat: accept inputs for both dna and rna
  • Loading branch information
rroutsong authored Feb 28, 2024
1 parent db7f9de commit e5fc0b9
Show file tree
Hide file tree
Showing 20 changed files with 976 additions and 689 deletions.
62 changes: 45 additions & 17 deletions config/cluster.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
{
"__default__": {
"threads": 4,
"mem": "8g",
"mem": "8G",
"partition": "norm",
"time": "0-04:00:00"
"time": "0-04:00:00",
"gres": "lscratch:64"
},
"concat_reads": {
"threads": 28,
"mem": "16G",
"partition": "norm",
"time": "1-00:00:00",
"gres": "lscratch:400"
},
"concat_rna_reads": {
"threads": 28,
"mem": "16G",
"partition": "norm",
"time": "1-00:00:00",
"gres": "lscratch:400"
},
"metawrap_read_qc": {
"threads": 8,
"mem": "16g",
"threads": 16,
"mem": "32G",
"partition": "norm",
"time": "0-04:00:00",
"gres": "None"
"time": "1-00:00:00",
"gres": "lscratch:400"
},
"rna_read_qc": {
"threads": 16,
"mem": "32G",
"partition": "norm",
"time": "1-00:00:00",
"gres": "lscratch:400"
},
"metawrap_genome_assembly": {
"threads": 24,
"mem": "128g",
"threads": 48,
"mem": "128G",
"partition": "norm",
"time": "2-00:00:00"
"time": "5-00:00:00"
},
"metawrap_tax_classification": {
"threads": 12,
"mem": "32g",
"partition": "quick",
"time": "0-04:00:00"
},
"metawrap_assembly_binning": {
"threads": 16,
"mem": "64g",
"threads": 32,
"mem": "64G",
"partition": "norm",
"time": "5-00:00:00"
},
"metawrap_binning": {
"threads": 32,
"mem": "64G",
"partition": "norm",
"time": "2-00:00:00"
},
"derep_bins": {
"threads": 32,
"mem": "32G",
"partition": "norm",
"time": "2-00:00:00"
}
Expand Down
4 changes: 2 additions & 2 deletions config/images.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"images": {
"metawrap": "docker://rroutsong/metamorph_metawrap:0.0.2",
"metawrap": "docker://rroutsong/metamorph_metawrap:0.0.4",
"metagenome": "docker://rroutsong/metamorph_metagenome:0.0.1"
},
"containers": {
"metawrap": "/data/OpenOmics/SIFs/metamorph_metawrap_1.3.2.sif",
"metawrap": "/data/OpenOmics/SIFs/metamorph_metawrap_0.0.4.sif",
"metagenome": "/data/OpenOmics/SIFs/metamorph_metagenome_0.0.1.sif"
}
}
32 changes: 21 additions & 11 deletions config/resources.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
{
"binds": [
"databases": [
{
"name": "KRAKEN_DB2",
"to": "$HOME/KRAKEN_DB2",
"from": "/data/OpenOmics/references/metamorph/kraken2/k2_pluspfp_08gb_20230605",
"mode": "ro"
"name": "KRAKEN2_DB",
"to": "/data2/KRAKEN_DB2",
"from": "/data/OpenOmics/references/metamorph/kraken2/k2_pluspfp_08gb_20240112",
"mode": "rw"
}, {
"name": "KRAKEN_DB",
"to": "$HOME/KRAKEN_DB",
"to": "/data2/KRAKEN_DB",
"from": "/data/OpenOmics/references/metamorph/kraken/20171019_minikraken_8GB",
"mode": "ro"
}, {
"name": "BMTAGGER_INDEX",
"to": "$HOME/BMTAGGER_DB",
"to": "/data2/BMTAGGER_DB",
"from": "/data/OpenOmics/references/metamorph/BMTAGGER/BMTAGGER_INDEX",
"mode": "ro"
}, {
"name": "BMTAGGER_INDEX",
"to": "$HOME/GTDBTK_DB",
"to": "/data2/GTDBTK_DB",
"from": "/data/OpenOmics/references/metamorph/GTDBtk/release207_v2",
"mode": "ro"
}, {
"name": "GUNC_DB",
"to": "$HOME/GUNC_DB",
"to": "/data2/GUNC_DB",
"from": "/data/OpenOmics/references/metamorph/GUNC/gunc_1.0.5db",
"mode": "ro"
}, {
"name": "NCBI_NT",
"to": "/data2/NCBI_NT_DB",
"from": "/data/OpenOmics/references/metamorph/NCBI_nt",
"mode": "rw"
}, {
"name": "NCBI_TAX",
"to": "/data2/NCBI_TAX_DB",
"from": "/data/OpenOmics/references/metamorph/taxonomy",
"mode": "rw"
}, {
"name": "CHECKM_DB",
"to": "$HOME/checkm",
"to": "/data2/CHECKM_DB",
"from": "/data/OpenOmics/references/metamorph/checkm",
"mode": "rw"
}, {
}, {
"name": "CHECKM_CONFIG",
"to": "/opt/conda/envs/metawrap-env/lib/python2.7/site-packages/checkm/DATA_CONFIG",
"from": "/data/OpenOmics/references/metamorph/checkm/DATA_CONFIG",
Expand Down
17 changes: 0 additions & 17 deletions docker/Dockerfile

This file was deleted.

23 changes: 23 additions & 0 deletions docker/metawrap/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM condaforge/miniforge3:latest
RUN apt-get update; apt-get install -y -qq curl build-essential vim dos2unix bash python2.7
RUN mamba create -y -n metawrap-env
RUN conda config --add channels defaults; conda config --add channels conda-forge; \
conda config --add channels bioconda;conda config --add channels ursky
RUN mamba install -y --only-deps -c ursky -n metawrap-env metawrap-mg==1.3.2
RUN cd /home; git clone https://github.com/rroutsong/metaWRAP.git; chmod -R 777 metaWRAP
RUN mamba run -n metawrap-env pip3 install drep
ENV PATH="/home/metaWRAP/bin:/opt/conda/envs/metawrap-env/bin:$PATH"
COPY docker/metawrap/config-metawrap /home/metaWRAP/bin/config-metawrap
COPY docker/metawrap/Dockerfile /Dockerfile
RUN mkdir /install; cd /install; wget https://carlowood.github.io/which/which-2.21.tar.gz; tar xvf which-2.21.tar.gz
RUN cd /install/which-2.21; ./configure; make && make install
RUN rm /usr/bin/which; ln -s /usr/local/bin/which /usr/bin/which
RUN md5sum Dockerfile > /Dockerfile.md5
ADD docker/metawrap/mw /home/metaWRAP/bin/mw
RUN dos2unix /home/metaWRAP/bin/config-metawrap
RUN dos2unix /home/metaWRAP/bin/mw
RUN chmod a+rx /home/metaWRAP/bin/config-metawrap /home/metaWRAP/bin/mw
ENV BASH_ENV="/etc/bash.bashrc"
RUN echo ". /opt/conda/etc/profile.d/conda.sh && conda activate metawrap-env" >> /etc/bash.bashrc
RUN echo 'export PATH="/home/metaWRAP/bin:/opt/conda/envs/metawrap-env/bin:$PATH"' >> /etc/bash.bashrc
ENTRYPOINT ["/bin/bash"]
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
#!/bin/bash
# Paths to custon pipelines and scripts of metaWRAP
mw_path=$(which metawrap)
bin_path=${mw_path%/*}
SOFT=${bin_path}/metawrap-scripts
PIPES=${bin_path}/metawrap-modules

# OPTIONAL databases (see 'Databases' section of metaWRAP README for details)
# path to kraken standard databases
KRAKEN_DB=~/KRAKEN_DB
KRAKEN2_DB=~/KRAKEN_DB2

KRAKEN_DB=/data2/KRAKEN_DB
KRAKEN2_DB=/data2/KRAKEN_DB2
# path to indexed human (or other host) genome (see metaWRAP website for guide). This includes .bitmask and .srprism files
BMTAGGER_DB=~/BMTAGGER_DB

BMTAGGER_DB=/data2/BMTAGGER_DB
# paths to BLAST databases
BLASTDB=~/NCBI_NT_DB
TAXDUMP=~/NCBI_TAX_DB

BLASTDB=/data2/NCBI_NT_DB
TAXDUMP=/data2/NCBI_TAX_DB
1 change: 0 additions & 1 deletion docker/metawrap/docker_1.3.0

This file was deleted.

18 changes: 0 additions & 18 deletions docker/metawrap/docker_1.3.2

This file was deleted.

5 changes: 5 additions & 0 deletions docker/metawrap/mw
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set +eu
source /etc/bash.bashrc
/home/metaWRAP/bin/metawrap "$@"
set -eu
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ tornado==6.0.4
tqdm==4.48.2
zipp==3.1.0
mkdocs-git-revision-date-plugin
mkdocs-snakemake-rule-plugin
mike
Loading

0 comments on commit e5fc0b9

Please sign in to comment.