AllelicImbalance error with getAlleleCounts
1
0
Entering edit mode
JK ▴ 10
@jk-6972
Last seen 8.7 years ago
United States

Hi,

 

I would appreciate some help with the error below. I am trying to process Bowtie2-aligened and subsequently Rsamtools sorted and indexed bam files with the package AllelicImbalance according to the manual on the Bioconductor page. I am getting the error below:

> searchArea <- GRanges(seqnames = c("chr17"),ranges = IRanges(79478000,79478361))
> reads <- impBamGAL('/site/ne/home/karjo01/AGP001_bowtie2',searchArea,verbose=FALSE)
> heterozygotePositions <- scanForHeterozygotes(reads,verbose=FALSE)

> countList <- getAlleleCounts(reads, heterozygotePositions, verbose=FALSE)
Error in `colnames<-`(`*tmp*`, value = c("A", "C", "G", "T")) :
  attempt to set 'colnames' on an object with less than two dimensions

 

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)

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

attached base packages:
 [1] stats4    parallel  grid      stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] AllelicImbalance_1.4.0  GenomicAlignments_1.2.1 Rsamtools_1.18.2       
 [4] Biostrings_2.34.1       XVector_0.6.0           GenomicRanges_1.18.4   
 [7] GenomeInfoDb_1.2.4      IRanges_2.0.1           S4Vectors_0.4.0        
[10] BiocGenerics_0.12.1    

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3          AnnotationDbi_1.28.1     base64enc_0.1-2         
 [4] BatchJobs_1.5            BBmisc_1.8               Biobase_2.26.0          
 [7] BiocParallel_1.0.0       biomaRt_2.22.0           biovizBase_1.14.1       
[10] bitops_1.0-6             brew_1.0-6               BSgenome_1.34.1         
[13] checkmate_1.5.1          cluster_1.15.3           codetools_0.2-10        
[16] colorspace_1.2-4         DBI_0.3.1                dichromat_2.0-0         
[19] digest_0.6.8             fail_1.2                 foreach_1.4.2           
[22] foreign_0.8-62           Formula_1.1-2            GenomicFeatures_1.18.3  
[25] Gviz_1.10.5              Hmisc_3.14-6             iterators_1.0.7         
[28] lattice_0.20-29          latticeExtra_0.6-26      matrixStats_0.12.2      
[31] munsell_0.4.2            nnet_7.3-8               plyr_1.8.1              
[34] RColorBrewer_1.1-2       Rcpp_0.11.3              RCurl_1.95-4.5          
[37] R.methodsS3_1.6.1        rpart_4.1-8              RSQLite_1.0.0           
[40] rtracklayer_1.26.2       scales_0.2.4             sendmailR_1.2-1         
[43] splines_3.1.2            stringr_0.6.2            survival_2.37-7         
[46] tools_3.1.2              VariantAnnotation_1.12.8 XML_3.98-1.1            
[49] zlibbioc_1.12.0        

allelicimbalance getallelecounts • 1.2k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.3 years ago
United States

Hi,

Have you tried contacting the author directly? (j.r.gadin@gmail.com)

The error says that inside getAlleleCounts(), the code expects a matrix but is getting a one dimensional object (vector) instead. Have you confirmed the GRanges output from scanForHeterozygotes() is not empty? You could try debugging,

debug(getAlleleCounts)
countList <- getAlleleCounts(reads, heterozygotePositions, verbose=FALSE)

then step through the code with 'n'. See ?debug.

Valerie

ADD COMMENT
0
Entering edit mode
Valerie, I appreciate the email. I solved the issue. I was trying to read in a single bam file instead of a set of bam files. Regards, Jozsef On Jan 27, 2015, at 11:11 AM, Valerie Obenchain [bioc] <noreply@bioconductor.org<mailto:noreply@bioconductor.org>> wrote: Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User Valerie Obenchain<https: support.bioconductor.org="" u="" 4275=""/> wrote Answer: AllelicImbalance error with getAlleleCounts<https: support.bioconductor.org="" p="" 64219="" #64463="">: Hi, Have you tried contacting the author directly? (j.r.gadin@gmail.com<mailto:j.r.gadin@gmail.com>) The error says that inside getAlleleCounts(), the code expects a matrix but is getting a one dimensional object (vector) instead. Have you confirmed the GRanges output from scanForHeterozygotes() is not empty? You could try debugging, debug(getAlleleCounts) countList <- getAlleleCounts(reads, heterozygotePositions, verbose=FALSE) then step through the code with 'n'. See ?debug. Valerie ________________________________ You may reply via email or visit A: AllelicImbalance error with getAlleleCounts
ADD REPLY

Login before adding your answer.

Traffic: 820 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6