daler · GitHub

Hey @daler, this is more of a question at the moment than a full-fledged PR. Would you be interested in including genomepy support in pybedtools? I have a proof-of-concept implementation in this PR. Genomepy is a Python module to manage and use genomes. It supports download of genomes from UCSC, Ensembl or NCBI and streamlines a lot of things. One file it creates by default is a file with chromosome sizes. This can be accessed using genomepy as follows:

g = genomepy.Genome("hg38")
print(g.sizes_file)
/home/simon/.local/share/genomes/hg38/hg38.fa.sizes

The idea here would be that if genomepy is installed, the name of the genome could be used as the genome argument to all of the pybedtools functions that require a genome. There is, I think, not a lot of overhead if you don't have genomepy installed, and it wouldn't touch any of the existing functionality. However, if you do have genomepy, there is no need to provide a full path. It would be really useful to us, but then again, as the developers of genomepy we use it a lot :).

Let me know what you think!

Read the original on github.com ↗