From 0ff64d7a7972ae632fc4f5bec6e847e3c1a42df8 Mon Sep 17 00:00:00 2001 From: Mark Tomko Date: Wed, 25 Oct 2023 14:44:48 -0700 Subject: [PATCH 1/4] Use sbt 1.9.6 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 3040987..2743082 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.4 +sbt.version=1.9.6 From a3e146c787c180f94cc42c75dfe99e00525b0567 Mon Sep 17 00:00:00 2001 From: Mark Tomko Date: Wed, 25 Oct 2023 14:45:07 -0700 Subject: [PATCH 2/4] Use `rowReads` for demultiplexed read1 --- .../org/broadinstitute/gpp/poolq3/PoolQConfig.scala | 9 +++++++-- test-data/Makefile | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala b/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala index b010663..29d087f 100644 --- a/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala +++ b/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala @@ -39,10 +39,12 @@ final case class PoolQInput( def readsSourceE: Either[Exception, ReadsSource] = (rowReads, reverseRowReads, colReads, reads, demultiplexed) match { case (None, None, None, Some(r), false) => Right(ReadsSource.SelfContained(Nel(r._2, addlReads.view.map(_._2).toList))) + case (Some(rr), None, Some(cr), None, false) => val rs = ReadsSource.Split(Nel(cr, addlColReads), Nel(rr._2, addlRowReads.view.map(_._2).toList)) if (rs.forward.length == rs.index.length) Right(rs) else Left(PoolQException("Number of row, column, and reverse reads files must match")) + case (Some(rr), Some(rrr), Some(cr), None, false) => val rs = ReadsSource.PairedEnd( Nel(cr, addlColReads), @@ -51,12 +53,15 @@ final case class PoolQInput( ) if (rs.forward.length == rs.index.length && rs.forward.length == rs.reverse.length) Right(rs) else Left(PoolQException("Number of row and column reads files must match")) - case (None, None, None, Some(r), true) => - Right(ReadsSource.Dmuxed(Nel(r, addlReads))) + + case (Some(rr), None, None, None, true) => + Right(ReadsSource.Dmuxed(Nel(rr, addlRowReads))) + case (Some(rr), Some(rrr), None, None, true) => val rs = ReadsSource.DmuxedPairedEnd(Nel(rr, addlRowReads), Nel(rrr, addlReverseRowReads)) if (rs.read1.map(_._1) == rs.read2.map(_._1)) Right(rs) else Left(PoolQException("Row and column reads files must match")) + case _ => Left(PoolQException("Conflicting input options")) } diff --git a/test-data/Makefile b/test-data/Makefile index 0b504bc..30b9754 100644 --- a/test-data/Makefile +++ b/test-data/Makefile @@ -191,7 +191,7 @@ test-demultiplexed: --col-reference $(conditions) \ --row-reference $(reference) \ --demultiplexed \ - --reads TTGAACCG:../../test-data/demultiplexed/TTGAACCG.construct.fastq,CCGAGTTA:../../test-data/demultiplexed/CCGAGTTA.construct.fastq,TTGAGTAT:../../test-data/demultiplexed/TTGAGTAT.construct.fastq,CCTCCAAT:../../test-data/demultiplexed/CCTCCAAT.construct.fastq,GGTCACCG:../../test-data/demultiplexed/GGTCACCG.construct.fastq,TTGACAAT:../../test-data/demultiplexed/TTGACAAT.construct.fastq,AATCCAAT:../../test-data/demultiplexed/AATCCAAT.construct.fastq,TTCTCATA:../../test-data/demultiplexed/TTCTCATA.construct.fastq,AATCCACG:../../test-data/demultiplexed/AATCCACG.construct.fastq,AATCGTGC:../../test-data/demultiplexed/AATCGTGC.construct.fastq,AAGAACTA:../../test-data/demultiplexed/AAGAACTA.construct.fastq,CCAGTGAT:../../test-data/demultiplexed/CCAGTGAT.construct.fastq,GGTCGTGC:../../test-data/demultiplexed/GGTCGTGC.construct.fastq,TTAGACCG:../../test-data/demultiplexed/TTAGACCG.construct.fastq,GGTCCACG:../../test-data/demultiplexed/GGTCCACG.construct.fastq,CCGAACTA:../../test-data/demultiplexed/CCGAACTA.construct.fastq,AACTCACG:../../test-data/demultiplexed/AACTCACG.construct.fastq,AATCACTA:../../test-data/demultiplexed/AATCACTA.construct.fastq,GGTCCATA:../../test-data/demultiplexed/GGTCCATA.construct.fastq,GGTCTGCG:../../test-data/demultiplexed/GGTCTGCG.construct.fastq,CCAGTGGC:../../test-data/demultiplexed/CCAGTGGC.construct.fastq,AACTTGCG:../../test-data/demultiplexed/AACTTGCG.construct.fastq,../../test-data/demultiplexed/unmatched.construct.fastq \ + --row-reads TTGAACCG:../../test-data/demultiplexed/TTGAACCG.construct.fastq,CCGAGTTA:../../test-data/demultiplexed/CCGAGTTA.construct.fastq,TTGAGTAT:../../test-data/demultiplexed/TTGAGTAT.construct.fastq,CCTCCAAT:../../test-data/demultiplexed/CCTCCAAT.construct.fastq,GGTCACCG:../../test-data/demultiplexed/GGTCACCG.construct.fastq,TTGACAAT:../../test-data/demultiplexed/TTGACAAT.construct.fastq,AATCCAAT:../../test-data/demultiplexed/AATCCAAT.construct.fastq,TTCTCATA:../../test-data/demultiplexed/TTCTCATA.construct.fastq,AATCCACG:../../test-data/demultiplexed/AATCCACG.construct.fastq,AATCGTGC:../../test-data/demultiplexed/AATCGTGC.construct.fastq,AAGAACTA:../../test-data/demultiplexed/AAGAACTA.construct.fastq,CCAGTGAT:../../test-data/demultiplexed/CCAGTGAT.construct.fastq,GGTCGTGC:../../test-data/demultiplexed/GGTCGTGC.construct.fastq,TTAGACCG:../../test-data/demultiplexed/TTAGACCG.construct.fastq,GGTCCACG:../../test-data/demultiplexed/GGTCCACG.construct.fastq,CCGAACTA:../../test-data/demultiplexed/CCGAACTA.construct.fastq,AACTCACG:../../test-data/demultiplexed/AACTCACG.construct.fastq,AATCACTA:../../test-data/demultiplexed/AATCACTA.construct.fastq,GGTCCATA:../../test-data/demultiplexed/GGTCCATA.construct.fastq,GGTCTGCG:../../test-data/demultiplexed/GGTCTGCG.construct.fastq,CCAGTGGC:../../test-data/demultiplexed/CCAGTGGC.construct.fastq,AACTTGCG:../../test-data/demultiplexed/AACTTGCG.construct.fastq,../../test-data/demultiplexed/unmatched.construct.fastq \ --row-barcode-policy PREFIX:CACCG@18) (cd $(wd); diff counts.txt ../../test-data/expected-counts.txt && \ diff lognormalized-counts.txt ../../test-data/lognormalized-counts.txt && \ From 6c2e772f76dc6ef6c443c0b6bc354f88a1b859c0 Mon Sep 17 00:00:00 2001 From: Mark Tomko Date: Wed, 25 Oct 2023 14:48:00 -0700 Subject: [PATCH 3/4] Update CLI --- src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala b/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala index 29d087f..138b76b 100644 --- a/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala +++ b/src/main/scala/org/broadinstitute/gpp/poolq3/PoolQConfig.scala @@ -175,7 +175,7 @@ object PoolQConfig { val _ = opt[List[(Option[String], Path)]]("row-reads") .valueName("") .action { case (ps, c) => c.copy(input = c.input.copy(rowReads = ps.headOption, addlRowReads = ps.drop(1))) } - .text("required if reads are split between two files") + .text("required if reads are split between two files or for demultiplexed data") .validate(_.view.map(_._2).toList.traverse_(existsAndIsReadable)) val _ = opt[List[(Option[String], Path)]]("rev-row-reads") From 1d0bb328962ff4e1a6bb6076a4d3434845d14a03 Mon Sep 17 00:00:00 2001 From: Mark Tomko Date: Wed, 25 Oct 2023 14:48:11 -0700 Subject: [PATCH 4/4] Update manual --- docs/MANUAL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 332001c..da53a9b 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -587,6 +587,8 @@ You can also test them individually by running: % (cd test-data; make test-scenario6) % (cd test-data; make test-long-template) % (cd test-data; make test-paired-end) + % (cd test-data; make test-demultiplexed) + % (cd test-data; make test-demultiplexed-paired-end) ## Recommended JVM Settings @@ -632,7 +634,7 @@ command-line options: --col-reference reference file for column barcodes (i.e., conditions) --umi-reference --global-reference - --row-reads required if reads are split between two files + --row-reads required if reads are split between two files or for demultiplexed data --rev-row-reads required for processing paired-end sequencing data --col-reads required if reads are split between two files --reads required if reads are contained in a single file