LANL-Bioinformatics / MeGAMerge

MeGAMerge (A tool to merge assembled contigs, long reads from metagenomic sequencing runs)
Other
14 stars 7 forks source link

Died at MeGAMerge-1.1.pl line 280. #2

Closed itiago closed 8 years ago

itiago commented 8 years ago

Hi I'm trying to use MeGAMerge but I came across these errors, could you please help me ?

perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdi r /diag/home/itiago/Newbler/bin/ -minLen=500 /diag/home/itiago/megahit-master/ALLMERGED/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_fina l.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa Running Newbler assembly with 4149921 sequences runAssembly -force -large -rip -mi 98 -ml 200 -pairt -cpu 4 -a 200 -o /diag/home/itiago/megahit-master/ALLMERGED//newbler /diag/home/itiago/meg ahit-master/ALLMERGED//newblerIn.fasta 1>/dev/null 2>/dev/null Running Minimus2 with 239743 sequences minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED//minimus.fasta 1>/dev/null 2>/dev/null minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED//minimus.fasta 1>/dev/null 2>/dev/null failed: Died at MeGAMerge-1.1.pl line 280.

Tehn I tried to use the other script, but gave the same error

[itiago@fnode1 MeGAMerge-master]$ perl MeGAMerge-1.0.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 /diag/home/itiago/megahit-master/ALLMERGED/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa -force Unknown option: force Running Newbler assembly with 4149921 sequences Newbler finished Running Minimus2 with 239743 sequences /diag/software/amos/bin//minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED//minimus.fasta 1>/dev/null 2>/dev/null /diag/software/amos/bin//minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED//minimus.fasta 1>/dev/null 2>/dev/null failed: Died at MeGAMerge-1.0.pl line 251. [Please do not run CPU- or memory-intensive tasks on gateway nodes] [itiago@fnode1 MeGAMerge-master]$

scholzmb commented 8 years ago

Second error contains an error indicating that you are running software on a non-compute node (assuming you are running on a computer cluster).

1) there is no -force option for megaMerge (it currently overwrites without checking, I should put that on a checklist).

2) In both cases the program is dying during MeGaMerge with a reasonable number of sequences. Please try to rerun with -debug and paste any messages at the end of the run from that.

itiago commented 8 years ago

Thanks for the reply

Got this from the rerun, it seems it does not recognize -debug perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 -debug /diag/home/itiago/megahit-master/ALLMERGED/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa Unknown option: debug

scholzmb commented 8 years ago

Apologies, -d not -debug

There is an output file also saved by Minimus2 that will end in .err (the name is escaping me). if you can also find that, and paste in the output from that, it would help.

itiago commented 8 years ago

which one? I only see a nucmer.error, please see picture with all files available.

picture1

scholzmb commented 8 years ago

nucmer.error should be correct.

itiago commented 8 years ago

And got this error when trying to rerun with -d, it seems that it does not force by default after all..

perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 -d /diag/home/itiago/megahit-master/ALLMERGED/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa COMMAND perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 -d /diag/home/itiago/megahit-master/ALLMERGED/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa The Merged FASTA will be stored in /diag/home/itiago/megahit-master/ALLMERGED//MergedContigs.fasta file /diag/home/itiago/megahit-master/ALLMERGED//minimus.fasta exists in target directory, please remove, or use -force at MeGAMerge-1.1.pl line 123.

itiago commented 8 years ago

nucmer.error text:

20160119|110414| 3633| ERROR: mummer and/or mgaps returned non-zero

scholzmb commented 8 years ago

again, apologies, I'm out of touch with MeGAMerge!

-force option is enabled, not documented (will fix). Please run with -force -d

itiago commented 8 years ago

Please don't apologize, thanks for the help!

I've gave another outdirectory just in case, am reruning -d as we speak.

itiago commented 8 years ago

