[BioC] Protein/peptide mass

Sean Davis sdavis2 at mail.nih.gov
Thu May 25 15:44:44 CEST 2006




On 5/25/06 7:23 AM, "john seers (IFR)" <john.seers at bbsrc.ac.uk> wrote:

> 
> 
> Hi Sean
> 
> Thanks for the reply and the web page information.
> 
> I need to be quite precise and I will need the variations for post
> translational modifications and other options. E.g. monoisotopic vs
> average. (Not sure exactly what I need yet).
> 
> I guess I can do it myself but it is quite a lot of work to find and
> understand all the variations and test it. More the problem is that I do
> not really want to reinvent the wheel. I was quite surprised I cannot
> find a module to do it - I thought I was just not looking in the right
> place. I can find isoelectric points, hydropathy plots etc etc but no
> mass/Mw calculator.

John,

In that case, you can do something like this:

 x <- url(' 
http://ca.expasy.org/cgi-bin/pi_tool?protein=MKWVTFISLLFLFSSAYS&resolution=m
onoisotopic')
 res <- readLines(x)
 

You'll notice that one of the lines of res is something like:

[68] "Theoretical pI/Mw: 8.34 / 2139.11"

You can then use typical R tools like gsub/grep to find what you need like
so:

 as.numeric(gsub('.*/ ','',res[grep('Theoretical pI/Mw:',res)]))

Which will return:

 2139.11

Which is the monoisotopic molecular weight.  The key is to use paste() to
construct a url.  Just put in the protein and the resolution as needed.
That should do it.

Sean



More information about the Bioconductor mailing list