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

OSError: [Errno 12] Cannot allocate memory #52

Open
jingmeng-bioinformatics opened this issue Nov 6, 2019 · 2 comments
Open

OSError: [Errno 12] Cannot allocate memory #52

jingmeng-bioinformatics opened this issue Nov 6, 2019 · 2 comments

Comments

@jingmeng-bioinformatics
Copy link

ERROR 2019-11-06 16:21:08,570 main Aborting!
ERROR 2019-11-06 16:21:08,598 main preprocess.py failure on arguments: Namespace(dbsnp_to_filter=None, del_merge_min_af=0, del_min_af=0.05, ensemble_tsv=None, filter_duplicate=False, first_do_without_qual=False, good_ao=10, ins_merge_min_af=0, ins_min_af=0.05, long_read=False, matrix_base_pad=7, matrix_width=32, max_dp=100000, merge_r=0.5, min_ao=1, min_dp=5, min_ev_frac_per_col=0.06, min_mapq=10, mode='call', normal_bam='/home//Desktop/BAM/NA12878_HiSeq1_normal.bam', num_threads=1, reference='/media//TOSHIBA/hg38/hg38-new/hg38.fa', region_bed='/home//Desktop/BAM/NA12878_HiSeq1_benchmark.bed', restart=False, scan_alignments_binary='/home//Downloads/neusomatic-master/neusomatic/bin/scan_alignments', scan_maf=0.01, scan_window_size=2000, snp_min_af=0.05, snp_min_ao=3, snp_min_bq=10, truth_vcf=None, tsv_batch_size=50000, tumor_bam='/home//Desktop/BAM/NA12878_25_snv_indel_sorted.bam', work='/media//JingMeng/BAM/25_work_call')
Traceback (most recent call last):
File "/home/**/.local/lib/python3.6/site-packages/pybedtools/helpers.py", line 407, in call_bedtools
bufsize=BUFSIZE)
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home//Downloads/neusomatic-master/neusomatic/python/preprocess.py", line 441, in
raise e
File "/home/
/Downloads/neusomatic-master/neusomatic/python/preprocess.py", line 435, in
args.scan_alignments_binary)
File "/home//Downloads/neusomatic-master/neusomatic/python/preprocess.py", line 335, in preprocess
ensemble_beds[i] if ensemble_tsv else None, tsv_batch_size)
File "/home/
/Downloads/neusomatic-master/neusomatic/python/preprocess.py", line 129, in generate_dataset_region
tsv_batch_size)
File "/home//Downloads/neusomatic-master/neusomatic/python/generate_dataset.py", line 1433, in generate_dataset
tumor_pred_vcf_file).intersect(region_bed_file, u=True))
File "/home/
/.local/lib/python3.6/site-packages/pybedtools/bedtool.py", line 840, in decorated
result = method(self, *args, kwargs)
File "/home/
/.local/lib/python3.6/site-packages/pybedtools/bedtool.py", line 345, in wrapped
decode_output=decode_output,
File "/home/**/.local/lib/python3.6/site-packages/pybedtools/helpers.py", line 458, in call_bedtools
print('\n\t' + '\n\t'.join(problems[err.errno]))
KeyError: 12

When running neusomatic, it uses just about 1.0% memory (my ram is 8G). I really do not understand why it gave me such error: OSError: [Errno 12] Cannot allocate memory. Thank you!

@msahraeian
Copy link
Contributor

@jingmeng-bioinformatics I guess your machine is not powerful enough for a WG analysis. What you can do is to split the WG region to smaller chunks (like 1M bases) and run neusomatic on each separately. You can split your region file using

python split_bed.py \
	--region_bed region.bed \
	--output work \
	--num_splits 3000

@jingmeng-bioinformatics
Copy link
Author

Ok, thanks for your reply. I will give it a try

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