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

error in metaWRAP binning command #14

Open
itiago opened this issue Mar 2, 2018 · 5 comments
Open

error in metaWRAP binning command #14

itiago opened this issue Mar 2, 2018 · 5 comments

Comments

@itiago
Copy link

itiago commented Mar 2, 2018

I have this error message after the metaWRAP binning command

.......
------------------------------------------------------------------------------------------------------------------------
-----           Aligning AC3_2MetaGenMerged_paired_1.fastq and AC3_2MetaGenMerged_paired_2.fastq back to           -----
-----                 assembly, sorting the alignment, and gathering statistics on insert lengths                  -----
------------------------------------------------------------------------------------------------------------------------

[M::bwa_idx_load_from_disk] read 0 ALT contigs
[M::process] read 9577972 sequences (960000077 bp)...
[M::mem_pestat] # candidate unique pairs for (FF, FR, RF, RR): (107, 114, 93, 97)
[M::mem_pestat] analyzing insert size distribution for orientation FF...
[M::mem_pestat] (25, 50, 75) percentile: (648, 2386, 5914)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 16446)
[M::mem_pestat] mean and std.dev: (3388.33, 3002.29)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 21712)
[M::mem_pestat] analyzing insert size distribution for orientation FR...
[M::mem_pestat] (25, 50, 75) percentile: (456, 3134, 6082)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 17334)
[M::mem_pestat] mean and std.dev: (3338.57, 2922.67)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 22960)
[M::mem_pestat] analyzing insert size distribution for orientation RF...
[M::mem_pestat] (25, 50, 75) percentile: (517, 2597, 5356)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 15034)
[M::mem_pestat] mean and std.dev: (3399.18, 2976.25)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 19873)
[M::mem_pestat] analyzing insert size distribution for orientation RR...
[M::mem_pestat] (25, 50, 75) percentile: (1056, 2708, 6118)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 16242)
[M::mem_pestat] mean and std.dev: (3590.84, 2932.69)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 21304)
[mem_sam_pe] paired reads have different names: "D4ZHLFP1:60:D2HDNACXX:2:1101:1279:2201", "D4ZHLFP1:60:D2HDNACXX:2:1311:3692:20373"

awk: cmd. line:1: (FILENAME=- FNR=78735) fatal: division by zero attempted
samtools sort: couldn't allocate memory for bam_mem

************************************************************************************************************************
*****                     Something went wrong with aligning/sorting the reads to the assembly!                    *****
************************************************************************************************************************
@ursky
Copy link
Collaborator

ursky commented Mar 2, 2018

It looks like the samtools sort function is running out of memory. By default, it tries to allocate 768MB of memory for every core used, so if you run metaWRAP with --threads 48 but only have 24GB of RAM, for example, it would cause this error. How many threads are you using and how much RAM to you have?

The other issue here is that one of your read pairs seems to be mismatched, which may or may not be giving you the error. You can use another fastq repair program or just use the metaWRAP's read_qc module, now that it is fixed in metawrap v=0.7.7. The read_qc module should remove any mismatched reads.

@ursky
Copy link
Collaborator

ursky commented Mar 2, 2018

You also asked:
"Other question is, is it possible to use a bam file, previously produced to do the metawrap binning command? I'm trying to do the analyses on a 24 GB computer and it seems to go out of memory, but I was able to produce a bam file in the same pc using bam..."

This is interesting. Were you able to sort your bam file as well? As of now, it is not possible to provide your own bam file, however you are welcome to hack into the bash code in metaWRAP/bin/metawrap-modules/binning.sh on lines ~170-180. Let me know if you find a more memory efficient solution.

@itiago
Copy link
Author

itiago commented Mar 2, 2018 via email

@ursky
Copy link
Collaborator

ursky commented Mar 2, 2018

Yeah, you could re-run the module with -t 8 to be on the safe side and see if that fixes the issue.

@ursky
Copy link
Collaborator

ursky commented Mar 6, 2018

Let me know if you find a work-around. Worst-case scenario, you could just run the binning functions yourself, and then proceed to the bin_refinement. Feel free to skim the binning module code for an example how to run each binner.

@ursky ursky closed this as completed Mar 6, 2018
@ursky ursky reopened this Sep 14, 2018
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