This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sequence conservation score function, from Valdar 2001 - https://doi.org/10.1002/1097-0134\(20010101\)42:1<108::AID-PROT110>3.0.CO;2-O | |
import pandas as pd | |
import numpy as np | |
# Load substitution matrix (PET91) | |
# https://doi.org/10.1093/bioinformatics/8.3.275 | |
pet91 = pd.read_csv('pet91.csv', comment='!', index_col=0) | |
m = pet91 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BUILD THERMO XCALIBUR INCLUSION LIST | |
# returns inclusion list dataframe | |
build_inclusion_list <- function( | |
input, # dataframe, with columns: | |
# `Raw file`, `Modified sequence`, `Retention time`, `Charge` | |
file='inclusion_list.csv', # output file | |
rt_width=3, # width, in minutes, of the RT window on either side | |
mz_decimals=5, # number of decimals to round m/z to | |
rt_decimals=1, # number of decimals to round RT to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--- LONG POLL --*/ | |
/** | |
* Adapted from http://blog.gospodarets.com/fetch_in_action/ | |
* many thanks! | |
*/ | |
var MAX_WAITING_TIME = 5000;// in ms | |
var getJSON = function (params) { | |
var wrappedPromise = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* patch to make backbone work on react native | |
* replaces the underlying jQuery API with the whatwg fetch API | |
* doesn't cover all use cases... but has worked fine with our project | |
*/ | |
var Backbone = require('backbone'); | |
var _ = require('underscore'); | |
Backbone.sync = function(method, model, options) { |