MoMofy: Module for integrative Mobilome prediction

public public 1yr ago Version: Version 1 0 bookmarks

Module for integrative Mobilome prediction

Bacteria can acquire genetic material through horizontal gene transfer, allowing them to rapidly adapt to changing environmental conditions. These mobile genetic elements can be classified into three main categories: plasmids, phages, and integrons. Autonomous elements are those capable of excising themselves from the chromosome, reintegrating elsewhere, and potentially modifying the host's physiology. Small integrative elements like insertion sequences usually contain one or two genes and are frequently present in multiple copies in the genome, whereas large elements like integrative conjugative elements, often carry multiple cargo genes. The acquisition of large mobile genetic elements may provide genes for defence against other mobile genetic elements or impart new metabolic capabilities to the host.

MoMofy is a wraper that integrates the ouptput of different tools designed for the prediction of autonomous integrative mobile genetic elements in prokaryotic genomes and metagenomes.

Code Snippets

21
22
23
24
25
26
27
28
29
30
31
"""
diamond blastp -q proteins.faa \
--db ${diamond_db} \
--outfmt 6 stitle qtitle pident bitscore slen evalue qlen sstart send qstart qend \
-k 15 \
-o blastp_out.tsv \
-e 1e-20 \
--query-cover 90 \
--id 90 \
--threads ${task.cpus}
"""
33
34
35
36
        """
	echo 'No input files for diamond... generating dummy files'
        touch blastp_out.tsv
        """
26
27
28
29
30
31
32
33
34
35
36
        """    
        gbk_splitter.pl contigs.gbk

	if -s input.list
	then
	    echo 'The file is not empty'
	else
            echo 'No contigs of size > 5kb ... generating dummy files'
            touch dummy.gbk
        fi
        """
38
39
40
41
42
"""
echo 'ICEfinder dir empty due to empty input... generating dummy files'
touch input.list
touch dummy.gbk
"""
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        """
        cd /install/ICEfinder_linux/ && perl ./ICEfinder_local.pl input.list

        if ls -ld result/contig* 2>/dev/null | grep -q .
        then
	    cat result/*/DNA_*.fas > result/icf_concat.fasta 
            cat result/*/*summary.txt > result/icf_concat.summary
            grep 'DR:' result/*/ICE* > result/icf_dr.txt
        else
            echo 'ICEfinder found 0 ICE/IME in assembly... generating dummy files'
	    touch result/icf_concat.summary
	    touch result/icf_concat.fasta
            touch result/icf_dr.txt
        fi
        """
47
48
49
50
51
52
        """
        echo 'No input files for ICEfinder... generating dummy files'
	touch result/icf_concat.summary
	touch result/icf_concat.fasta
        touch result/icf_dr.txt
        """
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    	"""    
    	mge_integrator.py --user 'T' \
    	--cds_gff ${cds_gff} \
    	--map ${mapping_file} \
    	--iss_fa ${iss_fasta} \
    	--iss_tsv ${iss_table} \
    	--pal_fa ${pal_fasta} \
    	--pal_tsv ${pal_table} \
    	--inf_tsv ${inf_table} \
    	--inf_gbks ${inf_list.join(' ')} \
    	--icf_tsv ${icf_table} \
    	--icf_fa ${icf_fasta} \
    	--icf_lim ${icf_dr} \
    	--mog_tsv ${mog_table}
	"""
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	"""
	mge_integrator.py --user 'F' \
        --cds_gff ${cds_gff} \
        --map ${mapping_file} \
        --iss_fa ${iss_fasta} \
        --iss_tsv ${iss_table} \
        --pal_fa ${pal_fasta} \
        --pal_tsv ${pal_table} \
        --inf_tsv ${inf_table} \
        --inf_gbks ${inf_list.join(' ')} \
        --icf_tsv ${icf_table} \
        --icf_fa ${icf_fasta} \
        --icf_lim ${icf_dr} \
        --mog_tsv ${mog_table}
	"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
        """
        integron_finder --union-integrases \
        --mute \
        --local-max \
        --cpu ${task.cpus} \
        --func-annot \
        --gbk \
        contigs.fasta

	if ls -l Results_Integron_Finder_contigs/contig_*.gbk 2>/dev/null | grep -q .
        then
	    echo 'IntegronFinder outputs complete'
        else
            echo 'IntegronFinder found 0 integrons in assembly... generating dummy files'
            touch Results_Integron_Finder_contigs/contig_dummy.gbk
        fi
        """
41
42
43
44
45
46
"""
echo 'IntegronFinder dir empty due to empty input... generating dummy files'
mkdir Results_Integron_Finder_contigs
touch Results_Integron_Finder_contigs/contigs.summary
touch Results_Integron_Finder_contigs/contig_dummy.gbk
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
        """
        isescan.py --seqfile contigs.fasta \
        --output isescan_results \
        --nthread ${task.cpus}

        if ls -l isescan_results/contigs.fasta.tsv 2>/dev/null | grep -q .
        then
            echo 'ISEScan results exists'
        else
	    echo 'ISEScan found 0 insertion sequences in input file... generating dummy files'
            touch isescan_results/contigs.fasta.is.fna
            touch isescan_results/contigs.fasta.tsv
        fi
        """
38
39
40
41
42
43
        """
	echo 'ISEScan is not running due to empty input... generating dummy files'
        mkdir isescan_results
	touch isescan_results/contigs.fasta.is.fna
        touch isescan_results/contigs.fasta.tsv
        """
24
25
26
27
28
29
30
"""
prokka --outdir prokka_out \
--prefix contigs \
--cpus ${task.cpus} \
--metagenome \
contigs.fasta
"""
32
33
34
35
36
"""
echo 'PROKKA dir empty due to empty input... generating dummy files'
mkdir prokka_out
touch prokka_out/contigs.gbk
"""
20
21
22
"""    
assembly_filter_rename.py --assembly contigs.fasta
"""
15
16
17
        """
	gt gff3validator momofy_predictions.gff
        """
ShowHide 12 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/EBI-Metagenomics/momofy.git
Name: momofy-module-for-integrative-mobilome-prediction
Version: Version 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: Boost Software License 1.0
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...