Ok, before i ask my question, i think it's best to take a look at the picture i've uploaded below...
ok, the picture shows 6 reading frames of a dna sequence at the top and the list below is an array (@fragments) of those reading frames but have been cleaved by an enzyme.
First of all, i am trying to relate each of the cleaved fragments back to its original ReadingFrame... so in the diagram below:
SAEVIHQVEEALDTDEK came from ReadingFrame1 and should be tagged peptide one
so i'm trying to create a table:
ReadingFrame Peptide Sequence Mass/Charge
ReadingFrame1 1 SAEVIHQVEEALDTDEK
ReadingFrame1 2 EMLR
ReadingFrame1 3 DLALVELDILR
....... .... .......
ReadingFrame2 1 R
ReadingFrame2 2 QSFFETPSLPWAMK
On top of this.. each letter has two mass weights assigned to it, an isotopic mass and an average mass. The end user will be able to select in an online form which mass spectrum they wish to look at.
The amino acid weights can be found here: http://www.matrixscience.com/help/aa_help.html
so i'm trying to create a counts loop which totals up the number of each amino acid in each fragment above and then depending on user choice....
IF monotopic weights to be used
assign each amino acid a monotopic weight add up all weights and divide by charge
ELSIF average masses to be used
assign each amino acid an average weight add up all weights and divide by charge
this will then fill the Mass/Charge column of the table above.
Any help with the coding on this or any ideas would be hugely appreciated.