File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,11 @@ impl<R> BigBedRead<R> {
146146 pub fn chroms ( & self ) -> & [ ChromInfo ] {
147147 & self . info . chrom_info
148148 }
149+
150+ /// Consumes this `BigWigRead`, returning the underlying reader.
151+ pub fn into_inner ( self ) -> R {
152+ self . read
153+ }
149154}
150155
151156impl BigBedRead < ReopenableFile > {
@@ -190,6 +195,11 @@ impl<R: BBIFileRead> BigBedRead<R> {
190195 Ok ( BigBedRead { info, read } )
191196 }
192197
198+ /// Does *not* check if the passed `R` matches the provided info (including if the `R` is a bigBed at all!)
199+ pub fn with_info ( info : BBIFileInfo , read : R ) -> Self {
200+ BigBedRead { info, read }
201+ }
202+
193203 /// Reads the autosql from this bigBed
194204 pub fn autosql ( & mut self ) -> Result < Option < String > , BBIReadError > {
195205 let auto_sql_offset = self . info . header . auto_sql_offset ;
Original file line number Diff line number Diff line change @@ -191,6 +191,11 @@ impl<R> BigWigRead<R> {
191191 pub fn chroms ( & self ) -> & [ ChromInfo ] {
192192 & self . info . chrom_info
193193 }
194+
195+ /// Consumes this `BigWigRead`, returning the underlying reader.
196+ pub fn into_inner ( self ) -> R {
197+ self . read
198+ }
194199}
195200
196201impl BigWigRead < ReopenableFile > {
You can’t perform that action at this time.
0 commit comments