The run went like this (error at the end): perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 -d /diag/home/itiago/megahit-master/ALLMERGED_2/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa COMMAND perl MeGAMerge-1.1.pl -overlap 200 -bindir /diag/software/MUMmer/ -bindir /diag/software/amos/bin/ -newblerdir /diag/home/itiago/Newbler/bin/ -minLen=500 -d /diag/home/itiago/megahit-master/ALLMERGED_2/ 15_out_final.contigs.fa AC3_final.contigs.fa bulk_final.contigs.fa metasensitive.final.contigs.fa out_final.contigs.fa seperatedBulk_final.contigs.fa The Merged FASTA will be stored in /diag/home/itiago/megahit-master/ALLMERGED_2//MergedContigs.fasta Reading 15_out_final.contigs.fa Reading AC3_final.contigs.fa Reading bulk_final.contigs.fa Reading metasensitive.final.contigs.fa Reading out_final.contigs.fa Reading seperatedBulk_final.contigs.fa Running Newbler assembly with 4149921 sequences runAssembly -force -large -rip -mi 98 -ml 200 -pairt -cpu 4 -a 200 -o /diag/home/itiago/megahit-master/ALLMERGED_2//newbler /diag/home/itiago/megahit-master/ALLMERGED_2//newblerIn.fasta Created assembly project directory /diag/home/itiago/megahit-master/ALLMERGED_2//newbler 1 read file successfully added. newblerIn.fasta (Fasta dataset) Assembly computation starting at: Tue Jan 19 11:38:06 2016 (v2.7 (20120228_1408)) Indexing newblerIn.fasta... Warning: No quality scores file found. -> 393350 reads, 329055466 bases. Setting up long overlap detection... -> 393350 of 393350, 393350 reads to align Building a tree for 3678556 seeds... Computing long overlap alignments... -> 391000 of 393350 1 sequences marked as repeats, 0 in alignments, removing from 0 chords... -> 393350 of 393350 Setting up overlap detection... -> 393350 of 393350, 378497 reads to align Starting seed building... -> 393350 of 393350 Building a tree for 25880992 seeds... Computing alignments... -> 392000 of 393350 107 sequences marked as repeats, 105 in alignments, removing from 72 chords... -> 393350 of 393350 Checkpointing... Detangling alignments... -> Level 4, Phase 9, Round 2... Checkpointing... Building contigs/scaffolds... -> 22643 large contigs, 23308 all contigs Computing signals... -> 32694841 of 32694841... Generating output... -> 32694841 of 32694841... Assembly computation succeeded at: Tue Jan 19 11:49:46 2016 244517 newbler singletons sequences Checking 454PairAlign.txt Unique Newbler Singletons (>=200 bp): 150727 opening /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta for writing opening /diag/home/itiago/megahit-master/ALLMERGED_2//largefile.fasta for reading opening /diag/home/itiago/megahit-master/ALLMERGED_2//newbler/All.fasta for reading Running Minimus2 with 239744 sequences Max ID: 719235 minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta The log file is: /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.runAmos.log Doing step 10: Building AMOS bank & Dumping reads Doing step 11 Doing step 12 Doing step 13 Doing step 20: Getting overlaps Command: /diag/software/MUMmer//nucmer -maxmatch -c 200 /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.ref.seq /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.qry.seq -p /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta exited with status: 1 minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=200 /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta failed: Died at MeGAMerge-1.1.pl line 280.

scholzmb commented 8 years ago

OK,

The problem is occurring during the nucmer alignment. The fastest thing to test would be to go into the directory (ALLMERGED_2), and run the command manually, and see if it gives a more explainable error. Command: /diag/software/MUMmer//nucmer -maxmatch -c 200 /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.ref.seq /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.qry.seq -p /diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta

Other recommendations, if no answer is forthcoming, there may be an issue with having -overlap=200 without also increasing the minimum length allowed above 200. you can see if this is a potential cause by rerunning changing the -c 200 option in nucmer to 150.

After that, I would recommend we take this discussion off list, and email me directly: matthew.b.scholz@vanderbilt.edu

Once we determine the root cause, I can come back to this thread and finalize it.

scholzmb commented 8 years ago

One last note, there HAVE been known instances where sufficiently large contigs (larger than 500KB iirc) have caused minimus2 to crash. if you have reason to believe that this may be the source of the error, we can discuss other options.

itiago commented 8 years ago

I will do as follow: 1 - rerun with manual command, 2 - rerun with -c 150 also

The longest contigs I had in assemblies where 130KB.

I will get back to you with results. thanks for the help.

itiago commented 8 years ago

