[BioC] how to modify a Biostrings object

Paul Shannon pshannon at systemsbiology.org
Mon Feb 9 00:24:10 CET 2009


I wish to introduce some mutations into a segment of Hg18 chromosome  
9, as part of a simulation I wish to run.  I am having difficulty  
figuring out how to modify the BSgenome-related data structures.

I create my (wild-type) variables like this:

   chr9 <- Hsapiens [['chr9']]
   hg18.9q32 <<- subseq (chr9, 113900001, 116700000)

How would one create a mutant variant of hg18.9q32?  My wish is to  
incrementally -- one gene at a time -- introduce SNPs (and later,  
indels and translocations). Sometimes these changes are intentionally  
random, sometimes I want them at very specific places, to 'spike in'  
an interesting mutation.

I see that one can injectSNPs into a genome:

    Hsapiens.snp <- injectSNPs (Hsapiens, "SNPlocs.Hsapiens.dbSNP. 
20071016")

I could find no documentation for the SNPlocs data structure.

hg18.9q32 appears to be a MaskedDNAString, apparently derived from  
Biostring and XString, all of which seem to be immutable.

Is there any way to do this?

Let me apologize in advance if this is documented and I missed it.  I  
have combed the vignettes and the help pages and found nothing.

Many thanks,

   - Paul



More information about the Bioconductor mailing list