Skip to content

Commit

Permalink
update memory requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed Apr 22, 2021
1 parent 34d9474 commit 61e1e88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/src/installing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Hardware requirements
- Storage
- Time
* - Archaea
- ~8 GB
- ~13 GB
- ~27 GB
- ~1 hour / 1,000 genomes @ 64 CPUs
* - Bacteria
- ~150 GB
- ~204 GB
- ~27 GB
- ~1 hour / 1,000 genomes @ 64 CPUs

Expand Down
24 changes: 12 additions & 12 deletions gtdbtk/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,21 @@ def place_genomes(self,
"""Place genomes into reference tree using pplacer."""

# Warn if the memory is insufficient
mem_warning = 'pplacer requires ~{req_gb} GB of RAM to fully load the ' \
'{domain} tree into memory. However, {cur_gb:,} GB was ' \
'detected. This may affect pplacer performance, or fail' \
' if there is insufficient swap space.'
mem_gb = get_memory_gb()
if mem_gb is not None:
mem_total = mem_gb['MemTotal']
if marker_set_id == 'bac120' and mem_total < 145:
self.logger.warning(f'pplacer requires ~152 GB of RAM to fully '
f'load the bacterial tree into memory. '
f'However, {mem_total:,}GB was detected. '
f'This may affect pplacer performance, '
f'or fail if there is insufficient scratch space.')
elif marker_set_id == 'ar122' and mem_total < 6:
self.logger.warning(f'pplacer requires ~8.2 GB of RAM to fully '
f'load the archaeal tree into memory. '
f'However, {mem_total:,}GB was detected. '
f'This may affect pplacer performance, '
f'or fail if there is insufficient scratch space.')
if marker_set_id == 'bac120' and mem_total < Config.PPLACER_MIN_RAM_BAC:
self.logger.warning(mem_warning.format(req_gb=Config.PPLACER_MIN_RAM_BAC,
domain='bacterial',
cur_gb=mem_total))
elif marker_set_id == 'ar122' and mem_total < Config.PPLACER_MIN_RAM_ARC:
self.logger.warning(mem_warning.format(req_gb=Config.PPLACER_MIN_RAM_ARC,
domain='archaeal',
cur_gb=mem_total))

# rename user MSA file for compatibility with pplacer
if not user_msa_file.endswith('.fasta'):
Expand Down
16 changes: 9 additions & 7 deletions gtdbtk/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
PPLACER_BAC120_REF_PKG = f"gtdb_{VERSION_DATA}_bac120.refpkg"
PPLACER_AR122_REF_PKG = f"gtdb_{VERSION_DATA}_ar122.refpkg"
PPLACER_RPS23_REF_PKG = f"gtdb_{VERSION_DATA}_rps23.refpkg"
PPLACER_MIN_RAM_BAC = 204
PPLACER_MIN_RAM_ARC = 13

# Fastani configuration
FASTANI_SPECIES_THRESHOLD = 95.0
Expand All @@ -208,13 +210,13 @@
MRCA_RED_AR122 = os.path.join(RED_DIR, f"gtdbtk_{VERSION_DATA}_ar122.tsv")

# Hashing information for validating the reference package.
REF_HASHES = {PPLACER_DIR: 'f41cfe0284ebaca4485b42e054936190c6a88bd1',
MASK_DIR: '63551a43333bc6cbc9abf139ce881847ca19240b',
MARKER_DIR: 'a325720422d8348d7a934143cc86112b6c92ac98',
RADII_DIR: '1092727925f38a8a2b3f4fb40e3316c0083671f5',
MSA_FOLDER: 'cf91d712c733e7e2535a41e6153c12b3c37d1ede',
METADATA_DIR: 'e003b4d5d48302e85c536751f663a70447de83d4',
TAX_FOLDER: '30c5970b2eaf5df654b2e01bfa39265302c0be89',
REF_HASHES = {PPLACER_DIR: '4d931b5109a240602f55228029b87ee768da8141',
MASK_DIR: '36d6ac371d247b2b952523b9798e78908ea323fa',
MARKER_DIR: '2ba5ae35fb272462663651d18fd9e523317e48cd',
RADII_DIR: '9f9a2e21e27b9049044d04d731795499414a365c',
MSA_FOLDER: 'b426865245c39ee9f01b0392fb8f7867a9f76f0a',
METADATA_DIR: '7640aed96fdb13707a2b79b746a94335faabd6df',
TAX_FOLDER: '4a7a1e4047c088e92dee9740206499cdb7e5beca',
FASTANI_DIR: '6a3555bb61d9cc3163c26e65772b96b8f58a2d84',
RED_DIR: '6f661eef8e172a8a7e78af2a74fe4d079a3f5b0f'}

Expand Down
2 changes: 1 addition & 1 deletion gtdbtk/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def check_install(self):

if user_hash != expected_hash:
self.logger.info(" |-- {:16} {}".format(
base_name, colour('HASH MISMATCH', ['bright'], fg='yellow')))
base_name, colour(f'HASH MISMATCH {user_hash}', ['bright'], fg='yellow')))
ok = False
else:
self.logger.info(" |-- {:16} {}".format(
Expand Down

0 comments on commit 61e1e88

Please sign in to comment.