Skip to content

Bismark

Bismark is a tool for mapping bisulfite converted sequence reads and determining cytosine methylation states

Bismark is available as a module on Apocrita.

Bismark Alignment

Bismark Alignment Usage

To run the default installed version of Bismark Alignment, simply load the bismark module:

$ module load bismark
$ bismark -h

Usage:   bismark [options] \
                 --genome <genome_folder> \
                 {-1 <mates1> -2 <mates2> | <singles>}

For full usage documentation, run bismark -h.

Example jobs

Performance issues when using the Bowtie2 aligner

To avoid poor performance and threading issues when running Bismark with the Bowtie2 aligner, please use the -p option with a value of half the number of cores requested and do not use the --multicore option.

See the example jobs below for more information.

Request an even number of cores when using the Bowtie2 aligner

To ensure Bismark runs with optimal performance, always request an even number of cores when running Bismark with the Bowtie2 aligner, to ensure the -p option is populated correctly.

Serial jobs

Here is an example job running on 1 core and 2GB of memory:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=1:0:0
#$ -l h_vmem=2G

module load bismark

# Prepare FASTA genomes stored in <dir>
# Output is stored in <dir>
bismark_genome_preparation <dir>

Here is an example job running on 4 cores and 20GB of memory with optimal performance:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 4
#$ -l h_rt=240:0:0
#$ -l h_vmem=5G

module load bismark

# Fork the Bowtie2 aligner by half the number of cores requested
# to avoid poor performance and threading issues
REPCORES=$((NSLOTS / 2))

bismark \
    --genome_folder <genome_folder> \
    -1 fasta1.fq.gz \
    -2 fasta2.fq.gz \
    -p ${REPCORES}

Bismark Methylation Extractor

Bismark Methylation Extractor Usage

To run the default installed version of Bismark Methylation Extractor, simply load the bismark module:

$ module load bismark
$ bismark_methylation_extractor -h
...
USAGE: bismark_methylation_extractor [options] <filenames>


ARGUMENTS:
==========

<filenames>              A space-separated list of Bismark result files in SAM
                         format from which methylation information is extracted
                         for every cytosine in the reads.
OPTIONS:
(etc.)

For full usage documentation, run bismark_methylation_extractor -h.

Example job

Please read the official Bismark documentation closely

To avoid poor performance and threading issues when running Bismark Methylation Extractor, please avoid using the --multicore option:

Please note that a typical process of extracting a BAM file and writing out .gz output streams will in fact use ~3 cores per value of --multicore specified (1 for the methylation extractor itself, 1 for a Samtools stream, 1 for a GZIP stream), so --multicore 10 is likely to use around 30 cores of system resources.

(from the official Bismark Methylation Extractor Documentation)

Using the --multicore option may cause issues in the context of Apocrita and is best avoided.

Request a number of cores divisible by 3 if using --multicore

If you still choose to use the --multicore option, please request a number of cores divisible by 3 and then use the --multicore option with a value of one third the number of cores requested, to ensure the --multicore option is populated correctly.

See the example job below for more information.

Serial job

Here is an example job running on 6 cores and 24GB of memory with optimal performance:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 6
#$ -l h_rt=240:0:0
#$ -l h_vmem=4G

module load bismark

# Fork the Bismark Methylation Extractor by one third the number of cores
# requested to avoid poor performance and threading issues
REPCORES=$((NSLOTS / 3))

bismark_methylation_extractor \
    --gzip \
    --multicore ${REPCORES} \
    sample_bismark_bt2.bam

References