Skip to content

Instantly share code, notes, and snippets.

@dalexander
dalexander / README.md
Created May 22, 2016 19:38
Description of ccs --byStrand issue

byStrand,noPolish settings incorrectly recognized as true by ccs under clang

Running ccs on my Mac (clang++), I get this failure:

[~/Dropbox/Sources/git-pbi/pbccs]$ bin/ccs --logLevel=DEBUG \
  --minZScore -100 --maxDropFrac 0.8 tests/data/100zmws.bam test.fq
Usage: ccs [OPTIONS] INPUT OUTPUT

ccs: error: option --byStrand: incompatible with --noPolish
@dalexander
dalexander / HMM.jl
Last active August 29, 2015 14:15 — forked from sbos/HMM.jl
module HMM
using Distributions
import Distributions.rand
import Distributions.fit
immutable HiddenMarkovModel{TP, K}
theta::Vector{TP}
A::Matrix{Float64}
@dalexander
dalexander / ReadName.cpp
Created February 11, 2015 00:35
xpressive readname
#include "ReadName.hpp"
#include <exception>
#include <string>
#include <boost/xpressive/xpressive.hpp>
#include <boost/lexical_cast.hpp>
using std::string;
using boost::xpressive::smatch;
using boost::lexical_cast;

Can we get the offset of the first alignment within a range?

The answer seems to be “no”. Building the iterator (sam_itr_queryi) does not seek, and the first time you use advance the iterator (bam_itr_next), you are already past the first read.

Here are the offsets of the first reads in the file, along with their [tStart, tEnd) spans:

Can we get the offset of the first alignment within a range?

The answer seems to be “no”. Building the iterator (sam_itr_queryi) does not seek, and the first time you use advance the iterator (bam_itr_next), you are already past the first read.

Here are the offsets of the first reads in the file, along with their [tStart, tEnd) spans:

Can we get the offset of the first alignment within a range?

The answer seems to be "no".

@dalexander
dalexander / -
Created November 11, 2014 05:54
xcsdc
@dalexander
dalexander / BAM.fsx
Last active August 29, 2015 14:05
BAM experiments
#light
#r "PacBio.Native.BamTools.dll"
open System
open PacBio.Native.BamTools
let reader = new BamReader()
reader.Open("/Users/dalexander/Data/082796.bam")
reader.LocateIndex()
@dalexander
dalexander / HMM.jl
Created June 14, 2014 05:23 — forked from sbos/HMM.jl
module HMM
using Distributions
import Distributions.rand
import Distributions.fit
immutable HiddenMarkovModel{TP, K}
theta::Vector{TP}
A::Matrix{Float64}
@dalexander
dalexander / realign.py
Last active August 29, 2015 13:59
basic gap realignment for better visualization
#
# Push gaps forward in homopolymers
#
# Rewrite rule 1: XX ===> XX
# X- -X
#
# Rewrite rule 2: X- ===> -X
# XX XX
#
# Iterate until convergence.