Global

Members

drawNav

draw navigation bar while avoiding cross origin issue
Source:

Methods

activateCurrentnavbar(id, currentValue)

Function highlights the active spectrum on clcik of the scan number
Parameters:
Name Type Description
id String Contains id of the SVG tag
currentValue int Contains scan number
Source:

addColorToFixedPtms(prsm, id)

Modifying the color array to match the array of letters and positions
Parameters:
Name Type Description
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

allProteins(folderName)

Starting point of building proteins page. Gets the data of all the proteins and shows on the html
Parameters:
Name Type Description
folderName String Provides the path to the data folder. Provides path which helps to navigate to protein and prsm pages.
Source:

annotations(para, prsm, id)

Draw annotations
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

appendTooltip(charge)

Function to add tooltip to the polylines on mouseOver
Parameters:
Name Type Description
charge String Contains consolidated charge to display on tooltip
Source:

Build_BestPrSM(e_value, precursor_mass, prsm_id, proteoform_id, PrSM_Count, folderpath)

Create HTML URL link to navigate to best prsm and to navigae to proteoform page
Parameters:
Name Type Description
e_value Float Contains e value of the best prsm
precursor_mass Float Contains precursor mass of the best prsm
prsm_id Int Contains the best prsm id
proteoform_id Int Contains the proteoform Id
PrSM_Count Int Contians numbe rof prsms for a proteoform
folderpath String Contains path to the data folder
Source:

buildSvg(parameters, prsm, id)

draw the sequence on to svg
Parameters:
Name Type Description
parameters Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

BuildUrl(folderpath)

Create title and navigation urls to "all proteins","protein" and "proteoform" of the prsm
Parameters:
Name Type Description
folderpath String provides folder path to the data and helps in building urls
Source:

buttons()

On-click Actions to show spectrum graph and invoke downloads and other button actions
Source:

buttonsAndAlerts(para, prsm, id)

Create buttons to save the svg as png/svg and to redraw the svg with given dimensions
Parameters:
Name Type Description
para object contains the parameters to draw the sequence SVG
prsm object prsm is the data attribute inside global prsm_data variable
id String id from the html at which the svg needs to be redraw (Here it is from the modal block)
Source:

calibrateCoordinates(para, position, start_value)

Function to provide x and y coordinates 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
start_value number Contains position of the first Acid
Source:

calibrateLeftNum(para, position, start_value)

Function provides position of the Numbers on the left 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
start_value Integer Provides starting number the sequnce after trimming the skipped scids
Source:

calibrateRightNum(para, position, start_value)

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
start_value Integer Provides starting number the sequnce after trimming the skipped scids
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:

createMultipleSvgs(divId, svgId, className, data)

This generates spectrum for each spec Id
Parameters:
Name Type Description
divId String Contains Id of the div tag under which the monomass graphs are drawn
svgId String Contains id as "monoMassSvg_" to which scan Id is added
className String Contains class name to which the corresponding svg graphs are drawn
data Array contains the data of all the scans available
Source:

createTableData(folderpath)

Create a table with prsm data and URL to navigate to appropriate prsm
Parameters:
Name Type Description
folderpath String Provides path to the data folder
Source:

createTableElements()

Build the monomass table with all the data from the peak variable of the prsm_data Provide a unique class name to the m/z values to provide on click action to xoom the spectrum graph to that position
Source:

drawAnnoOfStartEndPosition(para, prsm, id)

Draw the annotations to show the start and end position of the sequence
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

drawAnnotation(annotation, l_charge, id, coordinates, x, y)

Function to draw the annotations based on annotation type and coordinates
Parameters:
Name Type Description
annotation Object Json object with information of the position
l_charge String Contains the Charge to be displayed on the annotation
id String Contians id of the SVG tag from html.
coordinates String Contains String with coordinates to draw a polyline in a apecific format understandable by D3
x Integer Contains x coordinate to draw a tooltip at specific position on hover of annotation
y Integer Contains y coordinate to draw a tooltip at specific position on hover of annotation
Source:

drawAnnotation_B(para, prsm, annotation, l_charge, id)

