Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
task status:completed end:today export | jq '.[].description' --raw-output
@oolonek
oolonek / gnps_download_results.py
Last active September 12, 2022 05:50
massql_metadata_addition
import subprocess
import shlex
import zipfile
import os
import pandas as pd
def gnps_download_results(job_id, output_folder):
# This function download GNPS molecular networking job results locally
# and detect if the job is classical or feature-based Molecular networking.
# It then creates instances of the network and annotation tables.
@oolonek
oolonek / ncbi_parser.py
Last active July 29, 2022 14:15
parsing_NCBI
import pandas as pd
import urllib.request
import zipfile
# We fetch the ncbi taxon list
print('Beginning file download with urllib2...')
@oolonek
oolonek / sandbox.py
Last active July 29, 2022 11:20
bioregistry
from bioregistry import normalize_prefix
# Doesn't affect canonical prefixes
assert 'ncbitaxon' == normalize_prefix('ncbitaxon')
# This works for uppercased prefixes, like:
assert 'chebi' == normalize_prefix("CHEBI")
# This works for mixed case prefixes like
assert 'fbbt' == normalize_prefix("FBbt")
@oolonek
oolonek / spectral_subsetter.py
Last active June 4, 2022 08:56
spectral_subsetter
# Required global libs
import os
import sys
import time
import numpy as np
import pandas as pd
import tqdm
@oolonek
oolonek / tree
Created February 12, 2021 18:52
tree
/-1
|
/- /-|-- /- /-2364
| |
| \-3375
|
| /-2062
| /-|
| | \- /-1882