This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config lang="json"> | |
{ | |
"name": "mi-core", | |
"type": "web-python", | |
"tags": [], | |
"flags": [], | |
"ui": "", | |
"version": "0.1.0", | |
"cover": "", | |
"description": "Connect to the bioengine server, and execute operations.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<docs lang="markdown"> | |
The panel for upload the image file. | |
</docs> | |
<config lang="json"> | |
{ | |
"name": "upload-panel", | |
"type": "window", | |
"tags": [], | |
"ui": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
crawl genecard, fetch gene infos. | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
usage: fetch-genecard.py [-h] [--xpath XPATH] [--base-url BASE_URL] | |
[--num NUM] [--timeout TIMEOUT] | |
id_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(GenomicRanges) | |
library(ggbio) | |
pairs.df <- read.table("D:/tmp/ggbio_demo/ZQL-49_final.txt",header=FALSE, sep="\t")[,1:7] | |
colnames(pairs.df) <- c("read", "chr1", "pos1", "chr2", "pos2", "strand1", "strand2") | |
chromsize.df <- read.csv("D:/tmp/ggbio_demo/susScr11_ASFV_noun.fa.csv") | |
chromsize.gr <- GRanges( | |
seqnames = chromsize.df$seqnames, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nd2reader import ND2Reader | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
import numpy as np | |
import scipy.ndimage as ndi | |
import skimage.filters as F | |
import skimage.morphology as M | |
import skimage.measure as Ms | |
import skimage.exposure as E | |
from skimage.morphology.selem import disk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typing as t | |
from pathlib import Path | |
import fire | |
import mechanicalsoup | |
from bs4 import BeautifulSoup | |
from tqdm import tqdm | |
browser = mechanicalsoup.StatefulBrowser() | |
base_urls = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
from typing import Iterable, Tuple, Optional, Union, Callable, TypeVar | |
from functools import partial | |
from contextlib import ContextDecorator | |
from tqdm.auto import tqdm | |
Bin = Tuple[str, int, int] | |
Bigwig = "pyBigWig.bigWigFile" | |
BinValue = Tuple[Bin, float] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Fetch pictures in Douban Album | |
via Douban API V2(https://douban-api-docs.zce.me/photo.html) | |
""" | |
import os | |
import sys | |
import json | |
from typing import Dict, List, Iterator, Tuple | |
import shutil | |
from concurrent.futures import ThreadPoolExecutor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import attr | |
import typing | |
from collections import defaultdict | |
@attr.s(auto_attribs=True) | |
class GFF3Record: | |
seq_id : str = "" | |
source : str = "" | |
type_ : str = "" | |
start : int = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
import os | |
from concurrent.futures import ThreadPoolExecutor | |
import pandas as pd | |
from tqdm import tqdm | |
def fetch_page(base_url): |