<p>We are trying to use <a href="https://www.biorxiv.org/content/10.1101/2024.02.15.580594v1" rel="nofollow noreferrer">CoRAL</a> to reconstruct ecDNA. However, we have a problem in CoRAL.py reconstruct, when an error is obtained in infer_breakpoint_graph step. The only difference is reads' article are aligned with winnowmap, meanwhile ours are aligned with pbmm2, but column 3 of both bam files (paper and study) have identical names (&quot;chr5&quot;). However, if reads are aligned with winnowap there is no error. So, I would like to ask if anyone knows what we should modify in order to use aligned reads with pbmm2.</p>
<pre><code>Error message:
Traceback (most recent call last):
  File &quot;/ngs/coral_soft/CoRAL/src/CoRAL.py&quot;, line 150, in &lt;module&gt;
    reconstruct_mode(args)
  File &quot;/ngs/coral_soft/CoRAL/src/CoRAL.py&quot;, line 23, in reconstruct_mode
    infer_breakpoint_graph.reconstruct(args)
  File &quot;/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py&quot;, line 1630, in reconstruct
    b2bn.find_amplicon_intervals()
  File &quot;/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py&quot;, line 224, in find_amplicon_intervals
    self.find_interval_i(ai, ccid)
  File &quot;/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py&quot;, line 362, in find_interval_i
    if i in self.chimeric_alignments_seg[chr]:
KeyError: 'chr5'
</code></pre>
<pre><code>Output from winnowmmap 

