Skip to content

Options for using mercat2

Ivy Mateos-Guevara edited this page May 31, 2024 · 1 revision

Usage

These are the different options that can be used with mercat2.py

usage: mercat2.py [-h] [-i I [I ...]] [-f F] -k K [-n N] [-c C] [-prod] [-fgs] [-s S] [-o O] [-replace] [-lowmem LOWMEM] [-skipclean] [-toupper] [-pca] [--version]

Example: mercat2.py -h

Options: Description
-h, --help Shows this help message and exit
-i I [I ...] Path to input file(s)
-f F Path to folder containing input files
-k K kmer length
-n N No of cores [auto detect]
-c C Minimum kmer count [10]
-prod Run Prodigal on fasta files
-fgs Run FragGeneScanRS on fasta files
-s S Split into x MB files. [100]
-o O Output folder, default = 'mercat_results' in current directory
-replace Replace existing output directory [False]
-lowmem LOWMEM Flag to use incremental PCA when low memory is available. [auto]
-skipclean Skip trimming of fastq files
-toupper Convert all input sequences to uppercase
-pca Create interactive PCA plot of the samples (minimum of 4 fasta files required)
--version, -v Show the version number and exit

Mercat2 assumes the input file format based on the extension provided

  • Raw fastq file: ['.fastq', '.fq']

  • Nucleotide fasta: ['.fa', '.fna', '.ffn', '.fasta']

  • Amino acid fasta: ['.faa']

  • It also accepts gzipped versions of these filetypes with the added '.gz' suffix

Usage examples

These are different ways MerCat2 can be implemented, running on samples based the following

Type Script
Protein file (protein fasta - '.faa') mercat2.py -i file-name.faa -k 3 -c 10
Nucleotide file (nucleotide fasta - '.fa', '.fna', '.ffn', '.fasta') mercat2.py -i file-name.fna -k 3 -n 8 -c 10
Nucleotide file raw data (nucleotide fastq - '.fastq') mercat2.py -i file-name.fastq -k 3 -n 8 -c 10
Many samples within a folder mercat2.py -f /path/to/input-folder -k 3 -n 8 -c 10
Sample with prodigal option (raw reads or nucleotide contigs - '.fa', '.fna', '.ffn', '.fasta', '.fastq') mercat2.py -i /path/to/input-file -k 3 -n 8 -c 10 -prod
Sample with FragGeneScanRS option (raw reads or nucleotide contigs - '.fa', '.fna', '.ffn', '.fasta', '.fastq') mercat2.py -i /path/to/input-file -k 3 -n 8 -c 10 -fgs

Note

The prodigal and FragGeneScanRS options run the k-mer counter on both contigs and produced amino acids