0
$\begingroup$

I'm using RepeatMasker on human sequences. When running RepeatMasker this way:

RepeatMasker -e rmblast -species human -dir . myFile.fa

RepeatMasker builds some libraries:

Building general libraries in: /path/to/share/RepeatMasker/Libraries/CONS-Dfam_3.3/general
Building species libraries in: /path/to/share/RepeatMasker/Libraries/CONS-Dfam_3.3/human

(Paths edited) On subsequent runs, this does not happen. I want to check if these libraries exist beforehand (which I can easily do with ls /path/to/share/RepeatMasker/Libraries/CONS-Dfam_3.3/), and if they don't, build them.

I could do a run with a decoy fasta to trigger that step, but it's a bit hacky. Is there a better way to force Repeat Masker to build those libraries?

(I mention that I'm using bioconda in the title because I'm working on a remote server with restrictions, so that should be taken into account, no because there is already a solution for other installation methods).

$\endgroup$

1 Answer 1

1
$\begingroup$

Something like this:

db_dir=$CONDA_PREFIX/share/RepeatMasker/Libraries/CONS-Dfam_3.3/

if [ -d "${db_dir}" ] && [ -n "$(ls -A ${db_dir})" ]; then
    echo "CONS-Dfam folder is not empty"
    # ... do something
else
    echo > sequence.fasta
    RepeatMasker -e rmblast -species human -dir . sequence.fasta
fi

If the folder exists and is not empty, otherwise build it using an empty file.

$\endgroup$
1
  • $\begingroup$ That's what I mentioned in my question, using a decoy FASTA. It seems there are not alternatives $\endgroup$ Oct 26, 2021 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.