To add a conda environment to the list of environments:
$ source activate thisenv
(thisenv) $ pip install ipykernel
(thisenv) $ python -m ipykernel install --user --name thisenv
from pysam import AlignmentFile | |
from pyfaidx import Fasta | |
def has_mismatch_in_interval(reference, bamfile, chrom, start, end): | |
""" | |
Return whether there is a mismatch in the interval (start, end) in any read mapping to the given chromosome. | |
reference -- a pyfaidx.Fasta object or something that behaves similarly | |
""" | |
for column in bamfile.pileup(chrom, start, end): |
# see also https://github.com/wrobstory/pgshift | |
import gzip | |
from io import StringIO, BytesIO | |
from functools import wraps | |
import boto | |
from sqlalchemy import MetaData | |
from pandas import DataFrame | |
from pandas.io.sql import SQLTable, pandasSQL_builder |