Skip to content

Instantly share code, notes, and snippets.

@pgsin
pgsin / main.py
Last active November 28, 2023 19:32
Phosphoproteome on Astral - Figure 1C and 1D
import json
import random
import math
from random import sample
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
from matplotlib.colors import Normalize
This file has been truncated, but you can view the full file.
Protein IDs Majority protein IDs Peptide counts (all) Peptide counts (razor+unique) Peptide counts (unique) Fasta headers Number of proteins Peptides Razor + unique peptides Unique peptides Peptides pHis3_01 Peptides pHis3_02 Peptides pHis3_03 Peptides SMC1_01 Peptides SMC1_02 Peptides SMC1_03 Razor + unique peptides pHis3_01 Razor + unique peptides pHis3_02 Razor + unique peptides pHis3_03 Razor + unique peptides SMC1_01 Razor + unique peptides SMC1_02 Razor + unique peptides SMC1_03 Unique peptides pHis3_01 Unique peptides pHis3_02 Unique peptides pHis3_03 Unique peptides SMC1_01 Unique peptides SMC1_02 Unique peptides SMC1_03 Sequence coverage [%] Unique + razor sequence coverage [%] Unique sequence coverage [%] Mol. weight [kDa] Sequence length Sequence lengths Q-value Score Sequence coverage pHis3_01 [%] Sequence coverage pHis3_02 [%] Sequence coverage pHis3_03 [%] Sequence coverage SMC1_01 [%] Sequence coverage SMC1_02 [%] Sequence coverage SMC1_03 [%] Intensity Intensity pHis3_01 Intensity pHis3_02 Int
using System;
using System.Collections.Generic;
namespace ConsoleApp9 {
public class BinaryTreeNode {
public int Data { get; }
public BinaryTreeNode Left { get; }
public BinaryTreeNode Right { get; }
public BinaryTreeNode(int data) {
#include <bits/stdc++.h>
using namespace std;
struct BinaryTreeNode {
int data;
BinaryTreeNode* left;
BinaryTreeNode* right;
};
@pgsin
pgsin / proteinGroups.txt
Created March 11, 2020 17:27
Protein groups from SMC1 interactomics tutorial
This file has been truncated, but you can view the full file.
Protein IDs Majority protein IDs Peptide counts (all) Peptide counts (razor+unique) Peptide counts (unique) Fasta headers Number of proteins Peptides Razor + unique peptides Unique peptides Peptides pHis3_01 Peptides pHis3_02 Peptides pHis3_03 Peptides SMC1_01 Peptides SMC1_02 Peptides SMC1_03 Razor + unique peptides pHis3_01 Razor + unique peptides pHis3_02 Razor + unique peptides pHis3_03 Razor + unique peptides SMC1_01 Razor + unique peptides SMC1_02 Razor + unique peptides SMC1_03 Unique peptides pHis3_01 Unique peptides pHis3_02 Unique peptides pHis3_03 Unique peptides SMC1_01 Unique peptides SMC1_02 Unique peptides SMC1_03 Sequence coverage [%] Unique + razor sequence coverage [%] Unique sequence coverage [%] Mol. weight [kDa] Sequence length Sequence lengths Q-value Score Sequence coverage pHis3_01 [%] Sequence coverage pHis3_02 [%] Sequence coverage pHis3_03 [%] Sequence coverage SMC1_01 [%] Sequence coverage SMC1_02 [%] Sequence coverage SMC1_03 [%] Intensity Intensity pHis3_01 Intensity pHis3_02 Int
@pgsin
pgsin / proteinGroups.txt
Created March 11, 2020 17:27
Protein groups from SMC1 interactomics tutorial
This file has been truncated, but you can view the full file.
Protein IDs Majority protein IDs Peptide counts (all) Peptide counts (razor+unique) Peptide counts (unique) Fasta headers Number of proteins Peptides Razor + unique peptides Unique peptides Peptides pHis3_01 Peptides pHis3_02 Peptides pHis3_03 Peptides SMC1_01 Peptides SMC1_02 Peptides SMC1_03 Razor + unique peptides pHis3_01 Razor + unique peptides pHis3_02 Razor + unique peptides pHis3_03 Razor + unique peptides SMC1_01 Razor + unique peptides SMC1_02 Razor + unique peptides SMC1_03 Unique peptides pHis3_01 Unique peptides pHis3_02 Unique peptides pHis3_03 Unique peptides SMC1_01 Unique peptides SMC1_02 Unique peptides SMC1_03 Sequence coverage [%] Unique + razor sequence coverage [%] Unique sequence coverage [%] Mol. weight [kDa] Sequence length Sequence lengths Q-value Score Sequence coverage pHis3_01 [%] Sequence coverage pHis3_02 [%] Sequence coverage pHis3_03 [%] Sequence coverage SMC1_01 [%] Sequence coverage SMC1_02 [%] Sequence coverage SMC1_03 [%] Intensity Intensity pHis3_01 Intensity pHis3_02 Int
{"inputs": [[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0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from Bio import Entrez
import os
import gzip
"""
To avoid problems with an access rate (ex. "HTTP Error 429: Too Many Requests")
Read how to get an api-key
https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
"""
Entrez.api_key = '<your api key here>'
@pgsin
pgsin / Snakefile
Last active August 16, 2019 22:11
import os
import re
GENOME = 'data/22'
rule all:
input: expand('output/reports/{SAMPLE}', SAMPLE=[os.path.splitext(i)[0] for i in os.listdir('input/') if not i.startswith('.') and i.endswith(".bam")])
output: touch('output/done')
rule reference_index:
@pgsin
pgsin / MakeTable.cs
Last active September 13, 2018 22:32
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
namespace ImmunopepModel
{
public class Gene
{