Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optitype memory error in v1.3.5 due to pandas' reindex #125

Open
jnktsj opened this issue Feb 8, 2022 · 3 comments
Open

Optitype memory error in v1.3.5 due to pandas' reindex #125

jnktsj opened this issue Feb 8, 2022 · 3 comments

Comments

@jnktsj
Copy link

jnktsj commented Feb 8, 2022

Hi,

Thank you for developing the great tool! I have been using Optitype v1.3.2 and recently switched to the latest version, v1.3.5. Interestingly, all the samples that were used to successfully finish with v1.3.2 started failing due to out of memory error in v1.3.5 (tested both docker image and code versions). I have increased memory from 16GB to 32GB, but no luck so far. The input FASTQs I used were only HLA-mapping reads from the pre-processing step, so these were only ~5-8MB depending on samples..

Highly likely this memory issue is from pandas reindex implemented in #102 (hlatype = result.iloc[0].reindex(["A1", "A2", "B1", "B2", "C1", "C2"]).drop_duplicates().dropna()). It would be great if a fix for this memory leak can be investigated further..

@b-niu
Copy link

b-niu commented Mar 2, 2022

Hi @jnktsj , in my own case, a server with 128GB RAM will also encounter this problem.

@jnktsj
Copy link
Author

jnktsj commented Mar 2, 2022

Hi @b-niu, my solution for now is not using the latest Optitype. Here is the code snippet of my setup for Optitype v1.3.2:

pip install \
  numpy==1.15.4 pandas==0.22.0 matplotlib==2.1.2 \
  pyomo==5.3 pysam==0.13 future==0.16.0 \
  numexpr==2.6.4 tables==3.4.2 pyutilib==5.8

# razers3 3.5.8
wget 'http://packages.seqan.de/razers3/razers3-3.5.8-Linux-x86_64.tar.xz' && \
    tar -xf razers3-3.5.8-Linux-x86_64.tar.xz && rm razers3-3.5.8-Linux-x86_64.tar.xz && \
    mv razers3-3.5.8-Linux-x86_64/bin/razers3 /usr/local/bin/razers3 && rm -r razers3-3.5.8-Linux-x86_64

# Optitype v1.3.2 (don't use v1.3.5 due to memory leak)
wget 'https://github.com/FRED-2/OptiType/archive/refs/tags/v1.3.2.tar.gz' && \
    tar xzf v1.3.2.tar.gz && rm v1.3.2.tar.gz && mv OptiType-1.3.2 /usr/local/bin/

@b-niu
Copy link

b-niu commented Mar 5, 2022

Thanks a lot @jnktsj ! Nice solution 😄

zhaoxiaofei added a commit to zhaoxiaofei/neoheadhunter that referenced this issue Sep 26, 2023
…e at FRED-2/OptiType#125 (this commit only affect the installation scripts.)
zhaoxiaofei added a commit to zhaoxiaofei/neoheadhunter that referenced this issue Sep 26, 2023
…e at FRED-2/OptiType#125 (this commit only affect the Snakefile.). Re-adjusted CPU and RAM requirements for bcftools, bwa, star, uvc and vep. Partitione the rule rna_preprocess into rna_preprocess (generating BAM files) and rna_preprocess (generating VCF files).
zhaoxiaofei added a commit to zhaoxiaofei/neoheadhunter that referenced this issue Sep 26, 2023
…conda env to run optitype 1.3.2 instead of its latest version due to FRED-2/OptiType#125 and added comments to explain the three work-arounds for this issue.
zhaoxiaofei added a commit to zhaoxiaofei/neoheadhunter that referenced this issue Sep 26, 2023
…biocontainer and of using the optitype_env conda env to work-around FRED-2/OptiType#125 in the Snakefile. Also in the Snakefile: try running netMHCstabpan for up to 3 times before returning non-zero exit code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants