Skip to content

Instantly share code, notes, and snippets.

View lars20070's full-sized avatar

Lars Nilse lars20070

View GitHub Profile
@lars20070
lars20070 / mzTab.R
Last active March 3, 2023 09:44
import mzTab in R
library(reticulate)
use_virtualenv("./venv")
tables <- import("pyteomics")$mztab$MzTab("proteins_quant.mzTab")
prt <- tables$protein_table
pep <- tables$peptide_table
psm <- tables$spectrum_match_table
@lars20070
lars20070 / mzTab.py
Last active March 3, 2023 09:21
import mzTab in Python
from pyteomics import mztab
tables = mztab.MzTab("proteins_quant.mzTab")
prt = tables.protein_table
pep = tables.peptide_table
psm = tables.spectrum_match_table
@lars20070
lars20070 / example.py
Created January 9, 2021 19:12
attribute trannsfer
df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
df.x = 'Hello'
df2 = df[:-1]
print(df2.x)
@lars20070
lars20070 / logs
Created January 2, 2021 09:30
docker logs glassnode_server
Larss-MBP:GlassnodeChallenge lars$ docker logs glassnode_server
2021/01/02 09:28:04 http: panic serving 172.21.0.1:57406: dial tcp 172.21.0.2:5432: connect: connection refused
goroutine 34 [running]:
net/http.(*conn).serve.func1(0xc000188000)
/usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x6e9d20, 0xc00005c0f0)
/usr/local/go/src/runtime/panic.go:975 +0x47a
main.OpenConnection(0x6543dc)
/app/main.go:38 +0x1a5
main.GETHandler(0x78ba40, 0xc0000fe0e0, 0xc0001ae000)
@lars20070
lars20070 / docker-compose.yml
Created January 1, 2021 18:32
Postgres + Golang REST API
version: "3"
services:
database:
image: glassnode/code-challenge-2020-database:latest
container_name: glassnode_database
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql # executed on postgres database startup
environment:
POSTGRES_DB: eth
@lars20070
lars20070 / postgres
Created December 26, 2020 12:44
start container, add new table to database
docker pull postgres:latest
docker run --name PostgresContainer -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -d postgres
docker exec -it PostgresContainer psql -U test
\c postgres
create table person(name varchar(40), nickname varchar(40));
INSERT INTO person (name, nickname) VALUES ('Jeffrey', 'Jeff');
@lars20070
lars20070 / main.go
Created December 26, 2020 09:24
REST API access to PostgreSQL database
// PostreSQL database through REST API
package main
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"net/http"
%
% virtualenv --system-site-packages -p python3 ./venv
% source ./venv/bin/activate
% pip install --upgrade pweave
% pip install --upgrade pandas
% pweave -f tex pweavetest.texw
% pdflatex pweavetest.tex
%
\documentclass[a4paper]{article}
---------------------------
JOHANNA:
In this work, the group of cis-3-selective PiHs (cis-Pi3Hs) from bacteria is described based on the PiH GetF identified by Müller et al. With the archetypes GetF and PiFa, the cis-Pi3Hs form a monophyletic clade that is catalytically distinct from cis-proline-3-hydroxylases (cis-P3Hs). In vitro conversions showed that GetF and PiFa have a limited substrate tolerance that is dissimilar to the relatively promiscuous cis-P3H: whereas Pip and methylprolines were readily hydroxylated, Pro and smaller derivatives were virtually excluded as substrates. The ability to discriminate between chemically very similar substrates is most likely based on accurate structural differences in the active site. Structural modeling of GetF and molecular docking revealed side chains that are supposed to be responsible for the specificity. Site-directed mutagenesis was used to modify GetF towards a Pro-tolerant activity; however, the variations did not result in a change of substrate specificity
@lars20070
lars20070 / XTandem_OpenMS23_20181126.toppas
Created November 26, 2018 09:13
XTandem (Alanine) search, OpenMS 2.3, 26/11/2018
<?xml version="1.0" encoding="ISO-8859-1"?>
<PARAMETERS version="1.6.2" xsi:noNamespaceSchemaLocation="http://open-ms.sourceforge.net/schemas/Param_1_6_2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NODE name="info" description="">
<ITEM name="version" value="2.3.0" type="string" description="" required="false" advanced="false" />
<ITEM name="num_vertices" value="8" type="int" description="" required="false" advanced="false" />
<ITEM name="num_edges" value="8" type="int" description="" required="false" advanced="false" />
<ITEM name="description" value="&lt;![CDATA[]]&gt;" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="vertices" description="">
<NODE name="0" description="">