Invoke drawAnnotation method to 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
prsm Object Contains the complete information of prsm.
annotation Object Json object with information of the position
l_charge String Contains the Charge to be displayed on the annotation
id String Contians id of the SVG tag from html.
Source:

drawAnnotation_Y(para, prsm, annotation, l_charge, id)

Invoke drawAnnotation method to 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
prsm Object Contains the complete information of prsm.
annotation Object Json object with information of the position
l_charge String Contains the Charge to be displayed on the annotation
id String Contians id of the SVG tag from html.
Source:

drawAnnotation_YB(para, prsm, annotation, l_charge, id)

invoke drawAnnotation method to draw the annotation when the ion type is Y and B
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
annotation Object Json object with information of the position
l_charge String Contains the Charge to be displayed on the annotation
id String Contians id of the SVG tag from html.
Source:

generateCorrespondingGraph(current_data, id, prec_mz, specId)

Parameters:
Name Type Description
current_data Array Contains a list with ion data if it is generating Mono Mass spectrum, contians peaklist and enveloplist if generating spectrums of MS1/MS2
id String Contains the id of spectrum svg with _ followed by scan number (monoMassSvg_872/ms2svg_870)
prec_mz Float Contains the mass to which the graph needs to be zoomed
specId Int Contains the spectrum number
Source:

getAbsoluteMaxValfromList(errorDataList)

Function return the absolute max error value from the list
Parameters:
Name Type Description
errorDataList Array Contains the list of mass errors
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 Contains the character of the Amino Acid
Source:

getBestPrsm(protein, folderName)

Get the beat PrSM based on the PrSM e value and create link to navigate for the best PrSM
Parameters:
Name Type Description
protein object Contains data of a single protein
folderName String Provides path to build navigation links
Source:

getBestPrsm(prsm)

Get "precursor mass","prsm Id" and least "e value" for each proteoform
Parameters:
Name Type Description
prsm object COntains information of the prsms of a proteoform
Source:

getCurrentData(dataList, scanId)

Function return data of particular Scan number
Parameters:
Name Type Description
dataList Array Contains data of all the scans
scanId int Contains scan id of the spectrum
Source:

getDataFromPRSMtoSpectralView(ms2_data)

Get the peaklist from respective spectrum.js to set the data for inspect page
Parameters:
Name Type Description
ms2_data object json object with complete data spectrum for corresponding scan Id
Source:

getEnvelopeData(json_data)

gets envelope data list with mono_mass,charge, env_peaks(contains mz and intensity) and color attributes This function adds color to the each list of envelopes
Parameters:
Name Type Description
json_data object contains complete data of spectrum
Source:

getFixedPtm(prsm)

Get all the "Fixed" ptms
Parameters:
Name Type Description
prsm object prsm is the data attribute inside global prsm_data variable
Source:

getFixedPTMMassList()

Gets all the masslist shifts of the Fixed ptms for prsm
Source:

getIonCharge(l_annotation_array, position)

Get the charge of the Ion by consilidating all the prefix and the charges at that position
Parameters:
Name Type Description
l_annotation_array Array Contains charges at all the positions of the acids
position Integer Current position at which the chage has to be displayed on tooltip
Source:

getIonData(prsm_data, specId, json_data)

gets ion data list with mz, intensity and ion name This function gets matched ion data
Parameters:
Name Type Description
prsm_data object contains complete data of prsm
specId int contains information of the spec Id
json_data object contains complete data of spectrum
Source:

getMassAndIntensityData(specId)

Get the masslist from respective prsm.js to set the data for inspect page
Parameters:
Name Type Description
specId Integer Contians spec Id to get the data of corrsponding mass list
Source:

getMonoMassDataList(specidList, scanIdList)

Function to build data for each scan into monoMassDataList
Parameters:
Name Type Description
specidList Array Contains the list of spec ids
scanIdList Array Contains the list of scan Ids
Source:

getNumOfRows(parameters, prsm)

Get number of rows of the sequence based on the row length
Parameters:
Name Type Description
parameters Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm. prsm is an json attribute insire prsm_data(Global data variable from prsm.js)
Source:

getNumValues(para, prsm, id)

