<div dir="ltr"><div>Dear Carson:<br></div><div><br></div><div>I did more tests on one of the contigs (with length 863kb) that failed when doing repeat masking. I found it only fail when I added the species specific repeat library, and it can be successfully annotated when only considering mammalian repeat library. When I did the test I only picked the this contig and run maker with 64G memory. So I think the failure should not be the problem with memory or IO, because even the contigs with length 98Mb can be annotated with memory 32G. <br></div><div><br></div><div>I also run RepeatMasker on this contig with mammalian and species specific repeat library, separately. I found when I use  mammalian repeat library, about 35% was masked as repeats, while it is 65% when I use species specific repeat library (as shown below in blue). I wonder whether the high level of repeats can lead to the failure of this contig.  Do you have any ideas about this. Thanks<br></div><div><br></div><div><br></div><div><br></div><div><span style="color:rgb(0,0,255)">file name: test_scaffold31.fasta    <br>sequences:             1<br>total length:     863590 bp  (858757 bp excl N/X-runs)<br>GC level:         37.02 %<br>bases masked:     562909 bp ( 65.18 %)<br>==================================================<br>               number of      length   percentage<br>               elements*    occupied  of sequence<br>--------------------------------------------------<br>SINEs:              113        16134 bp    1.87 %<br>      ALUs           71        12479 bp    1.45 %<br>      MIRs            1          133 bp    0.02 %<br><br>LINEs:              251       380142 bp   44.02 %<br>      LINE1         211       210623 bp   24.39 %<br>      LINE2           1           86 bp    0.01 %<br>      L3/CR1          0            0 bp    0.00 %<br><br>LTR elements:       246       101221 bp   11.72 %<br>      ERVL            5         1037 bp    0.12 %<br>      ERVL-MaLRs     18         2744 bp    0.32 %<br>      ERV_classI    201        90942 bp   10.53 %<br>      ERV_classII    18         5964 bp    0.69 %<br><br>DNA elements:        39        14177 bp    1.64 %<br>     hAT-Charlie      7         3864 bp    0.45 %<br>     TcMar-Tigger     7         1706 bp    0.20 %<br><br>Unclassified:       196        45831 bp    5.31 %<br><br>Total interspersed repeats:   557505 bp   64.56 %<br><br><br>Small RNA:            3          823 bp    0.10 %<br><br>Satellites:           2          237 bp    0.03 %<br>Simple repeats:      94         4472 bp    0.52 %<br>Low complexity:      18          766 bp    0.09 %<br>==================================================<br><br>* most repeats fragmented by insertions or deletions<br>  have been counted as one element<br>                                                      <br><br>The query species was assumed to be homo          <br>RepeatMasker Combined Database: Dfam_Consensus-20170127, RepBase-20170127<br>        <br>run with rmblastn version 2.2.27+<br>The query was compared to classified sequences in ".../consensi.fa.classifiednoProtFinal"  <br></span></div><div><span style="color:rgb(0,0,255)"><br></span></div><div><span style="color:rgb(0,0,255)"><br></span></div><div><span style="color:rgb(0,0,0)">Best</span></div><div><span style="color:rgb(0,0,0)">Quanwei</span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 14:33 GMT-04:00 Quanwei Zhang <span dir="ltr"><<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear Carson:<br><br></div>I see. Thank you. I will try it.<br><br></div>Best<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Quanwei<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 13:46 GMT-04:00 Carson Holt <span dir="ltr"><<a href="mailto:carsonhh@gmail.com" target="_blank">carsonhh@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Each node is a single machine. Because you currently run without MPI, each MAKER job you submit runs on a single machine. So you are either running multiple times on the same node, or you submitted 5 separate batch jobs in which case you may have a single maker process on each of 5 nodes.<div><br></div><div>MPI can parallelize on the same node or across nodes. If you request 10 nodes, then it can communicate across nodes to run the job on all hardware. Or you can run MPI on a single node and ask for all CPUs on that node. In that case it will split up work within a single node and use all resources just on that node. So if you can’t get MPI to work across nodes, you can just submit a job that goes to a single node and ask for all CPUs on that node (multinode jobs may be hard to configure, but single node jobs are very easy). Just set the -n parameter of mpiexec to the CPU count of that node, and it will parallelize within the node.</div><div><br></div><div>Example command for a 20 CPU node —>  mpiexec -n 20 maker</div><span class="m_2744452880001976007HOEnZb"><font color="#888888"><div><br></div><div>—Carson</div></font></span><div><div class="m_2744452880001976007h5"><div><br></div><div><br></div><div><br><div><br></div><div><br><div><blockquote type="cite"><div>On Sep 11, 2017, at 11:27 AM, Quanwei Zhang <<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>> wrote:</div><br class="m_2744452880001976007m_-405216989100410778Apple-interchange-newline"><div><div dir="ltr"><div><div><div>Dear Carson: <br><br>Would you please explain what do you mean by "a single machine"? I am running maker2 on our high performance cluster. The cluster has more than 1,620-core compute nodes with 128 GB RAM each. Univa Grid Engine was used as the scheduler. Can I use MPICH3?<br><br></div>Thanks<br><br></div>Best<br></div>Quanwei<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 13:18 GMT-04:00 Carson Holt <span dir="ltr"><<a href="mailto:carsonhh@gmail.com" target="_blank">carsonhh@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If you are just using a single machine (and not cross machine MPI), use MPICH3 —> <a href="https://www.mpich.org/" target="_blank">https://www.mpich.org</a><div><br></div><div>It’s easy to install yourself, and tends to be very robust to failure.</div><span class="m_2744452880001976007m_-405216989100410778HOEnZb"><font color="#888888"><div><br></div><div>—Carson</div></font></span><div><div class="m_2744452880001976007m_-405216989100410778h5"><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div>On Sep 11, 2017, at 11:16 AM, Quanwei Zhang <<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>> wrote:</div><br class="m_2744452880001976007m_-405216989100410778m_1642864674499809896Apple-interchange-newline"><div><div dir="ltr"><div><div><div><div>Dear Carson:<br><br></div>I met some problems to use MPI. I will give it another try.<br></div>Thank you!<br><br></div>Best<br></div>Quanwei<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 13:14 GMT-04:00 Carson Holt <span dir="ltr"><<a href="mailto:carsonhh@gmail.com" target="_blank">carsonhh@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">It could be either. Please use MPI instead of starting multiple instances. It will greatly reduce both IO and RAM usage.<span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896HOEnZb"><font color="#888888"><div><br></div><div>—Carson</div></font></span><div><div class="m_2744452880001976007m_-405216989100410778m_1642864674499809896h5"><div><br><div><br></div><div><br><div><blockquote type="cite"><div>On Sep 11, 2017, at 11:12 AM, Quanwei Zhang <<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>> wrote:</div><br class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321Apple-interchange-newline"><div><div dir="ltr"><div><div><div><div><div>Dear Carson:<br><br></div>I only run 5 Maker 
instances in each directory (and set cpus=2). If it is related to memory issue or an IO 
issue, I am not sure why the much longer scaffolds (than the failed 
ones) were all annotated successfully, but the relatively shorter ones 
failed.  <br><br></div>I have set "tries=5" (#number of times to try a contig if there is a failure for some reason). I will try "clean_try=1" and test on the failed scaffolds individually with larger memory to see whether they can be annotated. <br><br></div>Thank you!<br><br></div>Best<br></div>Quanwei</div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-11 13:07 GMT-04:00 Carson Holt <span dir="ltr"><<a href="mailto:carsonhh@gmail.com" target="_blank">carsonhh@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I think the cause of the error may have been a little further upstream from what you pasted in the e-mail. One thing that may be happening is that you are taxing resources (like IO) if running MAKER multiple times or on too many CPUs. That can lead to failures because of truncated BLAST reports etc. In which case you can just retry and that will get around those types of IO derived errors. MAKER can generate a lot of IO, and if you are working on network mounted locations (i.e. the storage being used is actually across the network), then they can be lest robust than local storage (when under heavy load NFS can falsely report success on read/write operations that actually failed). It’s the reason we built in the retry capabilities of MAKER.<div><br></div><div>For contigs that continuously fail, you may need to set clean_try=1. That will cause failures to start from scratch (i.e. delete all old reports on failure rather than just those suspected of being truncated).<span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321HOEnZb"><font color="#888888"><br><div><br></div></font></span><div><span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321HOEnZb"><font color="#888888">—Carson</font></span><div><div class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321h5"><br><div><br></div><div><br><div><blockquote type="cite"><div>On Sep 11, 2017, at 10:19 AM, Quanwei Zhang <<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>> wrote:</div><br class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263Apple-interchange-newline"><div><div dir="ltr"><div><div>Dear Carson:<br><br>About the error in my above email, I found the contig was correctly annotated at the second time RETRY. So please ignore my last email. But now, for a few number of scaffolds, I met problems to process the repeats (as shown below in red). I used both Mammalia repeat library and species specific repeat library (which is generated by your pipeline "<a href="http://weatherby.genetics.utah.edu/MAKER/wiki/index.php/Repeat_Library_Construction--Basic" target="_blank">http://weatherby.genetics.uta<wbr>h.edu/MAKER/wiki/index.php/Rep<wbr>eat_Library_Construction--Basi<wbr>c</a>"). There were no such problems when I only used Mammalia repeat library. Do you have any ideas about this? What could be the reason? Or do you have any suggestions for me to find the reason? Many thanks  <br></div><div><br></div><div>Here are some parameters I used</div><div><br></div><div>#-----Repeat Masking (leave values blank to skip repeat masking)<br>model_org=Mammalia #select a model organism for RepBase masking in RepeatMasker<br>rmlib=../consensi.fa.classifie<wbr>dnoProtFinal #provide an organism specific repeat library in fasta format for Repe<br><br></div><div>max_dna_len=300000</div><div>split_hit=40000<br></div><div>depth_blastn=30 #Blastn depth cutoff (0 to disable cutoff)<br>depth_blastx=30 #Blastx depth cutoff (0 to disable cutoff)<br>depth_tblastx=30 #tBlastx depth cutoff (0 to disable cutoff)<br>bit_rm_blastx=30 #Blastx bit cutoff for transposable element masking</div><div><br></div><div><br><span style="color:rgb(255,0,0)">Died at /gs/gsfs0/hpc01/apps/MAKER/2.3<wbr>1.9/bin/../lib/Bio/Search/Hit/<wbr>PhatHit/Base.pm line 188.<br>33708 --> rank=NA, hostname=n409<br>33709 ERROR: Failed while processing all repeats<br>33710 ERROR: Chunk failed at level:3, tier_type:1<br>33711 FAILED CONTIG:Contig31</span><br><br><br></div>Best<br></div>Quanwei<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-08 23:25 GMT-04:00 Quanwei Zhang <span dir="ltr"><<a href="mailto:qwzhang0601@gmail.com" target="_blank">qwzhang0601@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear Carson:</div><div><br></div><div>I got the following error again. Is this still related to memory issues? I wonder whether there can be other reasons lead to this error? This time, I got this error during training of the SNAP model. Before, even I set  max_dna_len=1Mb, I can train the model successfully.  And in the current training (where I get the following error),  I have decreased the max_dna_len to 300kb. I required the same amount memory as before. The only difference is that I am using both mammalian repeat library and species specific repeat library, while previously I only use the mammalian repeat library. Will it greatly increases the requirement of memory to use both repeat libraries (even when I decrease max_dna_len from 1Mb to 300kb)? I have also set the <span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263m_-3040512414793419403gmail-im">depth_blast as 30 in current training.</span></div><div><span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263m_-3040512414793419403gmail-im"><br></span></div><div><span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263m_-3040512414793419403gmail-im">Thank you! Have a nice weekend!</span>  </div><div><br></div><div><br></div><div><br>#-----------------------------<wbr>------------------------------<wbr>----------<br>Now starting the contig!!<br>SeqID: Contig10<br>Length: 18773588<br>#-----------------------------<wbr>------------------------------<wbr>----------<span><br><br><br>setting up GFF3 output and fasta chunks<br>doing repeat masking<br></span>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>doing blastx repeats<br>collecting blastx repeatmasking<br>processing all repeats<span><br>doing repeat masking<br><span style="color:rgb(255,0,0)">Can't kill a non-numeric process ID at /gs/gsfs0/hpc01/apps/MAKER/2.3<wbr>1.9/bin/../lib/File/NFSLock.pm line 1050.</span><br></span>--> rank=NA, hostname=n224<span><br>ERROR: Failed while doing repeat masking<br>ERROR: Chunk failed at level:0, tier_type:1<br></span>FAILED CONTIG:Contig10<br><br>ERROR: Chunk failed at level:2, tier_type:0<br>FAILED CONTIG:Contig10<br><br></div>Best<span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263HOEnZb"><font color="#888888"><br></font></span></div><span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263HOEnZb"><font color="#888888">Quanwei<br></font></span></div><div class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263HOEnZb"><div class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-09-06 12:06 GMT-04:00 Carson Holt <span dir="ltr"><<a href="mailto:carsonhh@gmail.com" target="_blank">carsonhh@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span><br><blockquote type="cite"><div><div dir="ltr">(2) By reading some of your replies in the maker google group, and I noticed that it can reduce memory and save time for annotation if I set depth_blast to a certain number. So I changed the following parameters. But I wonder, whether it will decrease the quality of annotation? If it won't affect the quality, can I even use a smaller number (e.g., 20) to save more memory and time?<br><div><br>depth_blastn=30 #Blastn depth cutoff (0 to disable cutoff)<br>depth_blastx=30 #Blastx depth cutoff (0 to disable cutoff)<br>depth_tblastx=30 #tBlastx depth cutoff (0 to disable cutoff)<br>bit_rm_blastx=30 #Blastx bit cutoff for transposable element masking</div></div></div></blockquote><div><br></div></span><div>This values really only affects the final evidence kept in the GFF3 when you look at it in a browser. It has not affect on the annotation. This is because internally MAKER already collapses evidence down to the 10 best non-redundant features per evidence set per locus. The rest are put in the GFF3 just for reference. by setting it lower, you are just letting MAKER know it can through things away even sooner since you don’t want them in the GFF3. It provides a minor improvement for memory use, but max_dna_length is the big one that has the greatest effect.</div><span><div><br></div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div>(3) I also have some concerns about the speed, especially for the long scaffolds (around 100Mb). I wonder which part is the most time consuming for genome annotation (repeat masking, blast, or polishing?).  Particularly, I wonder whether the blastx of protein evidence will take majority of time. Now, I have prepared 99k mammalian Swiss protein sequences and 340k rodent TrEMBL protein sequences as protein evidences. I am considering whether I can save much time if I only use the 99k mammalian Swiss protein sequences as evidences.</div></div></div></blockquote><div><br></div></span><div>BLASTN (ESTs) -> fastest as it is searching nucleotide space</div><div>BLASTX (proteins) -> must search 6 reading frames so will be at least 6 times slower than BLASTN</div><div>TBLASTX (alt-ESTs) -> must search 12 reading frames so will be at least 12 times slower than BLASTN and twice as slow as BLASTX</div><div><br></div><div>Also double the dataset size, double the runtime. Larger window sizes via max_dna_length will also increase runtimes.</div><span><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div>(4) For some reasons, I can not run maker though MPI on our cluster. So I
 can only start multiple maker. I wonder if it is possible to let 
multiple maker to annotate the same long scaffold (i.e., for a single 
sequence I start multiple maker, without splitting the long sequence 
into shorter ones).</div></div></div></blockquote><div><br></div></span><div>Without MPI you won’t be able to split up large contigs. At the very least you can try and run on a single node and set MPI to use all CPUs on that node. It’s less difficult to set up compared to cross node jobs via MPI.</div><span><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div>(5) Still about the speed issue. I read some of your comments about "cpus" parameters in the maker_opts file (<a href="http://gmod.827538.n3.nabble.com/open3-fork-failed-Cannot-allocate-memory-td4025117.html" target="_blank">http://gmod.827538.n3.nabble.<wbr>com/open3-fork-failed-Cannot-a<wbr>llocate-memory-td4025117.html</a>)<wbr>. And I know it indicate the number of cpus for a single chunk. So if I set "cpus=2" in the maker_opts file, then I can use the following command to submit the job, right?  </div></div></div></blockquote><div><br></div></span><div>The cpu parameter only affects how many CPUs are given to the blast command line. So only the BLASt step will speed up, so I recommend using MPI to get all steps to speed up. Even if you are only running on a single node, you can give all CPUs to the mpiexec command.</div><span class="m_2744452880001976007m_-405216989100410778m_1642864674499809896m_9219316643475805321m_-3719451897084494263m_-3040512414793419403HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>—Carson</div></font></span></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>