Global

Methods

addColorsToDropdown()

Provide a drop down to add different background colors to the mass shifted elements
Source:

addMassShift(position, massShiftList, mass)

Returns the current mass after adding mass shift
Parameters:
Name Type Description
position Integer Contains position at which the mass shift needed to be added
massShiftList Array List of mass shifts along with position
mass Float Mass to which the mass shift to be added
Source:

addNewFixedPtmRow(fixedptm)

On Click of '+' symbol under fixed ptms in the HTML, creates new block to add Acid and mass shift
Parameters:
Name Type Description
fixedptm String Contains Acid name and mass shift seperated by ':'
Source:

addWaterMass()

Function to add mass of water to the suffix mass list
Source:

annotations(para, matchedPeaks, id)

Draw annotations
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
matchedPeaks Array Contains Matched List
id String Contains id of the SVG tag from html to draw sequence
Source:

appendTooltip(charge)

Append Charge to the tool tip
Parameters:
Name Type Description
charge String Contains the charge at the current position to display on hover of the annotation
Source:

buildSvg(parameters, seq, id, massShiftList, monoMassList)

Draw the sequence on to svg
Parameters:
Name Type Description
parameters Object Contains parameters of width, letter space etc., to draw SVG
seq String Contains the protein sequence
id String Contians id of the SVG tag from html.
massShiftList Array Contains list of all the mass shifts
monoMassList Array Contains Mono Mass list data
Source:

calculatePrefixAndSuffixMass()

Function calculates both prefix and suffix masses
Source:

calibrateLeftNum(para, position)

Function provides position of the Numbers on the left side of the Acid Sequence
Parameters:
Name Type Description
para Object Contains parameters of the graph
position number Contains position of the Acid
Source:

calibrateRightNum(para, position)

Function provides position of the Numbers on the right side of the Acid Sequence
Parameters:
Name Type Description
para object Contains the parameters to draw the SVG
position Integer Provides the position of the left side number
Source:

calibrateSkipEnd(para, position, start_value)

Function provides position to write information of skipped amino acids at th bottom of Sequence SVG
Parameters:
Name Type Description
para object Contains the parameters to draw the SVG
position Integer Provides the position of the left side number
start_value Integer Provides starting number the sequnce after trimming the skipped scids
Source:

calibrateSkipStart(para)

Function provides position to write information of skipped amino acids at the top of Sequence SVG
Parameters:
Name Type Description
para object Contains the parameters to draw the SVG
Source:

drawAnnotation(position, charge, id, coordinates, x, y)

Draw Annotations
Parameters:
Name Type Description
position Integer Position of the amino acid
charge String Contains the charge at the current position to display on hover of the annotation
id String Contains id of the SVG tag from html to draw sequence
coordinates String Contains coordinates to draw the annotaion
x Integer Contains x coordinate of start point to draw the annotation
y Integer Contains y coordinate of start point to draw the annotation
Source:

drawAnnotation_B(para, position, charge, id)

Draw the annotation when the ion type is B
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
position Integer Position of the amino acid
charge String Contains the charge at the current position to display on hover of the annotation
id String Contains id of the SVG tag from html to draw sequence
Source:

drawAnnotation_Y(para, position, charge, id)

Draw the annotation when the ion type is Y
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
position Integer Position of the amino acid
charge String Contains the charge at the current position to display on hover of the annotation
id String Contains id of the SVG tag from html to draw sequence
Source:

drawAnnotation_YB(para, position, charge, id)

generate cooordinates to dray Y or B annotation
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
position Integer Position of the amino acid
charge String Contains the charge at the current position to display on hover of the annotation
id String Contains id of the SVG tag from html to draw sequence
Source:

drawRectagleWithColors(color, index)

Add rectagular block with selected color
Parameters:
Name Type Description
color String Backgroung color added tot he amino acid
index Integer Position at which the color needed to be added
Source:

generateCorrespondingGraph(peakDataList, distributionList, prec_mz)

Generates Corresponding graph on to the html by calling addSpectrum from invokespectrum.js
Parameters:
Name Type Description
peakDataList Array Contains Peak list data
distributionList Array Contains envelope data
prec_mz Float contains mass to which the graph has to be zoomed
Source:

generateMonoMassGraph(monoMassList, prec_mz)

Generating Mono Mass Graph with calculated masses
Parameters:
Name Type Description
monoMassList Array Contians the mono Mass list data
prec_mz Float Contains mass to which the graph has to be zoomed
Source:

getAbsoluteMaxValfromList(errorDataList)

Function return the max error value from the list
Parameters:
Name Type Description
errorDataList Array Contains list of error data to plot on the error graph
Source:

getActualIdvalues(ionType)

Dictionary to get correspoding actual heading for all the Id's of Ion Fragmentation from UI.
Parameters:
Name Type Description
ionType String Id of the ion from UI
Source:

getAminoAcidDistribution(aminoAcid)

Calculated distribution of amino-acid. The first element in each amino-acid list give tha mass of the amino acid.
Parameters:
Name Type Description
aminoAcid Char Containd Amino Acid
Source:

getCTerminusMassShiftVal()

Checks for all the ions selected and gets all the consolidated mass of all the C terminus ions selected by user
Source:

getIonCharge(matchedPeaks, position)

Get the charge of the Ion
Parameters:
Name Type Description
matchedPeaks Array Array with charge data at all the matched positions
position Integer Position at which the charge data has to be consolidated to show on hover of an annotation
Source:

getIsotopicMassOfAtom()

Code to get absolute mass and intensity values of atoms
Source:

getIsotopicMassRef()

Code to calculate distributions by taking relative values of mass and intensity of atoms.
Source:

getMassShift(ions)

