outputTiles bool
saveIncompleteTiles bool
outputStats string
+ matchChromosome *regexp.Regexp
encoder *gob.Encoder
}
flags.BoolVar(&cmd.outputTiles, "output-tiles", false, "include tile variant sequences in output file")
flags.BoolVar(&cmd.saveIncompleteTiles, "save-incomplete-tiles", false, "treat tiles with no-calls as regular tiles")
flags.StringVar(&cmd.outputStats, "output-stats", "", "output stats to `file` (json)")
+ matchChromosome := flags.String("match-chromosome", "^(chr)?([0-9]+|X|Y|MT?)$", "import chromosomes that match the given `regexp`")
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)")
}
log.SetLevel(lvl)
+ cmd.matchChromosome, err = regexp.Compile(*matchChromosome)
+ if err != nil {
+ return 1
+ }
+
if !cmd.runLocal {
runner := arvadosContainerRunner{
Name: "lightning import",
}
defer input.Close()
}
- return tilelib.TileFasta(infile, input)
+ return tilelib.TileFasta(infile, input, cmd.matchChromosome)
}
func (cmd *importer) loadTagLibrary() (*tagLibrary, error) {
return
}
defer consensus.Wait()
- tileseq, stats, err = tilelib.TileFasta(fmt.Sprintf("%s phase %d", infile, phase+1), stdout)
+ tileseq, stats, err = tilelib.TileFasta(fmt.Sprintf("%s phase %d", infile, phase+1), stdout, cmd.matchChromosome)
if err != nil {
return
}