Skip to content
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

How do define genome #97

Closed
qliugithub opened this issue Feb 8, 2023 · 2 comments
Closed

How do define genome #97

qliugithub opened this issue Feb 8, 2023 · 2 comments

Comments

@qliugithub
Copy link

Nice packages!
From the help message, I find the genome arguments only mm9 and hg38, How Can I define the other genomes, thanks.

@cnluzon
Copy link
Owner

cnluzon commented Feb 9, 2023

Thanks for the feedback! The only functions thatuse the genome as parameter are the bins functions (bw_bins, plot_bw_bins_*), since they need to know the chromosomes and lengths, but this information is pulled via Seqinfo from the GenomeInfoDb package so in reality, anything supported by the package works. I had not documented this before because we use it for mainly those genomes, so I did not have bigWigs from other genomes, but it should work for other genomes too, like "dm3" or "GRCh38". At least, I checked that build_bins function works, so let me know if bw_bins does not work for your files. See the Seqinfo documentation for more examples: https://www.rdocumentation.org/packages/GenomeInfoDb/versions/1.8.3/topics/seqinfo

@cnluzon
Copy link
Owner

cnluzon commented Mar 21, 2024

Since this works, I will close this issue.

Note that sometimes GenomeInfoDb updates make build_bins crash but this eventually gets fixed. In the case where it does not, one could use bw_loci* functions with a custom build GRanges object. If one has a typical chromsizes file, this can be done this way using SeqInfo and GenomicRanges::tileGenome function.

gsizes <- read.table("mm39.chrom.sizes")
# This builds a Seqinfo object (needs GenomeInfoDb)
sq <- Seqinfo(seqnames = gsizes$V1, seqlengths = gsizes$V2)
gr_tiles <- GenomicRanges::tileGenome(sq, tilewidth = 10000, cut.last.tile.in.chrom = TRUE)

@cnluzon cnluzon closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants