Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add support for eggnog-mapper #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,38 @@ rule binningVis:
rm Rplots.pdf
"""

rule eggnog_mapper:
input:
f'{config["path"]["root"]}/final_mags/'
output:
directory(f'{config["path"]["root"]}/emapper/')
benchmark:
f'{config["path"]["root"]}/{config["folder"]["benchmarks"]}/{{IDs}}.eggnog_mapper.benchmark.txt'
message:
"""
batch process small number of genomes with eggnog mapper, make sure you have downloaded and
configured the eggnog database path, assumes that you have ORF annotated protein fasta files
(e.g. translated from DNA using prodigal) in final_mags folder, then will loop through each
faa file and run eggnog to produce gene annotations files, Warning: this can take a few
minutes and load up to 45GB to RAM
"""

shell:
"""
# Activate eggnog environment
set +u;source activate eggnog6;set -u;

cd {input}
mkdir -p {output}

while read protein;do
mkdir -p tmp;
emapper.py -m diamond -i $protein -o ${protein%.*} --cpu 18 --dbmem --excel --scratch_dir tmp;
mv *.emapper.* {output}
rm -r tmp;
done< <(ls|grep faa)
"""

rule abundance:
input:
bins = f'{config["path"]["root"]}/{config["folder"]["reassembled"]}/{{IDs}}/reassembled_bins',
Expand Down