Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
process{ | |
// SGE node config | |
executor = 'sge' | |
penv = 'sharedmem' | |
clusterOptions = '-l h_vmem=4G -V' | |
time='12h' | |
cpus = 1 | |
maxRetries = 2 | |
distillerTmpDir='/exports/eddie/scratch/ifliamer' |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Sep 4 11:54:20 2018 | |
@author: Ilya Flyamer | |
""" | |
import pandas as pd | |
import numpy as np |
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
def dedup(dots, hiccups_filter=True): | |
newdots = [] | |
ress = list(sorted(set(dots['res']))) | |
for chrom in sorted(set(dots['chrom1'])): | |
chromdots = dots[dots['chrom1']==chrom].sort_values(['start1', 'start2']).reset_index(drop=True) | |
for res in ress: | |
chromdots['Supported_%s' % res] = (chromdots['res']==res) | |
tree = spatial.cKDTree(chromdots[['start1', 'start2']]) #Not sure what's the best coordinate to use, of the strongest pixel, centroid, or the center of the dot? | |
drop = [] | |
for i, j in tree.query_pairs(r=50000): |
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
### do required imports | |
### make a dict with coolers, like this {'name':cooler.Cooler('path'), ...} | |
### make a dict with coordinates, smth like this: {'300kb_1': ('chr6', 80200000, 84200000), ...} | |
# Here is the key function to plot heatmaps like triangles | |
def pcolormesh_45deg(matrix_c, ax, start=0, resolution=1, *args, **kwargs): | |
start_pos_vector = [start+resolution*i for i in range(len(matrix_c)+1)] | |
import itertools | |
n = matrix_c.shape[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
def pcolormesh_45deg(matrix_c, ax, start=0, resolution=1, *args, **kwargs): | |
start_pos_vector = [start+resolution*i for i in range(len(matrix_c)+1)] | |
import itertools | |
n = matrix_c.shape[0] | |
t = np.array([[1, 0.5], [-1, 0.5]]) | |
matrix_a = np.dot(np.array([(i[1], i[0]) | |
for i in itertools.product(start_pos_vector[::-1], | |
start_pos_vector)]), t) | |
x = matrix_a[:, 1].reshape(n + 1, n + 1) | |
y = matrix_a[:, 0].reshape(n + 1, n + 1) |
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
def fetch_random_means(clr1, exp1, clr2, exp2, region_left, region_right=None, n=1000): | |
assert clr1.binsize==clr2.binsize | |
if region_right is None: | |
region_right = region_left | |
chrom_left, start_left, end_left = cooler.util.parse_region_string(region_left) | |
chrom_right, start_right, end_right = cooler.util.parse_region_string(region_right) | |
assert chrom_left == chrom_right | |
bin1_left = start_left//clr1.binsize |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Jul 18 10:07:49 2019 | |
@author: s1529682 | |
""" | |
from cooltools.lib import numutils | |
import numpy as np |
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
# Fastqs can be provided as: | |
# -- a pairs of relative/absolute paths | |
# -- sra:<SRA_NUMBER>, optionally followed by the indices of the first and | |
# the last entry in the SRA in the form of "?start=<first>&end=<last> | |
# [to implement] -- as a path to a folder with fastqs '<base_folder>', with the structure | |
# <base_folder>/<library_name>/<run_name>/, with each folder containing only | |
# two fastq.gz files | |
input: | |
raw_reads_paths: | |
Schmitt2016_STL002_Adrenal-1: |
OlderNewer