I run with -c 150 just in case, gave this error about zeros:

/diag/software/MUMmer//nucmer -maxmatch -c 150 /diag/home/itiago/m egahit-master/ALLMERGED_2//minimus.fasta.ref.seq /diag/home/itiago/megahit-master/ALL MERGED_2//minimus.fasta.qry.seq -p /diag/home/itiago/megahit-master/ALLMERGED_2//mini mus.fasta 1: PREPARING DATA 2,3: RUNNING mummer AND CREATING CLUSTERS

reading input file "/diag/home/itiago/megahit-master/ALLMERGED_2//minimus.fasta.ntr ef" of length 460387533

construct suffix tree for sequence of length 460387533

(maximum reference length is 536870908)

(maximum query length is 4294967295)

process 4603875 characters per dot

................................................................................ERRO R: mummer and/or mgaps returned non-zero

itiago commented 8 years ago

sorry about the bold.. don't know how it happened

scholzmb commented 8 years ago

Github markup makes life interesting sometimes.

We have isolated the problem. Something in the fasta, either from the newbler assembly, or the original files, is causing nucmer to fail. To be able to do any other troubleshooting, I would need to be able to use your input fasta and run locally. Can you share the fasta with me? I would prefer NOT email, so either dropbox, or similar?

itiago commented 8 years ago

I'm sending you a link to share metagenomes by email. Hopefully you'll figure this out.

StephCarr commented 8 years ago

Hello, Was there a resolution to this problem? I'm getting a similar error.

Here's my original command: scarr@kuat:~/MeGAMergeOut$ MeGAMerge-1.1.pl -d MeGAMergeOut/ idba_udfiles/9.idba_ud_out_100/contig-100.fa idba_udfiles/10.idba_ud_out_100/contig-100.fa idba_udfiles/11.idba_ud_out_100/contig-100.fa

And the error: Command: /usr/local/bin/nucmer -maxmatch -c 80 MeGAMergeOut//minimus.fasta.ref.seq MeGAMergeOut//minimus.fasta.qry.seq -p MeGAMergeOut//minimus.fasta exited with status: 1 minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=80 MeGAMergeOut//minimus.fasta failed: Died at /usr/local/bin/MeGAMerge-1.1.pl line 280.

The nucmer.error text is: 20160125|200822| 55917| ERROR: mummer and/or mgaps returned non-zero

Was this a problem related to the fasta file header? My minimus.fasta header looks reasonable: >Contig_0 but I guess the original fasta could be simplified:

contig-100_0 length_48240 read_count_293705

I'm interested to know if itiago's problem was solved and if I could use his solution to solve my problem. Thanks!

scholzmb commented 8 years ago

Hello,

The original bug in this thread (which is HOPEFULLY your bug as well) is due to the SIZE of the input fasta to nucmer, causing nucmer to crash.

I am waiting on confirmation that my "bugfix" for this is functional for other users. The problem is in lack of documentation for the installation of the prerequisite software (specifically MUMmer in this case).

The current "best" fix option is to recompile MUMmer (in the same directory) using the following series of commands:

make clean make CPPFLAGS="-O3 -DSIXTYFOURBITS"

This will recompile MUMmer in 64 bit mode, which allows for larger input file size.

If you can perform this, then we should be able to continue.

LIkely release 1.2 will also include custom copies of MUMmer and amos with minor changes to improve these issues. At bare minimum, I am updating the documentation to indicate the change for compiling MUMmer properly.

StephCarr commented 8 years ago

Thank you! That did the trick and now MeGAMerge finishes without problems.

scholzmb commented 8 years ago

Documentation is updated. Custom install versions of MUMmer and amos tools added to wishlist for V1.2.

Closing ticket.

nghait commented 8 years ago

Please give me a hand, I'm trying to run MeGAMerge-1.1.pl like pasted following:

