Re: [Biopython] pd.df.to_csv(..., compression="bgzip")?
Peter Cock <[email protected]> Wed, 13 Mar 2024 10:49:08 +0000
| Newsgroups | gmane.comp.python.bio.general |
|---|---|
| Message-ID | <CAKVJ-_4ewCXhQaVz6oC+7y3EyctmRWYsVrGhyRiz6b0uh4zubA@mail.gmail.com> |
--===============3807267584801893994== Content-Type: multipart/alternative; boundary="000000000000e68db0061388860a" --000000000000e68db0061388860a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes. BGZF is just a special kind of GZIP file, if all you are doing is decompressing it for reading it then the standard gzip.open(...) is fine. Peter On Wed, Mar 13, 2024 at 10:03=E2=80=AFAM Dan Bolser <[email protected]= k> wrote: > bgzip is a 'bio' thing, so thought I'd ask here. It's perhaps not > 'biopython', but it's bio/python. > > On Tue, 12 Mar 2024 at 19:11, Sean Brimer <[email protected]> wrote: > >> Hi Dan, >> >> This feels more like a panda's issue than a biopython issue. That said, = I >> think you could just use gzip. I think. bgzip for samtools was built on = top >> of gzip so it probably decompresses in a similar way. >> >> On Tue, Mar 12, 2024 at 12:52=E2=80=AFPM Dan Bolser <[email protected]= o.uk> >> wrote: >> >>> Hi, >>> >>> I can pass `compression=3D"gzip"` to pandas.DataFrame.to_csv, but not >>> bgzip... how to update pandas to support bgzip? >>> >>> >>> Thanks, >>> _______________________________________________ >>> Biopython mailing list - [email protected] >>> https://mailman.open-bio.org/mailman/listinfo/biopython >>> >> _______________________________________________ > Biopython mailing list - [email protected] > https://mailman.open-bio.org/mailman/listinfo/biopython > --000000000000e68db0061388860a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Yes. BGZF is just a special kind of GZIP file, if all= you are doing is</div><div>decompressing it for reading it then the standa= rd gzip.open(...)</div><div>is fine.</div><div><br></div><div>Peter<br></di= v><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Wed, Mar 13, 2024 at 10:03=E2=80=AFAM Dan Bolser <<a= href=3D"mailto:[email protected]">[email protected]</a>> wr= ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px= 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D= "ltr">bgzip is a 'bio' thing, so thought I'd ask here. It's= perhaps not 'biopython', but it's bio/python.</div><br><div cl= ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, 12 Mar 20= 24 at 19:11, Sean Brimer <<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:<br></div><blockquote class=3D= "gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2= 04,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi Dan, <br></div><div>= <br></div><div>This feels more like a panda's issue than a biopython is= sue. That said, I think you could just use gzip. I think. bgzip for samtool= s was built on top of gzip so it probably decompresses in a similar way. <b= r></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmai= l_attr">On Tue, Mar 12, 2024 at 12:52=E2=80=AFPM Dan Bolser <<a href=3D"= mailto:[email protected]" target=3D"_blank">[email protected]</= a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p= x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d= iv dir=3D"ltr">Hi,<div><br></div><div>I can pass `compression=3D"gzip&= quot;` to pandas.DataFrame.to_csv, but not bgzip... how to update pandas to= support bgzip?</div><div><br></div><div><br></div><div>Thanks,</div></div> _______________________________________________<br> Biopython mailing list=C2=A0 -=C2=A0 <a href=3D"mailto:Biopython@biopython.= org" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mailman.open-bio.org/mailman/listinfo/biopython" rel=3D"= noreferrer" target=3D"_blank">https://mailman.open-bio.org/mailman/listinfo= /biopython</a><br> </blockquote></div> </blockquote></div> _______________________________________________<br> Biopython mailing list=C2=A0 -=C2=A0 <a href=3D"mailto:Biopython@biopython.= org" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mailman.open-bio.org/mailman/listinfo/biopython" rel=3D"= noreferrer" target=3D"_blank">https://mailman.open-bio.org/mailman/listinfo= /biopython</a><br> </blockquote></div> --000000000000e68db0061388860a-- --===============3807267584801893994== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Biopython mailing list - [email protected] https://mailman.open-bio.org/mailman/listinfo/biopython --===============3807267584801893994==--