griffithlab / GenVisR

Genome data visualizations
Creative Commons Zero v1.0 Universal
206 stars 62 forks source link

cnSpec problem #397

Open lfaino opened 3 months ago

lfaino commented 3 months ago

Dear,

can i use a custom BSgenome with the command cnSpec. I tried to use like cnSpec(LucCNseg, genome = "fv10027") with fv10017 is a genome build with BSgenomeForge but i get this error:

attempting to query UCSC mySQL database for chromosome positions Error in .local(drv, ...) : Failed to connect to database: Error: Unknown database 'fv10027'

can you please help?

L

zlskidmore commented 3 months ago

Only Human and Mouse reference assemblies are provided within GenVisR as a convenience. You should be able to specify a custom genome with the y parameter however, try something like this:

myNewGenome <- data.frame("chromosome"=c('chr1', 'chr2'), "start"=c(1, 1), "end"=c(500000, 600000))
cnSpec(segments, y=myNewGenome) 

that should work, though you will need to provide the correct coordinates (or at least the regions you want to plot) during the construction of the data.frame