Genome Preparation
Appendix (I): Bismark Genome Preparation
Section titled “Appendix (I): Bismark Genome Preparation”A full list of options can also be viewed by typing: bismark prepare --help
USAGE: bismark prepare [options] <arguments>
Section titled “USAGE: bismark prepare [options] <arguments>”OPTIONS:
Section titled “OPTIONS:”-
--helpDisplays help text.
-
--versionDisplays version information and exits.
-
--verbosePrint verbose output for more details or debugging.
-
--path_to_aligner </../../>The full path to the Bowtie 2 or HISAT2 installation folder on your system (depending on which aligner/indexer you intend to use; please note that thi is the folder and not any executable). Unless this path is specified, it is assumed that the aligner in question (Bowtie 2/HISAT2) is in the PATH.
-
--bowtie2This will create bisulfite indexes for use with Bowtie 2. Recommended for most bisulfite sequencing applications (Default: ON).
-
--hisat2This will create bisulfite indexes for use with HISAT2. At the time of writing, this is still largely unchartered territory, and only recommended for specialist applications such as RNA-methylation analyses. (Default: OFF).
-
--minimap2/--mm2
This will create bisulfite indexes for use with minimap2 (https://github.com/lh3/minimap2). This is recommended only for specialist applications such as EM-seq with ONT (Oxford Nanopore Technologies) or PacBio reads. Does not work in conjunction with --combined_genome. (Default: OFF).
-
--bwamem3Build a bwa-mem3 methylation index (
bwa-mem3 index --meth, with--meth-onlyon bwa-mem3 0.18.0 or later; needs bwa-mem3 0.16.0 or later) of the unconverted genome in<genome_folder>/Bwamem3_Index/, forbismark --tapsandbismark --illumina_5base, which find it there without--five_base_index. No bisulfite-converted genome is written. A human genome takes about 1 h, about 104 GB of RAM and about 35 GB of free disk while building (up to 70 GB with bwa-mem3 0.16.0 or 0.17.0); the finished index is about 23 GB. Genome preparation rejects, before indexing, sequence lines with spaces, tabs, other whitespace or non-ASCII bytes, lines starting with+or@, empty contigs and CR-only line ends, all of which bwa-mem3 reads differently from Bismark; LF and CRLF files are fine. Does not work in conjunction with--single_fasta,--large-indexor--combined_genome. (Default: OFF). -
--bwamem3_max_memory SIZEWith
--bwamem3: the memory budget passed to bwa-mem3 as--max-memory(e.g.120G). By default bwa-mem3 uses the detected RAM (or container limit) less a reserve, and stops before writing anything if that is not enough. -
--parallel INT
Use several threads for each indexing process to speed up the genome preparation step. Remember that the indexing is run twice in parallel already (for the top and bottom strand separately), so e.g. --parallel 4 will use 8 threads in total. With --combined_genome (Bowtie 2 or HISAT2) a third indexer, for the combined index, runs at the same time with --parallel threads, and the C→T and G→A indexers get half as many each (at least 1), so --parallel 4 still uses 8 cores; without --parallel the three indexers use one thread each, 3 cores. With --bwamem3 there is one indexer and --parallel (1 or more) sets its thread count; without it, bwa-mem3 uses all cores. Please also see --large-index for parallel processing of VERY LARGE genomes (e.g. the axolotl)
-
--single_fastaInstruct the Bismark Indexer to write the converted genomes into single-entry FastA files instead of making one multi-FastA file (MFA) per chromosome. This might be useful if individual bisulfite converted chromosomes are needed (e.g. for debugging), however it can cause a problem with indexing if the number of chromosomes is vast (this is likely to be in the range of several thousand files; operating systems can only handle lists up to a certain length. Some newly assembled genomes may contain 20000-500000 contig of scaffold files which do exceed this list length limit). Does not work in conjunction with
--minimap2. -
--genomic_compositionCalculate and extract the genomic sequence composition for mono- and di-nucleotides and write the genomic composition table genomic_nucleotide_frequencies.txt to the genome folder. This may be useful later on when using
bismark bam2nucor the Bismark option--nucleotide_coverage. -
--combined_genomeAlso build one combined C→T + G→A index in
Bisulfite_Genome/Combined/, forbismark --combined_indexwith Bowtie 2 or HISAT2. It builds at the same time as the C→T and G→A indexes, so peak memory is the sum of the three builds, and a lower--paralleldoesn’t reduce it: about 26–29 GiB for a human genome with Bowtie 2. Does not work in conjunction with--minimap2. (Default: OFF). -
--large-index
Force generated index to be ‘large’, even if reference has fewer than 4 billion nucleotides. At the time of writing this is required for parallel processing of VERY LARGE genomes (e.g. the axolotl). Does not work in conjunction with --minimap2.
ARGUMENTS:
Section titled “ARGUMENTS:”-
<path_to_genome_folder>The path to the folder containing the genome to be bisulfite converted (this may be an absolute or relative path). Bismark Genome Preparation expects one or more
FastAfiles in the folder (valid file extensions:.faor.fasta).
OUTPUT:
Section titled “OUTPUT:”This script is supposed to convert a specified reference genome into two different bisulfite converted versions and index them for alignments with Bowtie 2 (default), HISAT2 or minimap2. The first bisulfite genome will have all Cs converted to Ts (C->T), and the other one will have all Gs converted to As (G->A).
Both bisulfite genomes will be stored in subfolders within the reference genome folder containing the unconverted reference sequence (in FastA format). Once the bisulfite
conversion has been completed, the program will fork and launch two simultaneous instances (three with --combined_genome) of the Bowtie 2, HISAT2 or minimap2 indexer (bowtie2-build or hisat2-build or minimap2 -d, respectively). Here is the structure of the reference genome folder after successful indexing (with Bowtie2 in this case):
├── Bisulfite_Genome│ ├── CT_conversion│ │ ├── BS_CT.1.bt2│ │ ├── BS_CT.2.bt2│ │ ├── BS_CT.3.bt2│ │ ├── BS_CT.4.bt2│ │ ├── BS_CT.rev.1.bt2│ │ ├── BS_CT.rev.2.bt2│ │ └── genome_mfa.CT_conversion.fa│ └── GA_conversion│ ├── BS_GA.1.bt2│ ├── BS_GA.2.bt2│ ├── BS_GA.3.bt2│ ├── BS_GA.4.bt2│ ├── BS_GA.rev.1.bt2│ ├── BS_GA.rev.2.bt2│ └── genome_mfa.GA_conversion.fa└── reference_sequence.faWith --bwamem3, the folder holds only the 7 index files bwa-mem3 mem --meth reads:
├── Bwamem3_Index│ ├── genome.fa.amb│ ├── genome.fa.ann│ ├── genome.fa.meth.amb│ ├── genome.fa.meth.ann│ ├── genome.fa.meth.bwt.2bit.64│ ├── genome.fa.meth.pac│ └── genome.fa.pac└── reference_sequence.fa