Skip to content

Instantly share code, notes, and snippets.

View mwalzer's full-sized avatar

Mathias Walzer mwalzer

  • EMBL-EBI
  • Cambridge
View GitHub Profile
{ "mzQC": {
"creationDate": "2020-12-03T19:51:02",
"version": "1.0.0",
"contactName": "Mathias Walzer",
"contactAddress": "walzer@ebi.ac.uk",
"description": "This is an example of an mzQC file produced from a proteomics QC2 sample. 20 ug dried Pierce HeLa protein digest standard from Thermo Fisher Scientific (Part number: 88329) are dissolved in 200 uL of 0.1% formic acid in water to a final concentration of 100 ng/uL. A total amount of 1 uL (100ng) is injected per analysis.",
"runQualities": [
{
"metadata": {
"inputFiles": [
{
"mzQC": {
"creationDate": "2020-12-01T14:19:09",
"contactName": "MW & CB",
"contactAddress": "spam@noreply.com",
"version": "1.0.0",
"description": "A multi-run example, where sets of runs are grouped into setQualities according to the experimental design.
Each setQuality has a label annotation, that must be unique. The label also lends itself as input source to axis labels
if you need to plot a figure from multiple setQualities. If you want to specifiy an upper level of hierarchy (summarizing
dimensions), then add a describing cvParameter in metadata. E.g. you have a sets, one set describes a group at a specific
{ "mzQC": {
"creationDate": "2020-12-01T11:56:34",
"version": "1.0.0",
"contactName": "Mathias Walzer",
"contactAddress": "walzer@ebi.ac.uk",
"runQualities": [
{
"metadata": {
"inputFiles": [
{
@mwalzer
mwalzer / mzQC jsonpath queries
Last active April 27, 2020 11:03
Exploring jsonpath with mzQC
N.b.: before pasting into tools like http://jsonpath.herokuapp.com/ or http://www.jsonquerytool.com/ remove excess , and ...,
...
"qualityMetrics": [
{"cvRef": "ref_not_prefix", "accession": "QC:123", "name": "metric1", "value": 1},...
],
"controlledVocabularies": [
{"ref": "ref_not_prefix", "name": "Proteomics Standards Initiative Quality Control Ontology", "uri": "https://github.com/HUPO-PSI/qcML-development/blob/master/cv/v0_1_0/qc-cv.obo", "version": "0.1.0"},
{"ref": "MS", "name": "Proteomics Standards Initiative Mass Spectrometry Ontology", "uri": "https://github.com/HUPO-PSI/psi-ms-CV/blob/master/psi-ms.obo", "version": "4.1.7"}
]
import hashlib
def sha256fromfile(filename: str) -> str:
sha = hashlib.sha256()
b = bytearray(128*1024)
mv = memoryview(b)
with open(filename, 'rb', buffering=0) as f:
for n in iter(lambda : f.readinto(mv), 0):
sha.update(mv[:n])
return sha.hexdigest()
@mwalzer
mwalzer / SEperformance.py
Created January 21, 2020 10:05
Old qcml script for looking into search engine performance.
#!/usr/bin/env python
__author__ = 'walzer'
import sys
import argparse
import pyopenms as oms
import pandas as pd
from os import path
VERSION = "0.2"
@mwalzer
mwalzer / LigandoQC.py
Created January 21, 2020 09:58
old version of a ligandomics qc script (approx. 2014)
#!/usr/bin/env python
__author__ = 'walzer'
import sys
import os
import subprocess
from datetime import datetime
import logging
import argparse
#import pickle
@mwalzer
mwalzer / epifany_from_pride.nf
Created November 27, 2019 10:01
proteomics LFQ with nextflow
!/usr/bin/env nextflow
/*
========================================================================================
Epiphany OpenMS workflow for protein inference
========================================================================================
@#### Authors
Mathias Walzer <walzer@ebi.ac.uk>
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
{ "mzQC": {
"creationDate": "2019-08-15T11:35:23",
"version": "0_0_11",
"runQualities": [
{
"metadata": {
"inputFiles": [
{
"location": "file:///dev/null",
"name": "CPTAC_CompRef_00_iTRAQ_01_2Feb12_Cougar_11-10-09.raw",
@mwalzer
mwalzer / iptables.sh
Last active June 7, 2019 11:30 — forked from thomasfr/iptables.sh
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers