[BioC] consensusString Function
Heidi Dvinge
heidi at ebi.ac.uk
Tue Apr 6 22:56:41 CEST 2010
Hello Erik,
unfortunately I'm not familiar with the Biostrings package, so I can't
tell you why this doesn't work, but until someone else can answer, this
seems to be a work-around.
Apparently, consensusString doesn't handle Ns.
> test <- DNAStringSet(c("AANN","ACTG"))
> consensusString(test)
Error in .local(x, ...) :
'threshold' must be a numeric in (0, 1/sum(rowSums(x) > 0)]
If there are no Ns things are okay though.
> test2 <- DNAStringSet(c("AAAA","ACTG"))
> consensusString(test2)
[1] "AMWR"
However, Ns seem acceptable if the consensus matrix is calculated first,
although they might result in ?s where no consensus could be found.
> test3 <- consensusMatrix(test)
> consensusString(test3)
[1] "A???"
HTH
\Heidi
> Hello,
>
> I am trying to get a consensus string for a DNAStringSet, but I am getting
> an error. The documentation for consensusString says the argument "x" is
> either a consensus matrix or an XStringSet. So this should work, right?:
>> myDNAStringSet <- DNAStringSet(c("NNNN","ACTG"))
>> consensusString(myDNAStringSet)
> Error in .local(x, ...) :
> 'threshold' must be a numeric in (0, 1/sum(rowSums(x) > 0)]
>
> Specifying a threshold in the arguments doesn't seem to make a difference.
>
> Thanks!,
> Erik
>
> _______________________________________________
> 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
>
More information about the Bioconductor
mailing list