Usageο
Installationο
βοΈ To use AMPcombi, first install it via any of the three options:
Using conda with correctly set-up bioconda channel (see Bioconda usage docs):
conda create -n ampcombi python==3.11 mmseqs2==15.6f452 ampcombi
or
conda env create -f environment.yml
Using singularity or docker:
singularity pull ampcombi:3.0.0--pyhdfd78af_0
Clone GitHub repository:
git clone https://github.com/paleobiotechnology/AMPcombi.git
π For full parameter list and usage documentation of AMPcombi and its submodules, please refer to the CLI help message accessed by:
ampcombi --help
Submodulesο
parse_tablesο
The parse_tables submodule is used to parse and filter the output files generated by the different AMP prediction tools described in About.
It further aligns the amino acid sequences to different reference databases to grab structural and functional metadata for similar AMPs.
Additionally, the physiochemical properties of the entire prepropeptide sequence of the recovered AMP hits are estimated.
One of three reference databases (DRAMP, APD, or UniRef100) can be chosen to via the --amp_database parameter, with DRAMP set as the default. The database will be auto-downloaded if not provided by the --amp_database_dir parameter.
Note
A pre-downloaded or custom database can be provided using the flag --amp_database_dir with the path to the database folder (e.g. --amp_database_dir ./ref_database/).
π‘ The folder must contain the database in fasta format with file extension *.fasta and the parameter --amp_database still needs to be set to the correct database (DRAMP, APD, or UniRef100).
We have set default values for many filtering parameters as we saw fit for most use cases. However, feel free to adjust them to your dataset-specific thresholds.
To get a full list of available options and their default values please refer to the help documentation of the parse_tables submodule:
ampcombi parse_tables --help
Example Usage (1)
ampcombi parse_tables \
--amp_results path/to/my/result_folder/ \ # required
--faa path/to/sample_faa_files/ \ # required
--gbk path/to/sample_gbk_or_gbff_files/ \ # required
--interproscan_output path/to/interproscan_files \ # optional
--sample_list sample_1 sample_2 \ # required
--contig_metadata path/to/contig_metadata.tsv \ # optional
--amp_database 'DRAMP' \
--<tool_1>_file '.tsv' \
--<tool_2>_file '.txt' \
--log \
--threads 10
Explanation of parameters:
--amp_resultsIn this case, we use the
--amp_resultsoption to supply AMP prediction tool results from many samples in a folder format. The folder must follow this structure:amp_results/ βββ tool_1/ β βββ sample_1/ β β βββ sample_1.tsv β βββ sample_2/ β βββ sample_2.tsv βββ tool_2/ β βββ sample_1/ β β βββ sample_1.txt β βββ sample_2/ β βββ sample_2.txt βββ tool_3/ βββ sample_1/ β βββ sample_1.fasta βββ sample_2/ βββ sample_2.fasta
--<tool>_fileThe
<tool>should be changed to one of the following:ampir,macrel,amplify,neubi,hmmsearch,ensemblamppred,ampgram,amptransformer. The argument value should be a suffix of the files generated by that tool, e.g.'.tsv'. Defaults are assigned for each tool, but the user can change these defaults according to their input file extensions. An example of the input files can be found here.--contig_metadataA TSV file that must contain the sample name in the first column and the contig ID/name in the second column. Note: Column headers will be overwritten. An example of the input file can be found here.
--faaA folder containing annotated files of the AMP hits with the suffix
*.faa. This can be generated by any annotation tool (e.g., Prokka or Pyrodigal). Note: The files must include the sample name, for example,<samplename>.faa. An example of the input file can be found here.--gbkA folder containing annotated files of the AMP hits with the suffix
*.gbkor*.gbff. This can be generated by any annotation tool (e.g., Prokka or Pyrodigal). Note: The files must include the sample name, for example,<samplename>.gbkor<samplename>.gbff. An example of the input file can be found here.--amp_databaseThe database used for AMP prediction. Can either be
'DRAMP','APD', or'UniRef100'.--interproscan_outputA path to a directory or file that contains the results generated by running InterProScan on the annotated sequences (
*.faa). Note: The file names must match<sample_name>.tsv. Additionally, coding sequences classified as βribosomal proteinsβ can be filtered out using:--interproscan_filter 'ribosomal proteins,ribosomal', which is done by default. An example of the input file can be found here. An example of how to run InterProScan to prepare the files is provided in Test runs.
Example Usage (2)
ampcombi parse_tables \
--path_list <path/to/sample_1_tool_1>.csv <path/to/sample_1_tool_2>.txt \
--sample_list sample_1 \
--faa path/to/sample_faa_files/sample_1.faa \
--gbk path/to/sample_gbk_or_gbff_files/sample_1.<gbk,gbff> \
--<tool_1>_file '.tsv' \
--<tool_2>_file '.txt'
Explanation of parameters:
--path_listIn this case, we use the
--path_listoption to supply AMP prediction tool results from a single sample in a list format.
Some optional parameters that can be tweaked:
Parameter |
Description |
Default |
Different example value |
|---|---|---|---|
|
Probability cutoff to filter AMPs by probability (not applicable for hmmsearch) |
0.0 |
0.5 |
|
Probability cutoff to filter AMPs by E-value (only applicable for hmmsearch) |
None |
0.05 |
|
Probability cutoff to filter database classifications by E-value - any hit with an E-value below this will have its database classification removed |
None |
0.05 |
|
Probability cutoff to filter AMP hits by the length of the amino acid sequence |
100 |
60 |
|
The length of the window size required to look for stop codons downstream and upstream of the CDS hits |
60 |
40 |
|
The length of the window size required to look for a βtransporterβ e.g. ABC transporter downstream and upstream of the CDS hits |
11 |
20 |
|
Removes all AMP hits that donβt have a stop codon found in the window downstream or upstream of the CDS assigned by |
False |
True |
|
Path to a tsv-file containing sample metadata, e.g. |
None |
./sample_metadata.tsv/ |
|
Path to a tsv-file containing contig metadata, e.g. |
None |
./contig_metadata.tsv/ |
|
Write a GBK file to disk containing contigs of filtered AMPs (e.g. if they include stop codons and transporter proteins in the vicinity). File name: |
None |
None |
|
A comma-separated list of all keywords that describe the protein that is not required in the analysis. |
βribosomal protein,ribosomal proteins,ribosome protein,ribosomal rna,Ribosomal protein,RIBOSOMAL PROTEINβ |
β16Sβ |
Output
The output will be written into your working directory, containing the following files and folders:
<pwd>/
βββ amp_DRAMP_database/
β βββmmseqs2
β β βββ ref_DB
β β βββ ref_DB_h
β β βββ ref_DB_h.dbtype
β β βββ ref_DB_h.index
β β βββ ref_DB.dbtype
β β βββ ref_DB.index
β β βββ ref_DB.lookup
β β βββ ref_DB.source
β βββ general_amps_<Date>_clean.fasta
β βββ general_amps_<Date>.tsv
βββ sample_1/
β βββ sample_1_filtered_AMP_contigs.gbk
β βββ sample_1_amp.faa
β βββ sample_1_ampcombi.tsv
β βββ sample_1_mmseqs_matches.txt
β βββ sample_1_ampcombi.log
βββ sample_2/
β βββ sample_2_filtered_AMP_contigs.gbk
β βββ sample_2_amp.faa
β βββ sample_2_ampcombi.tsv
β βββ sample_2_mmseqs_matches.txt
β βββ sample_2_ampcombi.log
βββ Ampcombi_parse_tables.log
completeο
The complete submodule allows AMPcombi to be integrated in portable pipelines (e.g. nf-core/funcscan that can screen (meta)genome sequences with muliple tools simultaneously).
The complete submodule takes in as input the output from parse_tables to combine all sample tables into one final TSV file.
To get a full list of options available and their default values please refer to the help documentation of the submodule:
ampcombi complete --help
Example Usage (1)
ampcombi complete \
--summaries_directory path/to/ampcombi_parse_tables_results_folder/
In this case we use the βsummaries_directory option to supply the samplesβ result folder from βampcombi parse_tables, which should contain the folder structure from ampcombi parse_tables in a parent folder, for example named ./ampcombi/β¦.
Example Usage (2)
ampcombi complete \
--summaries_files path/to/ampcombi_parse_tables/sample_1_ampcombi.tsv path/to/ampcombi_parse_tables/sample_2_ampcombi.tsv/
In this case we use the βsummaries_files option to supply the ampcombi_parse_tables AMPcombi summary files in a list format.
Output
The output will be written into your working directory, containing the following files:
<pwd>/
βββ Ampcombi_summary.tsv
βββ Ampcombi_complete.log
Description of columns in Ampcombi_summary.tsv:
Column |
Description |
|---|---|
|
Sample ID as given by the user in |
|
ID of the coding sequence (CDS) as annotated in input GBK file |
|
Probability of correct AMP prediction as given by AMPlify (value range 0-1) |
|
Probability of correct AMP prediction as given by ampir (value range 0-1) |
|
Probability of correct AMP prediction as given by Macrel (value range 0-1) |
|
Amino-acid sequence of the annotated AMP |
|
Accession number(s) as provided by the optional InterProScan results files |
|
Protein description as provided by the optional InterProScan results files |
|
InterProScan accession number(s) as provided by the optional InterProScan results files |
|
Additional protein description as provided by the optional InterProScan results files |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): ID of the coding sequence (is redundant with |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): ID of the target sequence in reference database |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): E-value of the alignment by MMseqs2 |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Percent of identical matches by MMseqs2 |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Number of identical matches by MMseqs2 |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Target amino acid sequence length |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): 1-indexed alignment start position in target sequence |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): 1-indexed alignment end position in target sequence |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Alignment sequence (amino acids, gaps) |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): ID of the target sequence in reference database (is redundant with |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Alignment length |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Fraction of coverage of the query sequence |
|
If AMP hit was found in reference database (DRAMP, APD, or UniRef100): Fraction of coverage of the target sequence |
|
If AMP hit was found in DRAMP database: ID of the target sequence in reference database (is redundant with |
|
If AMP hit was found in DRAMP database: Target sequence |
|
If AMP hit was found in DRAMP database: Target protein name |
|
If AMP hit was found in DRAMP database: Target protein UniProt/Swiss-Prot ID (if available) |
|
If AMP hit was found in DRAMP database: Protein family information (if available) |
|
If AMP hit was found in DRAMP database: Associated gene (if available) |
|
If AMP hit was found in DRAMP database: Biological or synthetic source of the reference hit (if available) |
|
If AMP hit was found in DRAMP database: Protein Data Bank ID (if available) |
|
If AMP hit was found in DRAMP database: More information on the target organism (if available) |
|
Molecular weight as identified by Biopython (ProteinAnalysis) |
|
Fraction of amino acids in helix secondary structure as identified by Biopython (ProteinAnalysis) |
|
Fraction of amino acids in turn secondary structure as identified by Biopython (ProteinAnalysis) |
|
Fraction of amino acids in beta sheet secondary structure as identified by Biopython (ProteinAnalysis) |
|
Isoelectric point as identified by Biopython (ProteinAnalysis) |
|
Hydrophobicity as identified by Biopython (ProteinAnalysis) |
|
Presence or absence of transporter protein in the genomic vicinity of the AMP |
|
Contig ID of the AMP |
|
AMP CDS start position on contig |
|
AMP CDS end position on contig |
|
Forward or reverse AMP CDS on contig |
|
DNA sequence of stop codon in the vicinity of the AMP CDS if present |
clusterο
The cluster submodule clusters the output from complete (i.e., Ampcombi_summary.tsv) into subclasses of similar AMP families.
This relies primarily on MMSeqs2 cluster v.15.6f452.
Only some parameters that were deemed important for the purpose of AMPcombi were incorporated as optional arguments.
To get a full list of available options and their defaults please refer to the help documentation of the submodule:
ampcombi cluster --help
Example Usage
ampcombi cluster \
--ampcombi_summary path/to/Ampcombi_summary.tsv
The --ampcombi_summary parameter takes the output of ampcombi complete (i.e. the summary file Ampcombi_summary.tsv).
Some optional parameters that can be tweaked:
Parameter |
Description |
Default |
Different example value |
|---|---|---|---|
|
This assigns the coverage mode to the mmseqs2 cluster module. More information can be obtained in mmseqs2 docs here. |
0 |
2 |
|
This assigns the cluster mode to the mmseqs2 cluster module. More information can be obtained in mmseqs2 docs here. |
1 |
2 |
|
This assigns the coverage to the mmseqs2 cluster module. More information can be obtained in mmseqs2 docs here. |
0.8 |
0.9 |
|
This assigns the sequence identity to the mmseqs2 cluster module. More information can be obtained in mmseqs2 docs here. |
0.4 |
0.7 |
|
This assigns sensitivity of alignment to the mmseqs2 cluster module. More information can be obtained in mmseqs2 docs here. |
4.0 |
7.0 |
|
This keeps any hits that did not form a cluster. |
False |
True |
|
This retains only clusters that have a certain label in the sample name. For example, if you have sample labels with βS1_metaspadesβ and βS1_megahitβ, you can retain clusters that have samples with suffix β_megahitβ by running |
ββ |
βmegahitβ |
|
This removes any cluster that has a hit number lower than assigned here. |
3 |
1 |
Output
The output will be written into your working directory, containing the following files:
<pwd>/
βββ Ampcombi_summary_cluster.tsv
βββ Ampcombi_summary_cluster_representative_seq.tsv
βββ Ampcombi_cluster.log
Ampcombi_summary_cluster.tsvincludes the contents of the complete summary (Ampcombi_summary.tsv) plus two additional columns:seq_headers: Sequence header of the representative AMP of the clustercluster_id: ID of the cluster to which the AMP belongs
Ampcombi_summary_cluster_representative_seq.tsv:This file contains a short summary of the identified clusters, i.e. the header of their representative AMP sequence (
seq_headers), the cluster ID (index), and the size of the cluster (total_cluster_members).Clusters of interest can be investigated in further detail in the comprehensive summary file
Ampcombi_summary_cluster.tsvdescribed above.
signal_peptideο
The signal_peptide submodule predicts whether a signal peptide was found on the filtered and clustered AMP hits.
This only works if the user installs SignalP separately.
SignalP may only be downloaded and used by academic users according to its license; other users are requested to contact DTU Health Technology Software Package before using it.
For further details about the usage of SignalP please refer to their documentation.
To get a full list of options available and their default values please refer to the help documentation of the submodule:
ampcombi signal_peptide --help
Example Usage
ampcombi signal_peptide \
--signalp_model path/to/signalp_model/ \
--ampcombi_cluster path/to/Ampcombi_summary_cluster.tsv \
--log
The --ampcombi_cluster parameter takes the output of ampcombi complete or ampcombi cluster (i.e. the file Ampcombi_summary.tsv or Ampcombi_cluster.tsv).
Output
The output will be written into your working directory, containing the following files:
<pwd>/
βββ Ampcombi_summary_cluster_SP.tsv
βββ Ampcombi_summary_cluster_SP_onlyclusterswithSP.tsv
βββ signalp/
| βββ output_*.png
| βββ prediction_results_index.tsv
| βββ prediction_results.tsv
| βββ representative_seq.txt
βββ Ampcombi_signalpeptide.log
Ampcombi_summary_cluster_SP.tsvincludes the contents of the cluster summary plus a column with yes/no indicating the presence or absence of a signal peptide sequence.Ampcombi_summary_cluster_SP_onlyclusterswithSP.tsvincludes the contents of the cluster summary plus a column with yes/no indicating the presence or absence of a signal peptide sequence. In this case clusters are retained only if they contain a hit or more with a signaling peptide.signalpdirectory containing the results from the tool SignalP in PNG format showing the location of the predicted signaling peptide.prediction_results.tsvcontains a table with the location of the signaling peptide and the identity.prediction_results_index.tsvcontains a table that gives an index number to every hit found in./AMPcombi_summary_ao_human_nonhuman_clusters_SP_onlyclusterswithSP.tsv.This can be used to rename the files generated by running LocalColabFold on the AMP cluster representatives found in
Ampcombi_summary_cluster_representative_seq.tsvfor further downstream analysis on the secondary structure.