Put the numerical positions at the start and end of each row of the sequence
Parameters:
Name Type Description
para * Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

getPeakData(json_data)

gets peak data list with mz and intensity attributes
Parameters:
Name Type Description
json_data object contains complete data of prsm
Source:

getRightPosition(para, leftPosition, rightPosition)

Get the right end position to color the background color when there is a change of row
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
leftPosition Integer Contains start position of acid to add color to the background
rightPosition Integer Contains end position of the acid to add color to the background
Source:

getSequence()

Function to get the sequence of the protein from prsm.js
Source:

getSvgSize(parameters, prsm)

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
prsm Object Contains the complete information of prsm. prsm is an json attribute insire prsm_data(Global data variable from prsm.js)
Source:

getUnknownMassList()

Get all the unknwon mass lists form the prsm
Source:

getUnknownPtms(prsm)

Get the information about all the unknown ptms
Parameters:
Name Type Description
prsm object prsm is the data attribute inside global prsm_data variable
Source:

getVariablePtm(prsm)

Get all the variable ptms
Parameters:
Name Type Description
prsm object prsm is the data attribute inside global prsm_data variable
Source:

getY(para, position, start_value)

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
start_value number Contains position of the first Acid
Source:

graphOnClickActions()

Generating Jquery Onclick actions
Source:

hideSpectrum()

Hide spectrum graphs on click of hide spectrum
Source:

isShiftAnnotationNeeded(para, prsm)

Check if over shifting is need when annotations collide with each other
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
Source:

json2BackgroundColorArray(prsm)

Get left and right positions of background color and mass shift value
Parameters:
Name Type Description
prsm object json obeject with complete prsm data
Source:

json2CleavagePositions(prsm)

Get the cleavage positions from the prsm data
Parameters:
Name Type Description
prsm object json obeject with complete prsm data
Source:

json2ErrorDataList(prsm)

Get the mass error from the prsm cleavage
Parameters:
Name Type Description
prsm object json obeject with complete prsm data
Source:

json2FixedPtmOccurence(prsm)

Get occurence of fixed ptm positions
Parameters:
Name Type Description
prsm object json obeject with complete prsm data
Source:

json2OtherPtmOccurences(prsm)

Get position and other ptm lists other than FIxed Ptms
Parameters:
Name Type Description
prsm object json obeject with complete prsm data
Source:

loadDatafromJson2Html()

Get the data of the prsm from global data variable prsm_data. Build the data into html to show the information about the prsm
Source:

MassShift(x, y, id, value, isShift)

MassShift value at the top of the acids
Parameters:
Name Type Description
x Integer Contains x coordinate at which the mass shift is added on top of acid
y Integer Contains y coordinate at which the mass shift is added on top of acid
id String Contains id of the SVG tag from html.
value String Contains Value to be displyed on the acid
isShift Boolean Contains true if mass shifts adjacent to each other are overlapping
Source:

massShiftBackgroundColor(para, prsm, id)

Color the background of the occurence
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source:

occurence_ptm(prsm)

Get occurence of "Variable" and "Fixed", convert the data to HTML
Parameters:
Name Type Description
prsm object prsm is the data attribute inside global prsm_data variable
Source:

onClickToInspect()

Onclick function, invoked on click of the inspect scn button
Source:

onclickTopView(scansWithData, scanId)

Function gets invoked when clicked on inspect button. This function stores all the information of a spectrum that is being inspected using local storage.
Parameters:
Name Type Description
scansWithData object This is a json object with data of all the scan Ids
scanId Integer Contians the Scan numbers
Source:

parameters()

Fixed Parameters to draw the Sequence SVG
Source:

PeakData()

Data extractor to a proper format to understand by the spectrum graph This gets peak data from @function getPeakData which is inside the PeakData object This gets envelope data from @function getEnvelopeData which is inside the PeakData object This also gets data from @function getIonData which is inside the PeakData object
Source:

popupnamewindow(type, id, x, y)

