Skip to content

Instantly share code, notes, and snippets.

View mpkocher's full-sized avatar

M. Kocher mpkocher

View GitHub Profile
@mpkocher
mpkocher / get-subreadset-analysis.py
Created June 15, 2016 02:32
Get Most Recent Analysis Job from SubreadSet by UUID
#!/usr/bin/env python
import os
import sys
import logging
from pbcommand.utils import setup_log
try:
import pbcommand
except ImportError:
@mpkocher
mpkocher / SMRTLinkDemoServices.ipynb
Created June 15, 2016 06:57
Example SMRTLink Services ipython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / AutomateSMRTLinkJobSubmission.md
Last active June 15, 2016 15:07
Automate Analysis Job Submission to SMRT Link/Analysis

Automation of Analysis Job Submission

Analysis Jobs can submitted using pbservice using a JSON file that specifies the pipeline template id and the entry points as UUID.

pbservice run-analysis --host smrtlink-bihourly --port 8081 --block --debug /path/to/analysis-job.json

The analysis-job.json encodes the pipeline template and DataSet entry points that should be used. The DataSets are referenced by UUID and pipeline entry point point id/label are dependent on a specific pipeline id (e.g., pbsmrtpipe.pipelines.resequencing).

The --block option will block the process and poll the job status. In the absence of the --block, the job will only be submitted.

@mpkocher
mpkocher / report-example.ipynb
Created June 23, 2016 15:01
PacBio Report Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpkocher
mpkocher / REQUIREMENTS.txt
Last active August 8, 2016 07:28
SMRT Link Pipeline Automation
pbcommand >= 0.4.5
@mpkocher
mpkocher / ImplicitExample.scala
Last active August 26, 2016 01:57
Scala Implicit Example
object Example {
trait DataSet {
def name: String
}
case class SubreadSet(name: String) extends DataSet
case class AlignSet(name: String) extends DataSet
@mpkocher
mpkocher / generate_file_types_r_code.py
Last active October 13, 2016 03:53
Generate pbcommandr File Types code from pbcommand
from pbcommand.models import FileTypes
# Generate the pbcommandR file type definitions from the python code
# https://github.com/PacificBiosciences/pbcommandR/blob/master/R/common.R
def to_n(ext):
return ext.replace(".", '').replace("_", "")
def to_r(ft):
@mpkocher
mpkocher / out.txt
Created October 13, 2016 03:55
Output example of generate file types R code from pbcommand
(pbsmrtpipe_test)21326a76b5b1ca7c27f82fc74fe4ea7b $> ipython -i generate_file_types_r_code.py
Python 2.7.10 (default, Jul 13 2015, 12:05:58)
Type "copyright", "credits" or "license" for more information.
IPython 5.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
@mpkocher
mpkocher / converters_to_rst.py
Created October 19, 2016 20:54
Pipeline to RST
"""Example of Convert to RST"""
import sys
from collections import namedtuple
from pbcommand.cli import get_default_argparser_with_base_opts
from pbcommand.validators import validate_dir
from pbsmrtpipe.models import Pipeline
__version__ = "0.1.0"
@mpkocher
mpkocher / SubreadSetHeatMap.ipynb
Last active October 2, 2019 15:13
SubreadSet HeatMaps Sketch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.