Note: At this point in time, biopython needs to be installed manually.
Installing using source code
git clone https://gitlab.com/jkerkvliet/metamobilepicker.git
cd metamobilepicker
pip install .
Note: For running the pipeline, you will need Singularity (v3.8 or later) installed on your system.
Testing the Pipeline
Technical test
After installation, the fastest way to test the installation is to use the included test data. This dataset consists of 5.000 reads and should run relatively fast.
To test the pipeline, run the following commands:
metamobilepicker run --test --dryrun
If this doesn’t give any errors, run the pipeline with the following command
metamobilepicker run --test
If this is the first run of the pipeline, it will create the appropriate conda environments and download the used containers, which can take a while.
Testing a run from scratch
To make sure everything is working as intended, you can create a new run using the same test data.
Config files
MetaMobilePicker is a Snakemake pipeline that works with YAML config files. The easiest way is to let MetaMobilePicker generate it’s own config file. Before we can do this, we need to make the samples file. This comma seperated file contains your samples and the paths to the paired end reads.
Before we make the config file, copy the test reads to a location where you can easily locate them.
In your prefered directory run the following commands:
mkdir mmp_data
cp {PATH TO REPOSITORY}/MetaMobilePicker/test/test_reads_R1.fastq mmp_data
cp {PATH TO REPOSITORY}/MetaMobilePicker/test/test_reads_R2.fastq mmp_data
mkdir mmp_test_output # Our output files will go here
Now we can create our samples.txt file to look like this
This should give you a file in the current directory called test_config.yaml that contains all the information we need to run MetaMobilePicker.
Next, to test the installation of the pipeline, run the following command:
metamobilepicker run -c test_config.yaml --dryrun
If this doesn’t give errors, go ahead and run
metamobilepicker run -c test_config.yaml
Output data
After running MetaMobilePicker, all results will be in the mmp_test_output directory we specified in the config file.
Your directory should look something like this:
$ ls mmp_test_output
docs testsample testsample_ATLAS_tmp processed_fastq
The end results are in the testsample directory. Within this directory, there’s subdirectories for the annotation part, the ATLAS QC part, the MetaSPAdes assembly and the (most importantly) MGE identification part.
Within the MGEs directory, the most elaborate output file is testsample_MetaMobilePicker.out. Opening this file should show something like this:
This shows we found two contigs containing one or more MGE. The first contig is predicted to be a phage, the second is predicted as a plasmid. Additionally, the second contig contains two insertion sequences and six ARGs.
This file has information on all contigs containing at least one MGE. The file is according to the YML format and can be parsed as such. Additionally (soon) a fasta file containing only those contigs containing MGEs is provided in the results folder.
Snakemake profiles
If you have an HPC available, install a snakemake profile for your specific job submission software, and run the following command to have snakemake submit the jobs to the HPC:
metamobilepicker run --profile [name of slurm profile]
Other options
In the events of a failing pipeline, the directory can get locked. Use the following command before retrying:
metamobilepicker run --unlock
If you wish to run the pipeline with more cores than the default of 1 without running on an HPC, you can add them using the ‘–cores [cores]’ option.
MetaMobilePicker
Version 0.7.2
Pipeline identifying MGEs in metagenomic data
Workflow
MetaMobilePicker identifies Mobile Genetic Elements (MGEs) in metagenomics reads. To do this the following tools are run:
The full documentation can be found at metamobilepicker.nl
Installation
The best way to install MetaMobilePicker is inside a conda environment. Create a new conda environment using the command:
Installing using mamba (recommended)
Next, install MetaMobilePicker using the following command
Note: At this point in time, biopython needs to be installed manually.
Installing using source code
Note: For running the pipeline, you will need Singularity (v3.8 or later) installed on your system.
Testing the Pipeline
Technical test
After installation, the fastest way to test the installation is to use the included test data. This dataset consists of 5.000 reads and should run relatively fast. To test the pipeline, run the following commands:
If this doesn’t give any errors, run the pipeline with the following command
If this is the first run of the pipeline, it will create the appropriate conda environments and download the used containers, which can take a while.
Testing a run from scratch
To make sure everything is working as intended, you can create a new run using the same test data.
Config files
MetaMobilePicker is a Snakemake pipeline that works with YAML config files. The easiest way is to let MetaMobilePicker generate it’s own config file. Before we can do this, we need to make the samples file. This comma seperated file contains your samples and the paths to the paired end reads.
Before we make the config file, copy the test reads to a location where you can easily locate them. In your prefered directory run the following commands:
Now we can create our samples.txt file to look like this
Save this file as samples.txt for now. Next, we generate the config file:
This should give you a file in the current directory called test_config.yaml that contains all the information we need to run MetaMobilePicker. Next, to test the installation of the pipeline, run the following command:
If this doesn’t give errors, go ahead and run
Output data
After running MetaMobilePicker, all results will be in the mmp_test_output directory we specified in the config file. Your directory should look something like this:
The end results are in the testsample directory. Within this directory, there’s subdirectories for the annotation part, the ATLAS QC part, the MetaSPAdes assembly and the (most importantly) MGE identification part. Within the MGEs directory, the most elaborate output file is
testsample_MetaMobilePicker.out. Opening this file should show something like this:This shows we found two contigs containing one or more MGE. The first contig is predicted to be a phage, the second is predicted as a plasmid. Additionally, the second contig contains two insertion sequences and six ARGs.
This file has information on all contigs containing at least one MGE. The file is according to the YML format and can be parsed as such. Additionally (soon) a fasta file containing only those contigs containing MGEs is provided in the results folder.
Snakemake profiles
If you have an HPC available, install a snakemake profile for your specific job submission software, and run the following command to have snakemake submit the jobs to the HPC:
Other options
In the events of a failing pipeline, the directory can get locked. Use the following command before retrying:
If you wish to run the pipeline with more cores than the default of 1 without running on an HPC, you can add them using the ‘–cores [cores]’ option.
Visual overview