Usage
Work in progress
mako is in active development and not all features are supported yet. Key features that need to be implemented:
- Certain QC visualisations, such as the metagene plot
Bug reports are highly welcome and we would greatly appreciate they be sent to our GitHub Issues tracker.
Installation
You will need:
- Nextflow
- Docker or Singularity (Apptainer)
- System Python version >= 3.9 with pip installed
- Reference genome and transcriptome
- Pre-modification-called data from Dorado or m6Anet, either in modBAM file or as a table of modification calls
# load nextflow, docker/singularity modules as needed
modules load nextflow apptainer
# check Python version is sufficient and pip exists
python3 -c "import sys,pip; sys.exit(sys.version_info<(3,9))" && echo "Python OK" || echo "Python FAIL"
# download the pipeline
git clone https://github.com/shimlab/mako.git && cd mako
nextflow run main.nf --help
Samplesheet
The samplesheet is a CSV file which contains information about the samples to be analysed in the pipeline. A header is required.
This is suitable for modifications called by Dorado.
name,group,path_modbam
sample1,group1,/base_and_modcalled/reads1.bam
sample2,group1,/base_and_modcalled/reads2.bam
sample3,group1,/base_and_modcalled/reads3.bam
sample4,group2,/base_and_modcalled/reads4.bam
sample5,group2,/base_and_modcalled/reads5.bam
sample6,group2,/base_and_modcalled/reads6.bam
name: a unique name for each samplegroup: the experimental group or condition for each samplepath_modbam: path to pre-basecalled Dorado modification data for each sample.
The file should be a .bam file in 'modbam' format i.e. with tagsMMandML. See the Dorado documentation for more information.
Start Mako:
export REFERENCE_GENOME=/ref/GRCh38.p14.genome.fa \
REFERENCE_TXOME=/ref/gencode.v50.transcripts.fa \
REFERENCE_GTF=/ref/gencode.v50.annotation.gtf \
OUTDIR=results
# run Mako
nextflow run main.nf \
-profile singularity \
--samplesheet samplesheet.csv \
--dataset_name test_dataset \
--outdir $OUTDIR \
--input_format modbam \
--mod_threshold 0.5 \
--genome $REFERENCE_GENOME \
--transcriptome $REFERENCE_TXOME \
--gtf $REFERENCE_GTF
# launch Makoview
./$OUTDIR/makoview/launch_makoview.sh
This is suitable for modifications called by m6Anet.
name,group,path_bam,path_csv
sample1,group1,/basecalled/reads1.bam,/m6anet_out_1/data.indiv_proba.csv
sample2,group1,/basecalled/reads2.bam,/m6anet_out_2/data.indiv_proba.csv
sample3,group1,/basecalled/reads3.bam,/m6anet_out_3/data.indiv_proba.csv
sample4,group2,/basecalled/reads4.bam,/m6anet_out_4/data.indiv_proba.csv
sample5,group2,/basecalled/reads5.bam,/m6anet_out_5/data.indiv_proba.csv
sample6,group2,/basecalled/reads6.bam,/m6anet_out_6/data.indiv_proba.csv
name: a unique name for each samplegroup: the experimental group or condition for each samplepath_bam: path to pre-basecalled and aligned reads in BAM formatpath_csv: path to a CSV table containing rows with each called modification probability. If using m6Anet, this file isdata.indiv_proba.csv. The file must have columnstranscript_id, transcript_position, read_index, probability_modified.
Start Mako:
export REFERENCE_GENOME=/ref/GRCh38.p14.genome.fa \
REFERENCE_TXOME=/ref/gencode.v50.transcripts.fa \
REFERENCE_GTF=/ref/gencode.v50.annotation.gtf \
OUTDIR=results
# run Mako
nextflow run main.nf \
-profile singularity \
--samplesheet samplesheet.csv \
--dataset_name test_dataset \
--outdir $OUTDIR \
--input_format table \
--mod_threshold 0.033379376
--genome $REFERENCE_GENOME \
--transcriptome $REFERENCE_TXOME \
--gtf $REFERENCE_GTF
# launch Makoview
./$OUTDIR/makoview/launch_makoview.sh
Modification thresholds for m6Anet
The m6Anet documentation suggests to use 0.033379376 as the threshold for individual reads to be called as modified. Always consult your tool of choice to determine this value.
Two groups should be provided to call differential modifications between conditions. Group names should be alphanumeric and without spaces. The underlying models take the first group alphabetically as the reference level, and the second group alphabetically as the treatment level.
Parameters
Note
If your institution has an nf-core configuration available, you can access it through -profile i.e. -profile wehi to use the WEHI Milton HPC. See Execution Profiles for more.
Dependencies for Mako are distributed as container images for Docker and Singularity (Apptainer). If not using an nf-core configuration, run Mako using -profile docker or -profile singularity.
Input/output options
Define where the pipeline should find input data and save output data.
| Parameter | Description | Default |
|---|---|---|
dataset_name |
The name of this dataset, used in output files and within visualisations | |
samplesheet |
Path to comma-separated file containing information about the samples in the experiment. | |
outdir |
The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. | |
publish_dir_mode |
How to copy output from the work directory to the output directory (accepted:
copy|symlink)
|
copy |
input_format |
Whether the input format is 'modBAM' or table (TSV) form. (accepted: modbam|table)
|
Pipeline parameters
| Parameter | Description | Default |
|---|---|---|
genome |
Reference genome, in .fasta format | |
transcriptome |
Reference transcriptome, in .fasta format | |
gtf |
GTF annotation file |
Modification calling parameters
Settings which control which sites are selected for differential calling.
| Parameter | Description | Default |
|---|---|---|
method |
Model to use to call differentially modified sites (accepted:
adaptive_binomial|binomial|beta_binomial)
|
adaptive_binomial |
mod_threshold |
A passing threshold to determine a base modification. | 0.5 |
mod_filter |
Reads with a modification probability within this interval will be filtered out and not used in the Dorado
model. The format should be a,b i.e. 0.2,0.8. By default, no filtering is done.
|
|
min_reads_per_sample |
How many reads each sample should have at a site in order for the site to be considered. | 5 |
Other parameters
| Parameter | Description | Default |
|---|---|---|
testing |
Only activated during stub runs |