Skip to content

Instantly share code, notes, and snippets.

View MatteoLacki's full-sized avatar
💭
devel inside

Matteo MatteoLacki

💭
devel inside
  • Universitätsmedizin Mainz
  • Mainz
  • 06:04 (UTC +02:00)
View GitHub Profile
@MatteoLacki
MatteoLacki / countscans.go
Created November 28, 2018 13:50
test gist
//The printspectrum tool prints out the spectrum (mz and intensity values) of a
//Thermo RAW File
//
// Every line of the output is a peak registered by the mass spectrometer
// characterized by an m/z value in Da and an intensity in the mass spectrometer's unit of abundance
package main
import (
"bitbucket.org/proteinspector/ms"
"bitbucket.org/proteinspector/ms/unthermo"
from furious_fastas.peaks import update_fastas
from furious_fastas.parse.species2uniprot import parse as parse_s2u
if __name__ == "__main__":
db_path = 'db'
speciec2url_path='species2url.txt'
s2u = parse_s2u(species2url_path)
update_fastas(db_path, s2u)
@MatteoLacki
MatteoLacki / getisoquantdata.sql
Created April 29, 2019 16:16
Get data from MySQL DB for IsoQuant.
DROP TABLE IF EXISTS petides_for_alignment;
CREATE TABLE petides_for_alignment
SELECT
p.`workflow_index` as run,
p.`mass` as pep_mass,
p.`sequence`,
p.`type`,
p.`modifier`,
#include <iostream>
#include "../../IsoSpec++/isoSpec++.hpp"
int main()
{
IsoSpec* iso = IsoSpec::IsoFromFormula("H2O1", 0.9);
iso->processConfigurationsUntilCutoff();
C1526H2425N439O435S15
C508H799N129O167S4
C732H1196N204O243S4
C1093H1729N301O327S19
C560H905N175O145S4
C286H477N99O65S2
C2333H3644N608O630S26
C1907H2967N507O481S14
C145H272N64O28S3
C2114H3535N663O561S15
C1526H2425N439O435S15
C508H799N129O167S4
C732H1196N204O243S4
C1093H1729N301O327S19
C560H905N175O145S4
C286H477N99O65S2
C2333H3644N608O630S26
C1907H2967N507O481S14
C145H272N64O28S3
C2114H3535N663O561S15
@MatteoLacki
MatteoLacki / ohelahela.R
Created March 4, 2020 14:26
Running OHeLa500 Benchmark
# Comparing different executions of the same isoquant projects
# install.packages("igraph")
library(LFQBench2)
library(stringr)
library(igraph)
library(purrr)
is.error <- function(x) inherits(x, "try-error")
dp = "/mnt/ms/symphony/HELA_BENCHMARK/2020_02_18/REPEAT_WITH_SETTINGS_OF_TeslaS/"
comps = list.files(dp)
# hello Ute, long time no see.
library(LFQBench2)
library(data.table)
library(readxl)
library(stringr)
library(rstatix)
library(readr)
# reading in the report
R = read_wide_report('2019-107_115 Renauld remeasure_user designed 20200306-122426_quantification_report_UD_sent.xlsx',
skip=1, sheet="TOP3 quantification")
install.packages(c('data.table','IsoSpecR','ggplot2','ggthemes'))
library(data.table)
library(IsoSpecR)
library(ggplot2)
library(ggthemes)
isoDist = function(mol, P=.99, ...) as.data.table(IsoSpecify(molecule=mol, P, showCounts=1,...))
marginal = function(mol, cutoff, space=0) isoDist(mol, cutoff, algo=3)[order(prob, decreasing=TRUE)][,rprob:=prob/prob[1]][,R:=cumsum(rprob) + (0:(nrow(.SD)-1))*space][,L:=R-rprob ]
"""All this is meant to work only on Windows."""
import os
from pathlib import Path
import subprocess
import sys
import time
import hashlib
import argparse
import logging