Skip to content

Instantly share code, notes, and snippets.

View sergpolly's full-sized avatar

Sergey Venev sergpolly

  • University of Massachusetts Medical School
  • Worcester, MA
View GitHub Profile
@sergpolly
sergpolly / pandas_parser_in_use.py
Created September 6, 2017 21:50
trying out pandas parser for select
header, body_stream = _headerops.get_header(instream)
# # turn body_stream into file-like object aka stream:
body_stream = _io.StringIteratorIO(body_stream)
# # proceed ...
header = _headerops.append_new_pg(header, ID=UTIL_NAME, PN=UTIL_NAME)
outstream.writelines((l+'\n' for l in header))
if outstream_rest:
outstream_rest.writelines((l+'\n' for l in header))
column_names = _headerops.extract_column_names(header)
@sergpolly
sergpolly / get_header.py
Created September 8, 2017 14:42
get header function that returns header as before, and file-like object for the remainder of instream (body_stream)
def get_header(instream, comment_char='#'):
'''Returns a header from the stream and a stream with the remaining
lines.
Parameters
----------
instream : a file object
An input stream.
comment_char : str
The character prepended to header lines (use '@' when parsing sams,
'#' when parsing pairsams).
package juicebox.tools.utils.juicer.hiccups;
import com.google.common.primitives.Doubles;
import com.google.common.primitives.Floats;
import jcuda.Pointer;
import jcuda.Sizeof;
import jcuda.driver.CUdeviceptr;
import jcuda.utils.KernelLauncher;
import juicebox.data.HiCFileTools;
import juicebox.data.MatrixZoomData;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergpolly
sergpolly / pandas_IO_test (2).ipynb
Created October 24, 2017 18:58
pandas read_csv test nosam.pairsam
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergpolly
sergpolly / matrix_tiles.ipynb
Created March 1, 2018 16:37
square matrix tiling (diagonal and square tiling)
{
"cells": [
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
@sergpolly
sergpolly / New_expected_API.ipynb
Created August 11, 2020 21:50
new expected API with bad bins, arms and such
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergpolly
sergpolly / contacts_vs_distance.ipynb
Created October 6, 2020 20:48
contacts_vs_distance_for_Anton_to_merge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.