stianlagstad / chimeraviz

chimeraviz is an R package that automates the creation of chimeric RNA visualizations.
37 stars 14 forks source link

heads-up for filter classes being removed from ensembldb #3

Closed jorainer closed 7 years ago

jorainer commented 7 years ago

The filter classes will move from the ensembldb package to a new package AnnotationFilter (https://github.com/Bioconductor/AnnotationFilter). This package is not yet in Bioconductor, but once it is (hopefully soon) I will remove the filter classes from the ensembldb package.

I checked your package and all you will have to do seems to be to inport the GeneIdFilter (has been renamed from GeneidFilter) from AnnotationFilter instead.

There will also be the possibility to do the filtering with filter = ~ gene_id == "BCL2" instead of explicitly create a filter object.

Let me know if you run into problems or need help. I'll let you know once I've removed the filter classes from ensembldb (eventually already this week).

stianlagstad commented 7 years ago

Thank you for heads up, @jotsetung! I'll adress this early next week at the latest.

jorainer commented 7 years ago

I'll have to wait anyway for the AnnotationFilter to be accepted (hope that this happens any day now). I'll let you know before I push the changes. In case I could also fork chimeraviz, fix it and make a pull request.

jorainer commented 7 years ago

@stianlagstad , AnnotationFilter package is now in Bioc devel. You can go now ahead and import the GeneIdFilter from AnnotationFilter instead of ensembldb. I'll push to ensembldb tomorrow.

stianlagstad commented 7 years ago

Is there a difference in how I use the filter? I changed my code to use AnnotationFilter::GeneIdFilter instead of ensembldb::GeneidFilter, but that's giving me Error in checkFilter(filter) : One of more elements in 'filter' are not filter objects!.

The line I changed: https://github.com/stianlagstad/chimeraviz/blob/master/R/utilities.R#L558

stianlagstad commented 7 years ago

I also tried changing it to this:

  # Get all exon information
  allTranscripts <- ensembldb::exonsBy(
    edb,
    filter = AnnotationFilter::AnnotationFilter(~ gene_id %in% c(fusion@geneA@ensemblId, fusion@geneB@ensemblId)),
    columns = c(
      "gene_id",
      "gene_name",
      "tx_id",
      "tx_cds_seq_start",
      "tx_cds_seq_end",
      "exon_id"))

But that got me Error in checkFilter(filter) : 'filter' has to be a filter object or a list of filter objects!.

Edit: I just realized that this might be because ensembldb might not be updated yet :)

jorainer commented 7 years ago

Yes, that might be an explanation. You can update ensembldb from github:

library(devtools)
install_github("jotsetung/ensembldb")
jorainer commented 7 years ago

@stianlagstad please replace GeneidFilter with GeneIdFilter (note the capital I in Id). In AnnotationFilter we tried to streamline all filter class names, such that filtering on a column named gene_id is done using an GeneIdFilter, i.e. capitalizing each character after a _.

stianlagstad commented 7 years ago

Thanks again, @jotsetung. I'm looking at this tonight, as my dependencies are building again today.