var mtx sync.Mutex
var cgs []CompactGenome
- var tilelib tileLibrary
+ tilelib := tileLibrary{
+ includeNoCalls: true,
+ }
err = tilelib.LoadGob(context.Background(), input, func(cg CompactGenome) {
if *pick != "" && *pick != cg.Name {
return
alts[a] = i + 1
}
fmt.Fprintf(out, "%s\t%d\t%s\t%s", seqname, varslice[0].Position, ref, strings.Join(altslice, ","))
- for i := 0; i < len(varslice)/2; i++ {
- v1, v2 := varslice[i*2], varslice[i*2+1]
+ for i := 0; i < len(varslice); i += 2 {
+ v1, v2 := varslice[i], varslice[i+1]
a1, a2 := alts[v1.New], alts[v2.New]
if v1.Ref != ref {
a1 = 0
var wg sync.WaitGroup
for i, infile := range []string{
- "testdata/pipeline1/",
"testdata/ref.fasta",
+ "testdata/pipeline1/",
} {
i, infile := i, infile
c.Logf("TestImportMerge: %s", infile)
wg.Add(1)
go func() {
defer wg.Done()
- code := (&importer{}).RunCommand("lightning import", []string{"-local=true", "-o=" + libfile[i], "-skip-ooo=true", "-output-tiles", "-tag-library", "testdata/tags", infile}, bytes.NewReader(nil), &bytes.Buffer{}, os.Stderr)
+ args := []string{"-local=true", "-o=" + libfile[i], "-skip-ooo=true", "-output-tiles", "-tag-library", "testdata/tags"}
+ if i == 0 {
+ // ref only
+ args = append(args, "-include-no-calls")
+ }
+ args = append(args, infile)
+ code := (&importer{}).RunCommand("lightning import", args, bytes.NewReader(nil), &bytes.Buffer{}, os.Stderr)
c.Check(code, check.Equals, 0)
}()
}
c.Check(code, check.Equals, 0)
c.Check(hgvsout.Len() > 0, check.Equals, true)
c.Logf("%s", hgvsout.String())
- c.Check(hgvsout.String(), check.Equals, `chr1:g.[41_42delinsAA];[41=]
+ c.Check(hgvsout.String(), check.Equals, `chr1:g.1_3delinsGGC
+chr1:g.[41_42delinsAA];[41=]
chr1:g.[161=];[161A>T]
chr1:g.[178=];[178A>T]
chr1:g.222_224del
c.Check(code, check.Equals, 0)
c.Check(vcfout.Len() > 0, check.Equals, true)
c.Logf("%s", vcfout.String())
- c.Check(vcfout.String(), check.Equals, `chr1 41 TT AA 1/0
+ c.Check(vcfout.String(), check.Equals, `chr1 1 NNN GGC 1/1
+chr1 41 TT AA 1/0
chr1 161 A T 0/1
chr1 178 A T 0/1
chr1 221 TCCA T 1/1