Function checks all the ions selected and adds together to get the mass shift needed to add to suffix mass list
Parameters:
Name Type Description
ions Array Contains all the ion types selected
Source:

getNormalizedIntensity(totDistributionList, peakDataList)

Code to normalize the Intensity. Take the average of intensity from the peaks entered by the user. Take the average of the calculated distribution for each Array element in the Array. Make both of them equal and calculating the rest of the distribution intensity based on the avg value from the peak list.
Parameters:
Name Type Description
totDistributionList Array Total distribution calculated
peakDataList Array Peak Data entered by the user
Source:

getNTerminusMassShiftVal()

Checks for all the ions selected and gets all the consolidated mass of all the N terminus ions selected by user
Source:

getNumValues(para, seq, id)

Put the numerical positions at the start and end of each row of the sequence
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
seq Object Amino Acid Sequence
id String Id of the SVG from html
Source:

getPrefixMassList(sequence, massShiftList, massShift_in)

Returns prefix mass list
Parameters:
Name Type Description
sequence String Contains Protein sequence
massShiftList Array Contains list of mass shifts
massShift_in Float Contains mass shift based on the Ion Types selected
Source:

getSuffixMassList(sequence, massShiftList, massShift_in)

Returns suffix mass list
Parameters:
Name Type Description
sequence String Contains Protein sequence
massShiftList Array Contains list of mass shifts
massShift_in Float Contains mass shift based on the Ion Types selected
Source:

getSvgSize(parameters, seq)

Get the size of the svg based on the no. of rows and row length and other parameter.,.
Parameters:
Name Type Description
parameters Object Contains parameters of width, letter space etc., to draw SVG
seq String Contains protein Sequence
Source:

getTerminus(ionType)

function checks for ion type and returns whether it is C terminus or N terminus
Parameters:
Name Type Description
ionType String Contains information of the ion type from UI
Source:

getTotalSeqMass(seq, massShiftList)

Returns total mass of the sequence
Parameters:
Name Type Description
seq String Contains Protein sequence
massShiftList Array Contains list of mass shifts
Source:

getX(para, position)

Function provides with X coordinate
Parameters:
Name Type Description
para Object Contains parameters of the graph
position number Contains position of the Acid
Source:

getY(para, position)

Function provides the Y coordinate based on the position of the Acid
Parameters:
Name Type Description
para Object Contains parameters of the graph
position number Contains position of the Acid
Source:

handleOnClick(d, i, id, seq, massShiftList, monoMassList)

Handles on click actions. on click of any amino acid, provides a box to enter mass shift. On click of ok, will re calculate and redraws entire page.
Parameters:
Name Type Description
d Char Current Amino Acid
i Integer Index or position of the amino acid
id String Contains Id of the SVG on which the sequence is drawn
seq String Sequence of the amino acid
massShiftList Array List of all the amino acids
monoMassList Array List of Mono Mass data
Source:

MassShift(thisElem, MassShift, position)

MassShift value at the top of the acids
Parameters:
Name Type Description
thisElem Object Current element of the amino acid
MassShift Float Value of the mass shift
position Integer Position of the amino acid
Source:

onClickofMatchedPeaks()

Function to zoom the graph to the mass point on click of matched mass
Source:

onLoadOfHTML(precursorMass)

Gets invoked immediatley after loading html
Parameters:
Name Type Description
precursorMass Float Contains precursorMass value
Source:

parameters()

Fixed Parameters to draw the Sequence SVG
Source:

parsePeakMass(dataName)

receives file name to parse and replace "" and [] to make it same as the result from original JSON.parse function
Parameters:
Name Type Description
dataName String contains parsePeakMass in a sting format as we stringify while storing in local storage variable
Source:

parsePrecursorMass(dataName)

Function returns a json formatted data after getting precursor mass data from local storage
Parameters:
Name Type Description
dataName String contains precursor mass in a sting format as we stringify while storing in local storage variable
Source:

parsePTM(dataName)

Function returns a json formatted after getting fixed ptm data from local storage
Parameters:
Name Type Description
dataName String contains Fixed PTMs in a sting format as we stringify while storing in local storage variable
Source:

parseSeq(dataName)

receives file name to parse and replace "" and [] to make it same as the result from original JSON.parse function
Parameters:
Name Type Description
dataName String contains sequence in a sting format as we stringify while storing in local storage variable
Source:

parseUnknowmassList(dataName)

Function returns a json formatted data after getting unknow mass list data from local storage
Parameters:
Name Type Description
dataName String contains unkwon mass lists in a sting format as we stringify while storing in local storage variable
Source:

removeToolTip()

Remove tootltip on remove of the mouse from annotation
Source:

setIonCheckbox(ionType)

map the ion name from the prsm.js files to the ion checkbox id in the spectrum.html
Parameters:
Name Type Description
ionType Char Contains ion types from check box
Source:

showAllPeaks()

Function to display all peaks of data in table. This handles on click action from html of show all peaks button.
Source:

showIonPeaks(ids)

Function to show only matched on unmatched peaks on click of matched or unmatched peak buttons
Parameters:
Name Type Description
ids String Contains Ids of respective matched peaks or un matched peaks
Source:

showMatchedPeaks()

Function to display only matched peaks in table. This handles on click action from html of show matched peaks button.
Source:

showNonMatchedPeaks()

Function to display only un matched peaks in table. This handles on click action from html of show un matched peaks button.
Source:

utilFunctions()

Utility function retrieve data from UI
Source:

{onClickSequenceOfExecution} executes when user enters mass shift on any amino acid and click "OK" button.()

This class contains functions {sequenceOfExecution} and {onClickSequenceOfExecution}.
Source: