From cb6066ddde4174a7766ac2b020428c6b584f3aeb Mon Sep 17 00:00:00 2001 From: gnefedev Date: Wed, 20 Dec 2023 10:59:18 +0100 Subject: [PATCH 1/2] test for split by VJ --- .../kotlin/com/milaboratory/mixcr/PresetsTest.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt b/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt index fef72bfea..ecb2a10fc 100644 --- a/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt +++ b/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt @@ -9,7 +9,6 @@ import com.milaboratory.mixcr.basictypes.tag.TagValueType import com.milaboratory.mixcr.basictypes.tag.TagsInfo import com.milaboratory.mixcr.cli.presetFlagsMessages import com.milaboratory.mixcr.export.CloneFieldsExtractorsFactory -import com.milaboratory.mixcr.export.CloneGroupFieldsExtractorsFactory import com.milaboratory.mixcr.export.MetaForExport import com.milaboratory.mixcr.export.VDJCAlignmentsFieldsExtractorsFactory import com.milaboratory.mixcr.presets.MiXCRCommandDescriptor @@ -24,11 +23,10 @@ import io.kotest.assertions.assertSoftly import io.kotest.assertions.throwables.shouldNotThrowAny import io.kotest.assertions.withClue import io.kotest.inspectors.forAll -import io.kotest.matchers.collections.shouldContainAll import io.kotest.matchers.collections.shouldContainAnyOf -import io.kotest.matchers.collections.shouldNotBeIn import io.kotest.matchers.nulls.shouldNotBeNull import io.kotest.matchers.shouldBe +import io.repseq.core.GeneFeature import org.junit.Assert import org.junit.Test import java.nio.file.Paths @@ -217,4 +215,15 @@ class PresetsTest { } } } + + @Test + fun `should be no split by VJ if VDJRegion set as assemble feature`() { + Presets.visiblePresets.filter { presetName -> + val bundle = Presets.MiXCRBundleResolver.resolvePreset(presetName) + val assemble = bundle.assemble ?: return@filter false + if (assemble.cloneAssemblerParameters.assemblingFeatures.toList() != listOf(GeneFeature.VDJRegion)) + return@filter false + assemble.cloneAssemblerParameters.separateByV || assemble.cloneAssemblerParameters.separateByJ + }.also { println(it) } shouldBe emptyList() + } } From 408201d96e75a2adbb892d73aa0f476e9e2405f0 Mon Sep 17 00:00:00 2001 From: gnefedev Date: Wed, 20 Dec 2023 11:01:49 +0100 Subject: [PATCH 2/2] add possible exceptions --- src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt b/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt index ecb2a10fc..840ea202c 100644 --- a/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt +++ b/src/test/kotlin/com/milaboratory/mixcr/PresetsTest.kt @@ -218,12 +218,13 @@ class PresetsTest { @Test fun `should be no split by VJ if VDJRegion set as assemble feature`() { + val exceptions = setOf() Presets.visiblePresets.filter { presetName -> val bundle = Presets.MiXCRBundleResolver.resolvePreset(presetName) val assemble = bundle.assemble ?: return@filter false if (assemble.cloneAssemblerParameters.assemblingFeatures.toList() != listOf(GeneFeature.VDJRegion)) return@filter false assemble.cloneAssemblerParameters.separateByV || assemble.cloneAssemblerParameters.separateByJ - }.also { println(it) } shouldBe emptyList() + }.minus(exceptions).also { println(it) } shouldBe emptyList() } }