08_BINNING - eolesin/AMOR_Indiv_Assembly_Protocol GitHub Wiki
first three done on SAGA, dastool used on kjempefuru when the driver wouldn't function properly without more resources I couldn't figure out how to properly allocate.
#!/usr/bin/bash
# every job must be accounted for
#SBATCH --account=nn9836k
#SBATCH --job-name=<assembly>
# every job requires some specification of the number of cores to be used
#SBATCH --ntasks=1
# every job requires some specification of the memory (RAM) it needs
#SBATCH --cpus-per-task=20
#SBATCH --mem-per-cpu=5G
# every job requires a runtime limit
#SBATCH --time=10:00:00
# setting up software environment
module purge
# load the conda version
module load Miniconda3/4.9.2
# Set the ${PS1} (needed in the source of the Anaconda environment)
export PS1=\$
# Source the conda environment setup
# The variable ${EBROOTANACONDA3} or ${EBROOTMINICONDA3}
# So use one of the following lines
# comes with the module load command
# source ${EBROOTANACONDA3}/etc/profile.d/conda.sh
source ${EBROOTMINICONDA3}/etc/profile.d/conda.sh
# Deactivate any spill-over environment from the login node
conda deactivate &>/dev/null
# Activate the environment by using the full path (not name)
# to the environment. The full path is listed if you do
# conda info --envs at the command prompt.
conda activate /cluster/projects/nn9836k/conda_envs/anvio
# set up paths
ASSEMBLY_PATH="/cluster/projects/nn9836k/Metagenomics_AMOR_2020/04_CONTIGS"
MERGED_PROFILE_PATH="/cluster/projects/nn9836k/Metagenomics_AMOR_2020/07_MERGED_PROFILES"
anvi-cluster-contigs -c ${ASSEMBLY_PATH}/<assembly>/<assembly>.prefixed.contigs.db \
-p ${MERGED_PROFILE_PATH}/<assembly>-MERGED-PROFILE/PROFILE.db -C concoct -T 20 --driver concoct \
--just-do-it; anvi-cluster-contigs -c ${ASSEMBLY_PATH}/<assembly>/<assembly>.prefixed.contigs.db \
-p ${MERGED_PROFILE_PATH}/<assembly>-MERGED-PROFILE/PROFILE.db -C metabat2 -T 20 --driver metabat2 \
--just-do-it; anvi-cluster-contigs -c ${ASSEMBLY_PATH}/<assembly>/<assembly>.prefixed.contigs.db \
-p ${MERGED_PROFILE_PATH}/<assembly>-MERGED-PROFILE/PROFILE.db -C maxbin2 -T 20 --driver maxbin2 \
--just-do-it
And find the "optimal" bins using DasTool.
for i in `cat AMOR_2020_Good`; do anvi-cluster-contigs -c ${ASSEMBLY_PATH}/${i}/${i}.prefixed.contigs.db \
-p ${MERGED_PROFILE_PATH}/${i}-MERGED-PROFILE/PROFILE.db -C dastool -T 60 --driver dastool \
-S concoct,metabat2,maxbin2 --just-do-it; done