m84126_240514_124343_s2/259004013/ccs   16      chr20   60748778        60     3              2149S181M1D119M1D157M1D80M1D441M1I92M1D1211M1D496M1D286M1D200M1D230M1I102M1D466M1I141M1I337M1D396M1D111M1I187M6228S    *       0       0       GCCTTGCCTGCTGGGC NM:i:20 ms:i:10346      AS:i:10346      nn:i:0  tp:A:P  cm:i:169        s1:i:2190       s2:i:0  de:f:0.0038     SA:Z:chr20,60748778,+,32229S5235M10D6151S,60,32;chr20,60748778,+,1112S5123M7D37380S,60,24;chr20,60748778,-,1034S5124M6D37457S,60,35;chr20,60748778,+,18055S4288M2I21270S,60,12;chr20,60747102,+,11464S3447M4D28704S,60,8;chr20,60747102,-,11384S3446M5D28785S,60,16;chr20,60748778,-,17974S3310M22331S,60,13;chr20,60747102,+,25639S3150M7D14826S,60,8;chr20,60747102,-,25558S3150M7D14907S,60,8;chr20,60747102,-,42501S1114M6D,60,6;chr20,60747102,+,42579S1034M3D2S,60,8;     rl:i:11102 
</code></pre>
<p>Output pacbio</p>
<pre><code>m84126_240514_124343_s2/165615159/ccs   2048    chr1    19746   60      3994S30=1X81=1X83=1X112=1X43=2D203=1X16=1X20=1X124=1X44=1X66=1X149=1X42=9542S *       0       1026    TGTTCCTTGTAAAT IDDI+D2DDI+IDDIIDII  ML:B:C,21,113,104,179,70,105,198,44,42,228,148,183,70,175,95,67,84,68,234,208,25,128,22,67,74,134,43,194,48,169,50,224,23,185,204,139,101,73,245,209,44,68,40,15,232,103,128,243,148,67,205,100,97,123,230,96,150,217,146,64,17,187,247,63,110,121,235,29,51,43,228,19,165,77,231,141,19,63,219,100,129,36,28,25,12,31,53,87,53,112,112,25,128,119,42,9,166,43,90,40,121,166,99,139,95,86,155,75,65,41,198,68,60,10,77,36,151,21,82,67,103,87,3,60,62,30,15,82,10,63,71,126,48,80,161,139,45,73,71,67,92,144,225,160,138,15,32,76,43,59,12,156,160,31,154,49,60,17,240,40,104,147,170,114,128,15,12,79,178,25,121,180,189,168,73,35,136,51,21,31,42,25,16,39,139,59,103,39,60,70,47,15,111,73,138,154,63,83,34,218,158,37,72,26,46,131,38,91,141,103,19,74,92,139,17,142,7,95,52,33,52,79,53,71,128,199,55,94,88,35   MM:Z:C+m?,14,28,33,5,7,9,9,0,16,48,7,27,5,2,27,14,0,8,10,6,2,28,18,18,15,9,15,4,15,29,5,9,27,20,28,33,5,7,9,9,0,16,10,18,15,9,16,44,13,4,3,9,27,20,28,32,5,6,9,9,0,16,48,7,27,5,2,27,14,0,8,10,6,2,29,18,18,15,9,15,4,15,29,5,9,27,20,16,15,0,8,10,6,2,27,18,18,15,9,17,44,13,4,3,9,27,20,28,33,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8,10,6,2,28,18,18,15,9,15,4,15,29,5,9,27,20,27,33,5,7,9,9,0,16,10,18,15,9,16,44,13,4,3,9,26,20,28,32,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8,10,6,2,28,17,18,15,9,15,4,15,29,5,9,27,20,16,15,0,8,10,6,2,28,18,18,15,9,17,44,13,4,3,9,27,20,28,32,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8;    ac:B:i,4,1,0,7  bx:B:i,18,0     ec:f:5.87705    ma:i:2np:i:5  rq:f:0.998114   sn:B:f,12.4004,18.8046,4.50223,7.72926  we:i:4525584    ws:i:41102   zm:i:165615159   qs:i:18 qe:i:14578      bc:B:S,3,3      bq:i:100        cx:i:4  bl:Z:ATCACGCACACACGCGCG       bt:Z:   ql:Z:IID+7D&lt;2&lt;2+DDDDDDD qt:Z:   ls:B:C,137,162,98,99,164,51,45,45,51,162,98,113,100,163,99,115,97,255,164,108,101,97,100,132,164,99,53,109,99,147,5,0,0,164,113,53,109,99,147,5,2,9,162,113,108,178,73,73,68,43,55,68,60,50,60,50,43,68,68,68,68,68,68,68,162,115,113,178,65,84,67,65,67,71,67,65,67,65,67,65,67,71,67,71,67,71,166,110,101,115,116,101,100,192,164,112,53,109,99,0,163,112,115,97,0,163,115,115,97,0,165,116,114,97,105,108,192        RG:Z:a9765f35/3--3    mg:f:98.8293    NM:i:13 rm:i:1  SA:Z:chr1,190269,-,7008S112=1X83=1X112=1X43=2D479=1D157=1D11=2I22=6528S,60,3;chr1,190531,-,5188S91=2D359=1D532=8390S,60,0;chr1,190269,-,264S112=1X83=1X112=1X43=2D190=1D329=1D121=1D13=1I15=13274S,17,3;chr1,190531,+,5548S91=2D279=1D195=1I414=8032S,34,0;chr1,190269,+,622S88=1I24=1X83=1X112=1X34=1D7=1D1=1X249=1I121=1D208=1D91=12914S,7,4;chr1,190531,-,11935S59=1D31=2D62=1D12=1I814=1646S,60,0;chr1,190531,+,12297S91=2D266=1D208=1D286=1D126=1286S,60,0;chr1,190451,+,7552S14=1X112=1X43=2D40=1D627=6170S,27,2;chr1,190445,+,10919S5=1X14=1X112=1X43=2D19=1I286=1D365=2793S,25,3;chr1,190451,-,10566S14=1X112=1X43=2D106=1D93=1D470=3154S,22,2;chr1,190451,-,13938S14=1X112=1X7=1D35=2D103=1D349=,27,2;chr1,19928,+,14296S14=1X34=1D77=1X43=2D74=20S,1,2;
</code></pre>

CC BY-SA 4.0
2024-08-29T23:07:07.453Z
Why do you need to use pbmm2? Can you show the first few lines of output from pbmm2 and winnowmap?
gringer
CC BY-SA 4.0
2024-08-30T12:38:18.970Z
@gringer I have updated the question and reduced the nucleotide and quality columns from pbmm2 and winnowmap output.
María José
<long-reads><pacbio><human-genome>
Using CoRAL to reconstruct ecDNA
# Using CoRAL to reconstruct ecDNA

