dieterich-lab / rp-bp

Rp-Bp is a Bayesian approach to predict, at base-pair resolution, ribosome occupancy and translation.
MIT License
7 stars 5 forks source link

--limitGenomeGenerateRAM error in prepare-rpbp-genome #156

Closed mjutersek closed 10 months ago

mjutersek commented 11 months ago

Hi, I have recently installed Rp-Bp (version 3.0.2 from bioconda) and have experienced the following issue during genome preparation step due to RAM limit in STAR --genomeGenerate mode. Running the command:

prepare-rpbp-genome stu.alignments-only.yaml --num-cpus 30 --logging-level INFO

I get the following error

EXITING because of FATAL PARAMETER ERROR: limitGenomeGenerateRAM=2147483648is too small for your genome
SOLUTION: please specify --limitGenomeGenerateRAM not less than 2362791520 and make that much RAM available

However, I cannot override the --limitGenomeGenerateRAM:

prepare-rpbp-genome stu.alignments-only.yaml --num-cpus 30 --logging-level INFO --star-options "--limitGenomeGenerateRAM 50000000000"

INFO     root     2023-07-27 15:28:13,752 : STAR --runMode genomeGenerate --genomeDir /DATA/mojcaj/rpbp/Stu.genome/star-index/ --genomeFastaFiles /DATA/mojcaj/rpbp/input/StPGSC4.04n_2018-01-18.fasta --runThreadN 30 --limitGenomeGenerateRAM 2147483648 --limitGenomeGenerateRAM 50000000000
INFO     root     2023-07-27 15:28:13,752 : calling

EXITING: FATAL INPUT ERROR: duplicate parameter "limitGenomeGenerateRAM" in input "Command-Line"
SOLUTION: keep only one definition of input parameters in each input source

Jul 27 15:28:13 ...... FATAL ERROR, exiting
Traceback (most recent call last):
  File "/home/administrator/conda2/envs/rpbp/bin/prepare-rpbp-genome", line 11, in <module>
    sys.exit(main())
  File "/home/administrator/conda2/envs/rpbp/lib/python3.10/site-packages/rpbp/reference_preprocessing/prepare_rpbp_genome.py", line 275, in main
    shell_utils.call_if_not_exists(
  File "/home/administrator/conda2/envs/rpbp/lib/python3.10/site-packages/pbiotools/misc/shell_utils.py", line 370, in call_if_not_exists
    ret_code = check_call(cmd, call=call, raise_on_error=raise_on_error)
  File "/home/administrator/conda2/envs/rpbp/lib/python3.10/site-packages/pbiotools/misc/shell_utils.py", line 204, in check_call
    return check_call_step(cmd, call=call, raise_on_error=raise_on_error)
  File "/home/administrator/conda2/envs/rpbp/lib/python3.10/site-packages/pbiotools/misc/shell_utils.py", line 186, in check_call_step
    raise subprocess.CalledProcessError(ret_code, cmd)
subprocess.CalledProcessError: Command 'STAR --runMode genomeGenerate --genomeDir /DATA/mojcaj/rpbp/Stu.genome/star-index/ --genomeFastaFiles /DATA/mojcaj/rpbp/input/StPGSC4.04n_2018-01-18.fasta --runThreadN 30 --limitGenomeGenerateRAM 2147483648 --limitGenomeGenerateRAM 50000000000' returned non-zero exit status 102.

Is it even possible to override this STAR setting? If not, is there any other workaround? I want to analyze my RIBO-Seq data from alignment .bam files, so I do not actually need the STAR index. Is there a way to prepare the other necessary genome files and skip STAR index generation?

Thank you, Mojca

eboileau commented 11 months ago

Hi @mjutersek

Please check the API for prepare-rpbp-genome. The --mem option is used for STAR genome indexing.

If I understand correctly, you already have mapped Ribo-seq (BAM files), right? Then check I have my own alignments, can I use Rp-Bp?. You have to make sure that the files are named according to what the pipeline expects, and that all paths are correct, etc. You can do the same for index generation, so that e.g. STAR index generation is skipped, but that remaining Rp-Bp indices are generated.

And by the way, please do NOT delete the template when opening an issue, you need to use it, and fill it accordingly!