dib-lab / dib_rotation

Metagenomics DIB-lab rotation project
https://dib-lab.github.io/dib_rotation/
BSD 3-Clause "New" or "Revised" License
3 stars 8 forks source link

replace kofamscan with eggnog #17

Open taylorreiter opened 4 years ago

taylorreiter commented 4 years ago

Or add eggnog as a separate module. I think eggnog is probably more widely used, and it is definitely more user friendly. I'm not sure that eggnog does an hmm search though, so kofamscan may still be a good option for e.g. environmental metagenomes etc.

Some code for how to run eggnog

rule eggnog_multifasta_query_genes:
    input:
        faa = "outputs/gather_matches_loso_multifasta/all-multifasta-query-results.faa",
        db = "inputs/eggnog_db/eggnog.db"
    output: "outputs/gather_matches_loso_multifasta/all-multifasta-query-results.emapper.annotations"
    params:
        cpus = 8, 
        outdir = "outputs/gather_matches_loso_multifasta/",
        dbdir = "inputs/eggnog_db",
        out_prefix = "all-multifasta-query-results"
    conda: 'envs/eggnog.yml'
    shell:'''
    emapper.py --cpu {params.cpus} -i {input.faa} --output {params.out_prefix} --output_dir {params.outdir} \
                           -m diamond -d none --tax_scope auto --go_evidence non-electronic --target_orthologs all \
                           --seed_ortholog_evalue 0.001 --seed_ortholog_score 60 --query-cover 20 --subject-cover 0 \
                           --override --temp_dir tmp/ -d bact --data_dir {params.dbdir}
    '''