Function to produce a pop up window to provide name and set name to the image while downloading the image of Graph SVG and Sequence SVG
Parameters:
Name Type Description
type String Provides if the image is downloaded as svg or png
id String Provides the id of the svg to be downloaded
x Float Provides coordinate on where to show a tooltip block to enter name of the image to be downloaded
y Float Provides coordinate on where to show a tooltip block to enter name of the image to be downloaded
Source:

protein(folderpath)

Build Title,Description,URL and get best prsm for each proteoform
Parameters:
Name Type Description
folderpath String Provides path to the data folder
Source:

proteinToHtml(protein, folderName)

convert the json protein data into HTML and create links for each protein to navigate
Parameters:
Name Type Description
protein object Contains data of a single protein
folderName String Provides path to build navigation links
Source:

proteoformMultirow(proteoform, best_e_value, prsm_id)

Get the best prsm e value and prsm Id by looping through the proteoform array
Parameters:
Name Type Description
proteoform object Proteoform is an object with information about a particular proteoform
best_e_value Float This contains a constant fixed higher value for comparison with e values of each prsm
prsm_id String Contains an empty string, return back id of best prsm
Source:

proteoformToHtml(compatible_proteoform, index, folderpath)

This function builds a header for a proteoform, gets information of best prsm. Forms SVG visualization of the best prsm.
Parameters:
Name Type Description
compatible_proteoform object Contains information of a single proteoform
index Int Index of proteoform
folderpath String Provides path to data files
Source:

proteoformUrl(folderpath)

Create naviagtion urls to go back to protein page and all protein page
Parameters:
Name Type Description
folderpath String Path to data folder
Source:

rect_Backgroundcolor(x, y, id, width, para)

Code to color the background of a occurence acids
Parameters:
Name Type Description
x Integer Contains x coordinate of the start postion to add background color
y Integer Contains y coordinate of the end position to add background color
id String Contains id of the SVG tag from html.
width Integer Contains width to whuich backgroud color has to be added
para Object Contains parameters of width, letter space etc., to draw SVG
Source:

reDrawWithSpecParams(current_data, id, spectrumParameters, specId)

Function to redraw the spectrum on popup window on click of download button for respected scan number
Parameters:
Name Type Description
current_data Array contains peak list and envelope list data of the corresponding spectrum(Scan Number)
id String Contains the Id of the SVG tag to which the spectrum need to be drawn
spectrumParameters Object Contains spectrum parameters to apply same to the pop window spectrum
specId Int Contains the Spec Id of the corresponding graph
Source:

removeToolTip()

Function to remove tooltip to the polylines on mouseOver
Source:

setDropDownItemsForInspectButton(scanIdList, specIdList)

Create HTML dropdown buttons based on the scan list
Parameters:
Name Type Description
scanIdList Array Contains Scan id numbers
specIdList Array Contains Spec Id numbers
Source:

shiftAnnotation(para, prsm, index)

shift the position of the mass shift when overlapping one another
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
index Integer Current index form the list of annotations
Source:

showAllPeaks()

Function to show all peaks on click of All peaks button
Source:

showCorrespondingGraph(id, className)

Function to hide graphs of all other spectrums other than current showing spectrum
Parameters:
Name Type Description
id String Contains Id of the SVG tag to be shown
className String className of the spectrums to be hidden
Source:

showIonPeaks(ids)

This gets invoked on click of annotation in the SVG of sequence at matched positions Function to show only ions matched at a particular position
Parameters:
Name Type Description
ids String contains name of the tag
Source:

showMatchedPeaks()

Function to show only matched peaks on click of matched peaks button
Source:

showNotMatchedPeaks()

Function to show only unmatched peaks on click of unmatched peaks button
Source:

showSpectrun()

Show spectrum graphs on click of Show Spectrum
Source:

skip_list(para, prsm)

Function to show the notification text at the top and bottom of the SVG sequence SVG of skipped amino acids
Parameters:
Name Type Description
para Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
Source:

skippedAcidNotification(parameters, prsm, id)

Get the terminated/skipped acid information on to the svg
Parameters:
Name Type Description
parameters Object Contains parameters of width, letter space etc., to draw SVG
prsm Object Contains the complete information of prsm.
id String Contians id of the SVG tag from html.
Source: