-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why different handling between GFF and mzml/genbank in polars. #93
Comments
@tshauck have you seen https://github.com/BiocPy? |
@abearab I've seen it, but not used it. I am a fan of those packages in R (e.g. granges). I also know there's some other analogues in Python for some of those bioconductor packages (e.g. AnnData). |
Yeah, I do like AnnData and scverse ecosystem a lot. However, a good implementation of granges for python has been missing for long time! I thought considering this granges can be very relevant to your implementation of annotation file formats (i.e. GTF, GFF, BED, BAM, etc.). This is just another suggestion, feel free to ignore it :) |
100% -- you can actually do a little of granges stuff via SQL joins, but it's not quite as intuitive or as specialized to genomic intervals. E.g. say you ran bakta, and wanted to get CDSs where a spacer annotation is within 100bp of a CDS WITH cds AS (
SELECT *
FROM gff_scan('bakta.gff')
WHERE type = 'cds'
), spacers AS (
SELECT *
FROM gff_scan('bakta.gff')
WHERE type = 'crispr-spacer'
)
SELECT *
FROM cds
JOIN spacers
ON spacers.start > (cds.start - 100) OR spacers.end < (cds.end - 100) I would certainly like to make it easier to do more complex granges stuff. |
All have maps, but GFF is converted ok into a polars df, but not the latter to.
The text was updated successfully, but these errors were encountered: