[BioC] locateVariants - error with GRanges query?

Lescai, Francesco f.lescai at ucl.ac.uk
Thu Nov 29 14:44:46 CET 2012


Hi there,
I was trying to annotate the results from an association analysis.
I created a GRanges object and tried to annotate but I get this error

loc.tdt <- locateVariants(query=tdt.top.gen, subject=txdb, region=AllVariants())
Error in function (classes, fdef, mtable)  : 
  unable to find an inherited method for function "locateVariants", for signature "GRanges", "GRanges", "PromoterVariants"

if I try to annotate just the coding variants, I don't get any error apparently but then

> loc.tdt <- locateVariants(query=tdt.top.gen, subject=txdb, region=CodingVariants())
> loc.tdt
GRanges with 48 ranges and 5 metadata columns:
Error in function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
  arguments imply differing number of rows: 9, 2

The GRanges object seems ok

> tdt.top.gen
GRanges with 50 ranges and 2 metadata columns:
       seqnames                 ranges strand   |    pvalue              snp
          <Rle>              <IRanges>  <Rle>   | <numeric>         <factor>
   [1]     chr1 [  1581065,   1581065]      +   | 0.0002607 var_chr1_1581065
   [2]     chr1 [112042787, 112042787]      +   | 0.0005042       rs35511654
   [3]     chr1 [230503684, 230503684]      +   | 0.0002967        rs2632571
   [4]     chr2 [101581508, 101581508]      +   | 0.0003466       rs17025086
   [5]     chr2 [166740578, 166740578]      +   | 0.0001621       rs34701755
   [6]     chr3 [ 39453057,  39453057]      +   | 0.0004809        rs2269349
   [7]     chr3 [126219030, 126219030]      +   | 0.0005462       rs13072404
   [8]     chr3 [142030595, 142030595]      +   | 0.0005320       rs78396728
   [9]     chr4 [  1388757,   1388757]      +   | 0.0003857      rs138170890
   ...      ...                    ...    ... ...       ...              ...
  ---
  seqlengths:
    chr1  chr2  chr3  chr4  chr5  chr7 ... chr10 chr11 chr16 chr19 chr20 chr22
      NA    NA    NA    NA    NA    NA ...    NA    NA    NA    NA    NA    NA

Any clue?

thanks very much
Francesco


> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C                  
 [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915    
 [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915   
 [7] LC_PAPER=C                     LC_NAME=C                     
 [9] LC_ADDRESS=C                   LC_TELEPHONE=C                
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C           

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BiocInstaller_1.8.3                    
 [2] TxDb.Hsapiens.UCSC.hg19.knownGene_2.8.0
 [3] GenomicFeatures_1.9.44                 
 [4] AnnotationDbi_1.19.46                  
 [5] Biobase_2.17.8                         
 [6] biomaRt_2.13.2                         
 [7] ggbio_1.5.20                           
 [8] ggplot2_0.9.2.1                        
 [9] VariantAnnotation_1.4.5                
[10] Rsamtools_1.9.31                       
[11] Biostrings_2.25.12                     
[12] GenomicRanges_1.9.66                   
[13] IRanges_1.15.48                        
[14] BiocGenerics_0.3.2                     

loaded via a namespace (and not attached):
 [1] biovizBase_1.5.9    bitops_1.0-4.1      BSgenome_1.25.9    
 [4] cluster_1.14.2      colorspace_1.1-1    DBI_0.2-5          
 [7] dichromat_1.2-4     digest_0.5.2        grid_2.15.0        
[10] gridExtra_0.9.1     gtable_0.1.1        Hmisc_3.9-3        
[13] labeling_0.1        lattice_0.20-10     MASS_7.3-21        
[16] memoise_0.1         munsell_0.4         parallel_2.15.0    
[19] plyr_1.7.1          proto_0.3-9.2       RColorBrewer_1.0-5 
[22] RCurl_1.91-1        reshape2_1.2.1      RSQLite_0.11.2     
[25] rtracklayer_1.17.21 scales_0.2.2        stats4_2.15.0      
[28] stringr_0.6.1       tools_2.15.0        XML_3.95-0.1       
[31] zlibbioc_1.3.0     



More information about the Bioconductor mailing list