(Asked by: username_0 on 2024-08-29)

We are trying to use CoRAL to reconstruct ecDNA. However, we have a problem in CoRAL.py reconstruct, when an error is obtained in infer_breakpoint_graph step. The only difference is reads' article are aligned with winnowmap, meanwhile ours are aligned with pbmm2, but column 3 of both bam files (paper and study) have identical names ("chr5"). However, if reads are aligned with winnowap there is no error. So, I would like to ask if anyone knows what we should modify in order to use aligned reads with pbmm2.
Error message:
Traceback (most recent call last):
  File "/ngs/coral_soft/CoRAL/src/CoRAL.py", line 150, in 
    reconstruct_mode(args)
  File "/ngs/coral_soft/CoRAL/src/CoRAL.py", line 23, in reconstruct_mode
    infer_breakpoint_graph.reconstruct(args)
  File "/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py", line 1630, in reconstruct
    b2bn.find_amplicon_intervals()
  File "/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py", line 224, in find_amplicon_intervals
    self.find_interval_i(ai, ccid)
  File "/ngs/coral_soft/CoRAL/src/infer_breakpoint_graph.py", line 362, in find_interval_i
    if i in self.chimeric_alignments_seg[chr]:
KeyError: 'chr5'

Output from winnowmmap 

m84126_240514_124343_s2/259004013/ccs   16      chr20   60748778        60     3              2149S181M1D119M1D157M1D80M1D441M1I92M1D1211M1D496M1D286M1D200M1D230M1I102M1D466M1I141M1I337M1D396M1D111M1I187M6228S    *       0       0       GCCTTGCCTGCTGGGC NM:i:20 ms:i:10346      AS:i:10346      nn:i:0  tp:A:P  cm:i:169        s1:i:2190       s2:i:0  de:f:0.0038     SA:Z:chr20,60748778,+,32229S5235M10D6151S,60,32;chr20,60748778,+,1112S5123M7D37380S,60,24;chr20,60748778,-,1034S5124M6D37457S,60,35;chr20,60748778,+,18055S4288M2I21270S,60,12;chr20,60747102,+,11464S3447M4D28704S,60,8;chr20,60747102,-,11384S3446M5D28785S,60,16;chr20,60748778,-,17974S3310M22331S,60,13;chr20,60747102,+,25639S3150M7D14826S,60,8;chr20,60747102,-,25558S3150M7D14907S,60,8;chr20,60747102,-,42501S1114M6D,60,6;chr20,60747102,+,42579S1034M3D2S,60,8;     rl:i:11102 

