Skip to main content

RepeatMasker

Installation and Usage of RepeatMasker and RepeatModeler

RepeatMasker is a common tool for detecting repetitive sequences, accurately identifying or masking repeats in genomes through similarity comparison with reference databases, representing a homology-based annotation approach. It generally relies on the existing Repbase repeat library for homology prediction. Most target eukaryotic species are included in Repbase. However, when Repbase annotation is insufficient, de novo prediction of repetitive sequences can be considered. This involves training a repeat set from the current whole-genome sequence to build a local repeat library, which is then used by RepeatMasker for annotation. RepeatModeler, which accompanies RepeatMasker, facilitates this process.


1. Script Template

submit.sh
#!/bin/bash
#SBATCH --nodes=1 # Number of nodes
#SBATCH --ntasks-per-node=56 # Number of cores per node
#SBATCH --ntasks=56 # Total number of cores
#SBATCH --partition=g1_share # Queue partition; must specify the correct partition
#SBATCH --job-name=hello # Job name
#SBATCH --output=hello.%j.out # Normal log output (%j parameter value is jobId)
#SBATCH --error=hello.%j.err # Error log output (%j parameter value is jobId)

##############################################
# Run job #
##############################################
BuildDatabase -name GCA_012411365 -engine rmblast test.fna # Modify based on actual case name

RepeatModeler -pa 5 -database GCA_012411365

RepeatMasker -pa 16 \
-e rmblast -lib consensi.fa.classified \
-dir Repeat_result -gff test.fna # Modify based on actual case name
# Note:
# The directory specified after -dir must be created in advance, otherwise the required files will not be generated
# The -species flag must be used to specify the species; otherwise, the default alignment is against the human repeat sequence database
# If using a local reference library, specify it with -lib instead of -species
# Parameters such as -s, -q, and -qq control alignment sensitivity; if the target species is not closely related to the reference species, sensitivity may need to be increased
# If the job reports errors, submit the three commands individually
# Load the configured conda environment before submitting the job