perl /home/nguyen/Documents/assembler/MeGAMerge-master/MeGAMerge-1.1.pl -overlap 100 -bindir /home/nguyen/Documents/MUMmer/MUMmer3.23/ -bindir /usr/local/AMOS/bin/ -newblerdir /home/nguyen/Documents/assembler/DataAnalysis_2.9_All/packages/opt/454/apps/mapper/bin/ -minLen 200 /home/nguyen/Documents/assembler/data_directory -force -d contigs1d.fa COMMAND perl /home/nguyen/Documents/assembler/MeGAMerge-master/MeGAMerge-1.1.pl -overlap 100 -bindir /home/nguyen/Documents/MUMmer/MUMmer3.23/ -bindir /usr/local/AMOS/bin/ -newblerdir /home/nguyen/Documents/assembler/DataAnalysis_2.9_All/packages/opt/454/apps/mapper/bin/ -minLen 200 /home/nguyen/Documents/assembler/data_directory -force -d contigs1d.fa The Merged FASTA will be stored in /home/nguyen/Documents/assembler/data_directory/MergedContigs.fasta Reading contigs1d.fa Running Newbler assembly with 93 sequences runAssembly -force -large -rip -mi 98 -ml 100 -pairt -cpu 4 -a 200 -o /home/nguyen/Documents/assembler/data_directory/newbler /home/nguyen/Documents/assembler/data_directory/newblerIn.fasta Initialized assembly project directory /home/nguyen/Documents/assembler/data_directory/newbler 1 read file successfully added. newblerIn.fasta (Fasta dataset) Assembly computation starting at: Tue May 24 17:28:48 2016 (v2.9 (20130529_1641)) Indexing newblerIn.fasta... Warning: No quality scores file found. -> 93 reads, 61403 bases. Setting up long overlap detection... -> 88 of 88, 88 reads to align Building a tree for 796 seeds... Computing long overlap alignments...

1 sequences marked as repeats, 0 in alignments, removing from 0 chords... -> 88 of 88 Setting up overlap detection... -> 88 of 88, 87 reads to align Starting seed building... -> 88 of 88 Building a tree for 4497 seeds... Computing alignments...

3 sequences marked as repeats, 2 in alignments, removing from 3 chords... -> 88 of 88 Checkpointing... Detangling alignments... -> Level 4, Phase 9, Round 1... Checkpointing... Building contigs/scaffolds... -> 0 large contigs, 0 all contigs Computing signals... -> 0 of 0... Generating output... -> 0 of 0... Assembly computation succeeded at: Tue May 24 17:28:48 2016 85 newbler singletons sequences Checking 454PairAlign.txt Unique Newbler Singletons (>=200 bp): 85 opening /home/nguyen/Documents/assembler/data_directory/minimus.fasta for writing opening /home/nguyen/Documents/assembler/data_directory/largefile.fasta for reading opening /home/nguyen/Documents/assembler/data_directory/newbler/All.fasta for reading Running Minimus2 with 709 sequences Max ID: 2130 minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=100 /home/nguyen/Documents/assembler/data_directory/minimus.fasta The log file is: /home/nguyen/Documents/assembler/data_directory/minimus.fasta.runAmos.log Doing step 10: Building AMOS bank & Dumping reads Doing step 11 Doing step 12 Doing step 13 Doing step 20: Getting overlaps Doing step 21 Command: /usr/local/bin/show-coords -H -c -l -o -r -I 98 /home/nguyen/Documents/assembler/data_directory/minimus.fasta.delta | /usr/local/AMOS/bin/nucmerAnnotate | egrep 'BEGIN|END|CONTAIN|IDENTITY' > /home/nguyen/Documents/assembler/data_directory/minimus.fasta.coords exited with status: 1 minimus2 -D CONSERR=0.06 -D MINID=98 -D OVERLAP=100 /home/nguyen/Documents/assembler/data_directory/minimus.fasta failed: Died at /home/nguyen/Documents/assembler/MeGAMerge-master/MeGAMerge-1.1.pl line 280.

After a half of day without any light, Could any one give me a hint?

nghait commented 8 years ago

I found solution, the error is due to wrong PATH used in mimimus2 as default, the PATH should be changed to where show-coords is located, thus /usr/local/bin/show-coords will be amos/bin/show-coords I used at the terminal: perl -pi -e s,"SHOWCOORDS\s+=.*,SHOWCOORDS=which show-coords,g" amos/bin/minimus2 thank to the post https://sourceforge.net/p/amos/mailman/message/33340118/ I hope MeGAMerge-1.1.pl works well, Thank you all for making it available and change life.