[BioC] Error in assign while calling the vmatchPattern function

Hans-Ulrich Klein h.klein at uni-muenster.de
Wed Feb 25 14:23:43 CET 2009


Hi all,

I encountered a similar (probably related) error today. I wanted to 
match a few hundred sequences against the UCSC genome from the package 
"BSgenome.Hsapiens.UCSC.hg18". I implemented a simple "for" loop and called

    seq = DNAString(sequences$Sequence[i])
    matchRes = matchPattern(seq, Hsapiens[[chr]])
    SurroundingSequence[i] = as.character(subseq(Hsapiens[[chr]],
         start=start(matchRes)-250, end=end(matchRes)+250))

within the loop. In run i=187 I get the error message:
Error in assign(".target", method at target, envir = envir) :
  formal argument "envir" matched by multiple actual arguments
Calls: as.character ... RawPtr.read -> dec_lkup -> loadMethod -> 
loadMethod -> assign

However, it works when I match the 187th sequence manually (without 
matching the 186 other sequences before). That makes it hard to debug.

Best wishes,
Hans-Ulrich

PS: my session info:
 > sessionInfo()
R version 2.8.1 (2008-12-22)
x86_64-pc-linux-gnu

locale:
C

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

other attached packages:
[1] BSgenome.Hsapiens.UCSC.hg18_1.3.11 BSgenome_1.10.3                  
[3] Biostrings_2.10.16                 IRanges_1.0.12                   

loaded via a namespace (and not attached):
[1] Matrix_0.999375-21 grid_2.8.1         lattice_0.17-20    tools_2.8.1


mattia pelizzola wrote:
> Hi,
>
> I have a recurrent but not reproducible error.. If I run the same
> piece of code twice the error will disappear, but it will likely shop
> up the day after.
> This is the error message:
>
> Error in assign(".defined", method at defined, envir = envir) :
>   formal argument "envir" matched by multiple actual arguments
> Calls: vmatchPattern ... lapply -> FUN -> loadMethod -> loadMethod -> assign
>
> this is the code where the error show up calling the vmatchPattern
> function for one chromosome. The code is actually repeated several
> times for all the chromosomes during the same R session:
>
> chrseq=Hsapiens$chr1
> Gviews = Views(chrseq, starts, ends)    #  where length(starts)> 20000
> Gset = DNAStringSet(Gviews)
> querySeq=DNAString('ATTH')
> a = startIndex(vmatchPattern(querySeq, Gset, fixed=F))
>
>
>
> and finally this is my sessionInfo:
>
> R version 2.8.1 (2008-12-22)
> x86_64-unknown-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] BSgenome.Hsapiens.UCSC.hg18_1.3.11 BSgenome_1.10.3
> [3] Biostrings_2.10.15                 IRanges_1.0.11
>
> loaded via a namespace (and not attached):
> [1] grid_2.8.1         lattice_0.17-17    Matrix_0.999375-20
>
>
>
> thanks,
>
> mattia
>
>



More information about the Bioconductor mailing list