Dear all,
Thank you for the help. Yes I should have posted in the Bioconductor's
forum. Next time I sure will. The chartr function helped and now the code is
significantly faster. I have also used the Bstrings as suggested by Martin.
Thank you again.
--
View this message in context:
http://r.78
On 07/19/2010 06:37 PM, David Winsemius wrote:
>
> On Jul 19, 2010, at 5:31 PM, John1983 wrote:
>
>>
>> Hi,
>>
>> I am a newbie in R and was working on some DNA data represented as
>> strings
>> of A,C,T and G (also wild-character like M and X). I use the Bioconductor
>> package in R.
>
> Well,
On Mon, Jul 19, 2010 at 5:31 PM, John1983 wrote:
>
> Hi,
>
> I am a newbie in R and was working on some DNA data represented as strings
> of A,C,T and G (also wild-character like M and X). I use the Bioconductor
> package in R. Currently I need to convert a string of the form "ACCTGMX" to
> "12234
Here is another way of doing it with 'chartr'; I only assume that you
have the upper characters, but you can add to the strings to cover any
others:
> tst <- rep( "ACCTGMX", 5)
> chartr("ACTGBDEFHIJKLMNOPQRSUVWXYZ", "123400", tst)
[1] "1223400" "1223400" "1223400" "1223400" "12
On Jul 19, 2010, at 5:31 PM, John1983 wrote:
Hi,
I am a newbie in R and was working on some DNA data represented as
strings
of A,C,T and G (also wild-character like M and X). I use the
Bioconductor
package in R.
Well, I guess it's sort of a "meta" package, but it is really more of
a
Hi,
I am a newbie in R and was working on some DNA data represented as strings
of A,C,T and G (also wild-character like M and X). I use the Bioconductor
package in R. Currently I need to convert a string of the form "ACCTGMX" to
"1223400" i.e. A is replaced by 1, C with 2, T with 3, G with 4 and
6 matches
Mail list logo