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
constituency | GRN | CON | delta | winner | ||
---|---|---|---|---|---|---|
0 | Brighton Pavilion | 28809 | 3975 | 24834 | GRN | |
1 | Bristol Central | 24539 | 1998 | 22541 | GRN | |
2 | Hackney South and Shoreditch | 9987 | 2076 | 7911 | LAB | |
3 | Bristol East | 14142 | 6435 | 7707 | LAB | |
4 | Lewisham North | 9685 | 2701 | 6984 | LAB | |
5 | Walthamstow | 9176 | 2353 | 6823 | LAB | |
6 | Sheffield Central | 8283 | 2339 | 5944 | LAB | |
7 | Bristol South | 10855 | 4947 | 5908 | LAB | |
8 | North Herefordshire | 21736 | 15842 | 5894 | GRN |
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
22,23c22,23 | |
< \documentclass[unnumsec,webpdf,contemporary,large]{oup-authoring-template}% | |
< %\documentclass[unnumsec,webpdf,contemporary,large,namedate]{oup-authoring-template}% uncomment this line for author year citations and comment the above | |
--- | |
> % \documentclass[unnumsec,webpdf,contemporary,large]{oup-authoring-template}% | |
> \documentclass[unnumsec,webpdf,contemporary,large,namedate]{oup-authoring-template}% uncomment this line for author year citations and comment the above | |
957,958c957,958 | |
< %\bibliographystyle{abbrvnat} | |
< %\bibliography{reference} | |
--- |
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
""" | |
Purpose: Concatenate demultiplexed FASTQs by barcode for one or more ONT runs | |
Usage: python concat_by_barcode.py run1/fastq_pass run2/fastq_pass -o output/ | |
Author: Bede Constantinides | |
""" | |
import subprocess | |
import sys | |
import argparse | |
from collections import defaultdict |
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 io import StringIO | |
import pandas as pd | |
import pandera as pa | |
import pandera.extensions as extensions | |
from pandera.typing import Index, Series | |
csv_string = """ | |
sample_name,country,region | |
cDNA-VOC-1-v4-1,USA,Bretagne |
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 split_summary_by_barcode(summary_path, out_dir, run_name): | |
'''Given a sequencing summary file path, write per barcode summaries to an output directory''' | |
dtypes = { | |
'filename_fastq': 'object', | |
'filename_fast5': 'object', | |
'read_id': 'object', | |
'run_id': 'category', | |
'channel': 'int64', | |
'mux': 'int64', |
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 pandas as pd | |
from bokeh.models.widgets import Select | |
from bokeh.layouts import widgetbox | |
from bokeh.models import ColumnDataSource, DataTable, TableColumn, CustomJS | |
from bokeh.io import show, output_file, output_notebook, reset_output | |
from bokeh.layouts import row, column, layout | |
raw_data = {'ORG': ['APPLE', 'ORANGE', 'MELON'], | |
'APPROVED': [5, 10, 15], |
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 pandas as pd | |
from scipy.spatial.distance import squareform | |
from scipy.cluster.hierarchy import fcluster, linkage | |
def cluster_df(df, method='single', threshold=100): | |
''' | |
Accepts a square distance matrix as an indexed DataFrame and returns a dict of index keyed flat clusters | |
Performs single linkage clustering by default, see scipy.cluster.hierarchy.linkage docs for others | |
''' | |
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 ubuntu:16.04 | |
RUN apt-get update && \ | |
apt-get --yes install \ | |
kmc smalt python3-pip zlib1g-dev libncurses5-dev libncursesw5-dev mummer samtools | |
RUN pip3 install iva | |
ENTRYPOINT ["iva"] |
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.
NewerOlder