Skip to content

Instantly share code, notes, and snippets.

View mpkocher's full-sized avatar

M. Kocher mpkocher

View GitHub Profile
{
"num_3_seen": 13,
"num_5_seen": 11,
"num_filtered_short_reads": 0,
"num_fl": 9,
"num_flc": 0,
"num_flnc": 9,
"num_flnc_bases": 35563,
"num_nfl": 13,
"num_nflc": null,
@mpkocher
mpkocher / preset.xml
Last active July 9, 2019 17:18
SA3 Services + Tools configuration Docs
<?xml version="1.0" ?>
<pipeline-template-preset id="MyPreset">
<!-- Pbsmrtpipe Engine Options -->
<options>
<!-- Enable Distributed Mode -->
<option id="pbsmrtpipe.options.distributed_mode">
<value>False</value>
</option>
<!-- Enable file chunking -->
@mpkocher
mpkocher / load-sal.py
Last active December 3, 2015 23:58
load-sal.py
from collections import defaultdict
from pbcommand.services import ServiceAccessLayer as Sal, JobTypes
SALS = {}
def register_sal(host, port):
s = Sal(host, port)
SALS[host] = s
return s
@mpkocher
mpkocher / dev_diagnostic_analysis.json
Created December 10, 2015 23:43
dev_diagnostic analysis.json Example
{
"entryPoints": [
{
"_comment": "datasetId can be provided as the DataSet UUID or Int. The entryId(s) can be obtained by running 'pbsmrtpipe show-pipeline-templates {PIPELINE-ID}'",
"datasetId": "1a369917-507e-4f70-9f38-69614ff828b6",
"entryId": "eid_ref_dataset",
"fileTypeId": "PacBio.DataSet.ReferenceSet"
}
],
"name": "MK Dev pbservice Job",
@mpkocher
mpkocher / example_mapping_stats_report.json
Created January 29, 2016 19:31
Example mapping stats Report
{
"_changelist": "UNKNOWN",
"_version": "0.3.5",
"attributes": [
{
"id": "mapping_stats.mapped_subread_bases_n",
"name": "Mapped Subread Bases",
"value": 281731533
},
{
@mpkocher
mpkocher / Notes.md
Last active February 9, 2016 19:56
Transfer Scheme Models

Transfer Scheme Notes

  • The Scheme "id" must be ([A-z0-9-_]*)
  • scheme must be "srs" (SSH+rsync) or "rsync" (rsync server)
  • user non-empty string
  • host non-empty string
  • port int
  • auth string /path/to/file
  • path (see below)
@mpkocher
mpkocher / jenkins_pa_rpms.py
Last active October 2, 2019 15:18
Jenkins PA rpms
import jenkins
from collections import namedtuple
# pip install python-jenkins
Resource = namedtuple("Resource", "jenkins rpm transformer")
RELEASE_NAME = "-dromedary-"
def split_name(n):
return n.split(RELEASE_NAME)[-1]
@mpkocher
mpkocher / sal_example.py
Created February 24, 2016 02:12
Service Example for Reports
# Required pbcommand >= 0.3.14
from pbcommand.pb_io.report import dict_to_report
from pbcommand.services import ServiceAccessLayer as S
from pbcommand.pb_io import load_report_from_json
sal = S("smrtlink-beta", 8081)
J_ID = 3349
R_UUID = "a37453c1-3463-4dbc-945a-f5cf2db1c812"
@mpkocher
mpkocher / laa_chunk_operator.xml
Created February 24, 2016 17:29
LAA Chunk Operator
<?xml version="1.0" encoding="utf-8" ?>
<chunk-operator id="pbsmrtpipe.operators.chunk_laa_ds">
<task-id>pblaa.tasks.laa</task-id>
<scatter>
<scatter-task-id>pbsmrtpipe.tasks.subreadset_barcode_scatter</scatter-task-id>
<chunks>
<chunk out="$chunk.subreadset_id" in="pblaa.tasks.laa:0"/>
</chunks>
@mpkocher
mpkocher / smrtlinkJobResolver.R
Last active March 11, 2016 07:05
Get AlignmentSet by SL system and Job Id
#!/usr/bin/env Rscript
# ls /pbi/dept/secondary/siv/smrtlink/smrtlink-*
ALPHA <- "alpha"
BETA <- "beta"
BIHOURLY <- "bi-hourly"
NIGHLTLY <- "nightly"
SIV <- "siv"
SIV_ALPHA <- "siv-alpha"