Skip to content

Instantly share code, notes, and snippets.

View ezralanglois's full-sized avatar

Robert Langlois ezralanglois

View GitHub Profile
@ezralanglois
ezralanglois / error_rate_summary.py
Last active April 6, 2023 14:41
How to calculate the error rate using the interop summary logic and from the imaging table on the read/lane level
import interop.core
import pandas
'''
NovaSeq run: 10x Genomics Single Cell 3' Gene Expression
10x Genomics 3’ Gene Expression libraries (dual index) were generated from ~1200 PBMC cells as described in
the CG000315 - Chromium Next GEMSingle Cell 3ʹ Reagent Kits v3.1 (Dual Index) Rev C. 8 individual 10X Gene
Expression libraries (technical replicates) were sequenced in the 10x Genomics lab on a NovaSeq 6000 using the SP flowcell.
@ezralanglois
ezralanglois / plot_q30.py
Last active December 12, 2024 08:50
Plot Q30 per cycle using the Illumina InterOp library
# Tested with
# - Anaconda Python 3.7
# - Illumina InterOp 1.1.12
import interop.py_interop_plot as interop_plot
import interop.py_interop_run as interop_run
import interop.py_interop_run_metrics as interop_run_metrics
import pandas as pd
@ezralanglois
ezralanglois / plot_q_score_histogram.py
Last active August 8, 2017 16:34
Use the Illumina InterOp Library to plot the Q-score Histogram
from interop import py_interop_run_metrics, py_interop_run, py_interop_plot
import matplotlib.pyplot as plt
# Read in InterOp Data
run_folder = r"D:\RTA.Data\InteropData\MiSeqDemo"
run_metrics = py_interop_run_metrics.run_metrics()
valid_to_load = py_interop_run.uchar_vector(py_interop_run.MetricCount, 0)
valid_to_load[py_interop_run.Q]=1
run_metrics.read(run_folder, valid_to_load)
@ezralanglois
ezralanglois / example_q_metric_set.c++
Last active April 6, 2017 21:12
How to load and use a Q metric set in Illumina InterOp
/** Populate and use a Q-metric Set
*
*
* @file
* @date 4/6/17
* @version 1.0
* @copyright Illumina Use Only
*/
#include <iostream>
@ezralanglois
ezralanglois / cpp
Last active March 4, 2016 19:01
First cycle intensity
#include "interop/model/metric_sets/extraction_metric_set.h"
#include "interop/io/metric_file_stream.h"
using namespace illumina::interop::model::metrics;
using namespace illumina::interop::io;
void first_cycle_intensity_by_lane(const extraction_metrics& extraction_metric_set, std::map< size_t, float >& intensity_by_lane )
{
const size_t channel = 0;
std::map< size_t, size_t > count_by_lane;