[BioC] error from rsamtools on 1000 genomes

Martin Morgan mtmorgan at fhcrc.org
Fri Jul 2 20:42:27 CEST 2010


On 07/02/2010 01:39 AM, Sergii Ivakhno wrote:
> Dear All,
> 
> I experience the following problem when trying to extract reads from bam
> files using Rsamtools on 1000 genomes hapmap BAM file. Would be grateful
> for your help, thanks.
> 
> Sergey
> 
>  
> 
>  
> 
> ########
> 
>  
> 
>  
> 
> w=GRanges(seqnames = "1",ranges = IRanges(1000,width=400))
> 
> p2 <- ScanBamParam(which=w)
> 
> res2 <- scanBam("NA12878.SLX.maq.SRP000031.2009_08.bam",p2)

Hi Sergii -- this should be

  res2 <- scanBam("NA12878.SLX.maq.SRP000031.2009_08.bam",param=p2)

i.e., provide the ScanBamParam as a named argument param=p2; see
?scanBam and example(scanBam) for some illustrations.

Also, Rsamtools only became available with R-2.11, so you've
mixed-and-matched R and Bioconductor versions; this will only result in
tears, so please update R and use biocLite() to install bioconductor
packages, as described at

  http://bioconductor.org/docs/install/

Martin


> 
>  
> 
>  
> 
> Error in as.character.default(x) :   no method for coercing this S4
> class to a vector
> 
>  
> 
>  
> 
>> sessionInfo()
> 
> R version 2.10.1 (2009-12-14)
> 
> x86_64-unknown-linux-gnu
> 
>  
> 
> locale:
> 
>  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
> 
>  [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
> 
>  [5] LC_MONETARY=C              LC_MESSAGES=en_GB.UTF-8
> 
>  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
> 
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> 
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
> 
>  
> 
> attached base packages:
> 
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
>  
> 
> other attached packages:
> 
> [1] Rsamtools_1.0.5     Biostrings_2.16.6   GenomicRanges_1.0.4
> 
> [4] IRanges_1.6.8
> 
>  
> 
> loaded via a namespace (and not attached):
> 
> [1] Biobase_2.6.1
> 
>  
>   
> ----------------------------------------------
> Sergii Ivakhno
> 
> PhD student
> 
> Computational Biology Group
> Cancer Research UK Cambridge Research Institute
> Li Ka Shing Centre
> Robinson Way
> Cambridge CB2 0RE
> England
> 
> +44 (0)1223 404293 (O)
> +44 (0)1223 404128 (F)
> 
> http://www.compbio.group.cam.ac.uk <http://www.compbio.group.cam.ac.uk/>
> /
> 
> 
> This communication is from Cancer Research UK. Our website is at www.cancerresearchuk.org. We are a charity registered under number 1089464 and a company limited by guarantee registered in England & Wales under number 4325234. Our registered address is 61 Lincoln's Inn Fields, London WC2A 3PX. Our central telephone number is 020 7242 0200.
> 
> This communication and any attachments contain information which is confidential and may also be privileged.   It is for the exclusive use of the intended recipient(s).  If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful.  If you have received this communication in error, please notify the sender and delete the email and destroy any copies of it.
> 
> E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept liability for any such matters or their consequences.  Anyone who communicates with us by e-mail is taken to accept the risks in doing so.
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list