Output pacbio
m84126_240514_124343_s2/165615159/ccs   2048    chr1    19746   60      3994S30=1X81=1X83=1X112=1X43=2D203=1X16=1X20=1X124=1X44=1X66=1X149=1X42=9542S *       0       1026    TGTTCCTTGTAAAT IDDI+D2DDI+IDDIIDII  ML:B:C,21,113,104,179,70,105,198,44,42,228,148,183,70,175,95,67,84,68,234,208,25,128,22,67,74,134,43,194,48,169,50,224,23,185,204,139,101,73,245,209,44,68,40,15,232,103,128,243,148,67,205,100,97,123,230,96,150,217,146,64,17,187,247,63,110,121,235,29,51,43,228,19,165,77,231,141,19,63,219,100,129,36,28,25,12,31,53,87,53,112,112,25,128,119,42,9,166,43,90,40,121,166,99,139,95,86,155,75,65,41,198,68,60,10,77,36,151,21,82,67,103,87,3,60,62,30,15,82,10,63,71,126,48,80,161,139,45,73,71,67,92,144,225,160,138,15,32,76,43,59,12,156,160,31,154,49,60,17,240,40,104,147,170,114,128,15,12,79,178,25,121,180,189,168,73,35,136,51,21,31,42,25,16,39,139,59,103,39,60,70,47,15,111,73,138,154,63,83,34,218,158,37,72,26,46,131,38,91,141,103,19,74,92,139,17,142,7,95,52,33,52,79,53,71,128,199,55,94,88,35   MM:Z:C+m?,14,28,33,5,7,9,9,0,16,48,7,27,5,2,27,14,0,8,10,6,2,28,18,18,15,9,15,4,15,29,5,9,27,20,28,33,5,7,9,9,0,16,10,18,15,9,16,44,13,4,3,9,27,20,28,32,5,6,9,9,0,16,48,7,27,5,2,27,14,0,8,10,6,2,29,18,18,15,9,15,4,15,29,5,9,27,20,16,15,0,8,10,6,2,27,18,18,15,9,17,44,13,4,3,9,27,20,28,33,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8,10,6,2,28,18,18,15,9,15,4,15,29,5,9,27,20,27,33,5,7,9,9,0,16,10,18,15,9,16,44,13,4,3,9,26,20,28,32,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8,10,6,2,28,17,18,15,9,15,4,15,29,5,9,27,20,16,15,0,8,10,6,2,28,18,18,15,9,17,44,13,4,3,9,27,20,28,32,5,7,9,9,0,16,44,0,6,25,4,32,14,0,8;    ac:B:i,4,1,0,7  bx:B:i,18,0     ec:f:5.87705    ma:i:2np:i:5  rq:f:0.998114   sn:B:f,12.4004,18.8046,4.50223,7.72926  we:i:4525584    ws:i:41102   zm:i:165615159   qs:i:18 qe:i:14578      bc:B:S,3,3      bq:i:100        cx:i:4  bl:Z:ATCACGCACACACGCGCG       bt:Z:   ql:Z:IID+7D<2<2+DDDDDDD qt:Z:   ls:B:C,137,162,98,99,164,51,45,45,51,162,98,113,100,163,99,115,97,255,164,108,101,97,100,132,164,99,53,109,99,147,5,0,0,164,113,53,109,99,147,5,2,9,162,113,108,178,73,73,68,43,55,68,60,50,60,50,43,68,68,68,68,68,68,68,162,115,113,178,65,84,67,65,67,71,67,65,67,65,67,65,67,71,67,71,67,71,166,110,101,115,116,101,100,192,164,112,53,109,99,0,163,112,115,97,0,163,115,115,97,0,165,116,114,97,105,108,192        RG:Z:a9765f35/3--3    mg:f:98.8293    NM:i:13 rm:i:1  SA:Z:chr1,190269,-,7008S112=1X83=1X112=1X43=2D479=1D157=1D11=2I22=6528S,60,3;chr1,190531,-,5188S91=2D359=1D532=8390S,60,0;chr1,190269,-,264S112=1X83=1X112=1X43=2D190=1D329=1D121=1D13=1I15=13274S,17,3;chr1,190531,+,5548S91=2D279=1D195=1I414=8032S,34,0;chr1,190269,+,622S88=1I24=1X83=1X112=1X34=1D7=1D1=1X249=1I121=1D208=1D91=12914S,7,4;chr1,190531,-,11935S59=1D31=2D62=1D12=1I814=1646S,60,0;chr1,190531,+,12297S91=2D266=1D208=1D286=1D126=1286S,60,0;chr1,190451,+,7552S14=1X112=1X43=2D40=1D627=6170S,27,2;chr1,190445,+,10919S5=1X14=1X112=1X43=2D19=1I286=1D365=2793S,25,3;chr1,190451,-,10566S14=1X112=1X43=2D106=1D93=1D470=3154S,22,2;chr1,190451,-,13938S14=1X112=1X7=1D35=2D103=1D349=,27,2;chr1,19928,+,14296S14=1X34=1D77=1X43=2D74=20S,1,2;

**Tags:** long-reads, pacbio, human-genome
> **Comments:**
> **username_1**: Why do you need to use pbmm2? Can you show the first few lines of output from pbmm2 and winnowmap?  
> **username_0**: @gringer I have updated the question and reduced the nucleotide and quality columns from pbmm2 and winnowmap output.  

---

## 0 answers

