ldg21 / SGSeq

Splice event prediction and quantification from RNA-seq data
5 stars 1 forks source link

`SGSeq` fails in Bioc 3.12 due to incompatible chromosome lengths #5

Closed csoneson closed 4 years ago

csoneson commented 4 years ago

Hi,

(also tagging @hpages - maybe this is something that could actually be addressed on the BSgenome side).

Currently, SGSeq fails under Bioconductor devel (3.12), seemingly because of recent updates in e.g BSgenome (one issue was already fixed there). The current build error:

> vep <- predictVariantEffects(sgv_pred, txdb, Hsapiens)
[updateObject] Validating the updated object ... OK
[updateObject] Validating the updated object ... OK
Predicting effect of 2 variants on 3 coding transcripts...
 Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'args' in selecting a method for function 'do.call': sequence MT has incompatible seqlengths:
  - in 'x': 16569
  - in 'y': 16571 

appears when running line 224 of the vignette, since the chromosome lengths for two of the objects are incompatible:

> seqinfo(sgv_pred)["MT"]
Seqinfo object with 1 sequence from an unspecified genome:
  seqnames seqlengths isCircular genome
  MT            16571         NA   <NA>
> seqinfo(Hsapiens)[c("MT", "chrM")]
Seqinfo object with 2 sequences (2 circular) from 2 genomes (GRCh37.p13, hg19):
  seqnames seqlengths isCircular     genome
  MT            16569       TRUE GRCh37.p13
  chrM          16571       TRUE       hg19

More precisely, this is what happens just before:

> library(BSgenome.Hsapiens.UCSC.hg19)
> seqlevelsStyle(Hsapiens)
[1] "UCSC"
> seqinfo(Hsapiens)[c("MT", "chrM")]
Seqinfo object with 2 sequences (1 circular) from 2 genomes (NA, hg19):
  seqnames seqlengths isCircular genome
  MT               NA         NA   <NA>
  chrM          16571       TRUE   hg19
> seqlevelsStyle(Hsapiens) <- "NCBI"
> seqinfo(Hsapiens)[c("MT", "chrM")]
Seqinfo object with 2 sequences (2 circular) from 2 genomes (GRCh37.p13, hg19):
  seqnames seqlengths isCircular     genome
  MT            16569       TRUE GRCh37.p13
  chrM          16571       TRUE       hg19

It's not clear to me whether this should be fixed by somehow modifying the example data in SGSeq, or rather in the conversion table between chromosomes in different seqlevelsStyles.

Thanks!

ldg21 commented 4 years ago

This has been fixed in version 1.23.1