runLocal bool
skipOOO bool
outputTiles bool
+ includeNoCalls bool
encoder *gob.Encoder
}
flags.BoolVar(&cmd.runLocal, "local", false, "run on local host (default: run in an arvados container)")
flags.BoolVar(&cmd.skipOOO, "skip-ooo", false, "skip out-of-order tags")
flags.BoolVar(&cmd.outputTiles, "output-tiles", false, "include tile variant sequences in output file")
+ flags.BoolVar(&cmd.includeNoCalls, "include-no-calls", false, "treat tiles with no-calls as regular tiles")
priority := flags.Int("priority", 500, "container request priority")
pprof := flags.String("pprof", "", "serve Go profile data at http://`[addr]:port`")
loglevel := flags.String("loglevel", "info", "logging threshold (trace, debug, info, warn, error, fatal, or panic)")
err = errors.New("cannot specify output file in container mode: not implemented")
return 1
}
- runner.Args = append([]string{"import", "-local=true", "-loglevel=" + *loglevel, fmt.Sprintf("-skip-ooo=%v", cmd.skipOOO), "-tag-library", cmd.tagLibraryFile, "-ref", cmd.refFile, fmt.Sprintf("-output-tiles=%v", cmd.outputTiles), "-o", cmd.outputFile}, inputs...)
+ runner.Args = append([]string{"import",
+ "-local=true",
+ "-loglevel=" + *loglevel,
+ fmt.Sprintf("-skip-ooo=%v", cmd.skipOOO),
+ fmt.Sprintf("-output-tiles=%v", cmd.outputTiles),
+ fmt.Sprintf("-include-no-calls=%v", cmd.includeNoCalls),
+ "-tag-library", cmd.tagLibraryFile,
+ "-ref", cmd.refFile,
+ "-o", cmd.outputFile,
+ }, inputs...)
var output string
output, err = runner.Run()
if err != nil {
bufw := bufio.NewWriter(output)
cmd.encoder = gob.NewEncoder(bufw)
- tilelib := &tileLibrary{taglib: taglib, skipOOO: cmd.skipOOO}
+ tilelib := &tileLibrary{taglib: taglib, includeNoCalls: cmd.includeNoCalls, skipOOO: cmd.skipOOO}
if cmd.outputTiles {
tilelib.encoder = cmd.encoder
}
}
type tileLibrary struct {
- skipOOO bool
- taglib *tagLibrary
- variant [][][blake2b.Size256]byte
+ includeNoCalls bool
+ skipOOO bool
+ taglib *tagLibrary
+ variant [][][blake2b.Size256]byte
// count [][]int
// seq map[[blake2b.Size]byte][]byte
variants int
// Return a tileLibRef for a tile with the given tag and sequence,
// adding the sequence to the library if needed.
func (tilelib *tileLibrary) getRef(tag tagID, seq []byte) tileLibRef {
- for _, b := range seq {
- if b != 'a' && b != 'c' && b != 'g' && b != 't' {
- // return "tile not found" if seq has any
- // no-calls
- return tileLibRef{tag: tag}
+ if !tilelib.includeNoCalls {
+ for _, b := range seq {
+ if b != 'a' && b != 'c' && b != 'g' && b != 't' {
+ // return "tile not found" if seq has any
+ // no-calls
+ return tileLibRef{tag: tag}
+ }
}
}
tilelib.mtx.Lock()