Skip to content

Commit

Permalink
starting to add doc of new mqlive version
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwi committed Dec 17, 2019
1 parent c0e02c8 commit b5314fc
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions analysis/mqlivelib/load_log.py
@@ -0,0 +1,40 @@
import pandas as pd
import sys
from scipy import *
from scipy import ndimage
from numpy import *
from pylab import *

def isfloat(value):
try:
float(value)
return True
except ValueError:
return False


def parseLogFile(fName):
fl = open(fName)
data = [i.split()[3:] for i in fl.readlines() if i.find("PEPTIDE_FOUND_MS1") != -1]
data = [["rt:", i[0]] + i[2:] for i in data]
fl.close()

keys, idz, values = [], [], []
for c, s in enumerate(data[0]):
if (s[-1] == ":"): keys.append(s.replace(":", ""))

for s in data:
v = []
for c, i in enumerate(s):
if (i[-1] == ":"): v.append(s[c + 1])
if (len(v) == len(keys)): values.append(v)

values = [[float(v) if isfloat(v) else v for v in val] for val in values]

peptides = pd.DataFrame(values, columns=keys)
peptideLengths = peptides.groupby('id')['rt'].max() - peptides.groupby('id')['rt'].min()

peptides = peptides.loc[peptides.groupby('id')['intensity'].idxmax()]
peptides['length'] = peptideLengths.values

return peptides.sort_values('rt')
2 changes: 1 addition & 1 deletion docs/appTargeting.rst
@@ -1,7 +1,7 @@
Targeting
=========

.. figure:: figures/image036.png
.. figure:: figures/TargetingApp.png
:width: 200px
:align: left

Expand Down
Binary file added docs/figures/TargetingApp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figures/UnzippedFolder.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b5314fc

Please sign in to comment.