cole-trapnell-lab / cicero-release

https://cole-trapnell-lab.github.io/cicero-release/
MIT License
55 stars 15 forks source link

no transcrition structures in plot_connection #85

Closed ccshao closed 2 years ago

ccshao commented 2 years ago

Thanks for the nice package. When using mm10 gtf, the transctiption structures are not shown. Genes are shown as a continuous blocks.

Here is code getting the mm10 annotations

temp <- tempfile()
download.file("ftp://ftp.ensembl.org/pub/release-102/gtf/mus_musculus/Mus_musculus.GRCm38.102.gtf.gz", temp)
gene_anno <- rtracklayer::readGFF(temp)
unlink(temp)

gene_anno$chromosome <- paste0("chr", gene_anno$seqid)
gene_anno$gene       <- gene_anno$gene_id
gene_anno$transcript <- gene_anno$transcript_id
gene_anno$symbol     <- gene_anno$gene_name
saveRDS(gene_anno, "mm10_gtf.rds")

And plotting

plot_connections(conns, "chr4", 104355245, 104436442,
                 gene_model          = gene_anno,
                 coaccess_cutoff     = .25,
                 connection_width    = .5,
                 collapseTranscripts = "longest")

In the output, genes are shown as blocks.

Screenshot_2022-10-05_11-00-32

hpliner commented 2 years ago

Hello, sorry for the delay. It looks like the reference you downloaded includes full gene and transcript entries which would override the exon annotations. If you filter by type to only include exons that should solve the issue. If not, reopen!