File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,10 @@ impl PyFlatGFA {
163163 let r: Vec < Vec < PyChunkEvent > > = parser. into_iter ( ) . map (
164164 |x| flatgfa:: ops:: gaf:: PathChunker :: new ( & gfa, & name_map, x)
165165 . into_iter ( )
166- . map ( |c| PyChunkEvent { chunk_event : c. into ( ) } )
166+ . map ( |c| PyChunkEvent {
167+ chunk_event : c. into ( ) ,
168+ gfa : self . 0 . clone ( ) ,
169+ } )
167170 . collect ( )
168171 ) . collect ( ) ;
169172
@@ -175,6 +178,7 @@ impl PyFlatGFA {
175178#[ pyo3( name = "ChunkEvent" , module = "flatgfa" ) ]
176179struct PyChunkEvent {
177180 chunk_event : Arc < ChunkEvent > ,
181+ gfa : Arc < Store > ,
178182}
179183
180184#[ pymethods]
@@ -200,8 +204,8 @@ impl PyChunkEvent {
200204 }
201205 }
202206
203- fn get_seq ( & self , gfa : & PyFlatGFA ) -> String {
204- let inner_gfa = gfa . 0 . view ( ) ;
207+ fn get_seq ( & self ) -> String {
208+ let inner_gfa = self . gfa . view ( ) ;
205209 let seq = inner_gfa. get_seq_oriented ( self . chunk_event . handle ) ;
206210
207211 match self . chunk_event . range {
@@ -771,5 +775,6 @@ fn pymod(m: &Bound<'_, PyModule>) -> PyResult<()> {
771775 m. add_class :: < PathList > ( ) ?;
772776 m. add_class :: < LinkList > ( ) ?;
773777 m. add_class :: < StepList > ( ) ?;
778+ m. add_class :: < PyChunkEvent > ( ) ?;
774779 Ok ( ( ) )
775780}
You can’t perform that action at this time.
0 commit comments