This file contains hidden or 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 itertools as it | |
from functools import partial | |
from multiprocessing import Pool | |
import numpy as np | |
import pandas as pd | |
import click | |
EA_TYPES = { | |
'contig': str, |
This file contains hidden or 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 re | |
from argparse import ArgumentParser | |
parser = ArgumentParser() | |
parser.add_argument("-g", "--gtf-file", help="Input gtf file", | |
required=True) | |
parser.add_argument("-o", "--output-prefix", required=True, | |
help="Prefix of the ouput file") | |
def get_gtf_attribute(gtf_record, attribute): |
This file contains hidden or 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 sys | |
from collections import Counter | |
from functools import partial | |
import numpy as np | |
import pandas as pd | |
import pysam | |
import click | |
def load_bams(bam_fns): |
This file contains hidden or 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 numpy as np | |
from scipy.spatial.distance import cdist | |
from .dtw import dtw | |
from .lb import envelope, lb_keogh_cdist, lb_keogh_from_bounds | |
from .window import window_ts | |
def dtw_nearest_neighbours(query, db, bound_reach, step_size, subseq=False): | |
assert query.ndim == 1 | |
assert db.ndim == 2 | |
assert query.flags.contiguous |
This file contains hidden or 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 sys | |
from random import shuffle | |
from collections import Counter, defaultdict | |
import pysam | |
import click | |
import networkx as nx | |
def edit_distance(umi_a, umi_b): | |
''' |
This file contains hidden or 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 sys | |
import os | |
import re | |
import argparse | |
import subprocess | |
from bs4 import BeautifulSoup | |
from pandas import to_datetime | |
def check_pattern(job, pattern): |