This has been a bumpy ride, but the way we call cpp functions (starting from the cpp end) is as follows:
src/
directory, but use symbolic links to test in withoutR\cpp
withoutR/cpp
devtools::document()
and or devtools::build()
R_iso_seq
workspepFromSequence
, which subtracts the ASCII value for A
(65) from the letter to give an integer representation of the amino acid. These codes are stored in the NUMSEQ
variable, and the whole structure is passed as the first argument to R_iso
allocDistArray
to allocate the distributions - this was needed when >1 peptides were being processed at once..R_iso
to get the isotope distributionsR_iso
worksThis should form the basis of the R_iso_atom
function that we are trying to write
numpep
= 1, numiso
= 5, otherwise it won't workAMINODATA
NUMELEMENTS
ISOTAB
structs. This is populated using the R_loadIsotopeTable
function. The original iso function parsed >1 peptide, here numpep
always == 1. Here the word "element" means the component of the total isotopic mass (I think). letter[i].element[k] = AMINODATA[i][k]
where 26 letters i
and five elements k
are used - showing the composition of elements in each of the 26 amino acid codes. - Enter a for
loop which only iterates once because of the value of numpep
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.