Skip to content

Instantly share code, notes, and snippets.

View atc3's full-sized avatar
😴
💤

Albert Tian Chen atc3

😴
💤
View GitHub Profile
@stephenmcd
stephenmcd / parallel_merge_sort.py
Last active June 4, 2024 12:02
Parallel Merge Sort
import math
import multiprocessing
import random
import sys
import time
def merge(*args):
# Support explicit left/right args, as well as a two-item
# tuple which works more cleanly with multiprocessing.
@atc3
atc3 / build_inclusion_list.R
Last active April 29, 2019 14:51
Build XCalibur Inclusion List
# BUILD THERMO XCALIBUR INCLUSION LIST
# returns inclusion list dataframe
build_inclusion_list <- function(
input, # dataframe, with columns:
# `Raw file`, `Modified sequence`, `Retention time`, `Charge`
file='inclusion_list.csv', # output file
rt_width=3, # width, in minutes, of the RT window on either side
mz_decimals=5, # number of decimals to round m/z to
rt_decimals=1, # number of decimals to round RT to