Skip to content

Commit

Permalink
Merge branch 'master' into scala2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jtnystrom committed Feb 13, 2023
2 parents 1a34d16 + f93da32 commit 270e9da
Show file tree
Hide file tree
Showing 26 changed files with 272 additions and 83 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.0.1

Bugfix for self-union or self-intersection of indexes (caused
a cartesian product).
Additional convenience methods for Index, e.g. unionLeft, unionRight, etc.

3.0.0

Support for indexes (k-mer databases) written as parquet files.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ For both notebook and REPL use, it is recommended to consult the API docs
You can add Discount as a dependency using the following syntax (SBT):

`
libraryDependencies += "com.jnpersson" %% "discount" % "3.0.0"
libraryDependencies += "com.jnpersson" %% "discount" % "3.0.1"
`

Please note that Discount is still under heavy development and the API may change slightly even between minor versions.
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "Discount"

version := "3.0.0"
version := "3.0.1"

scalaVersion := "2.13.10"

Expand Down
4 changes: 2 additions & 2 deletions discount-aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUCKET=s3://my-bucket/discount

DISCOUNT_HOME="$(dirname -- "$(readlink "${BASH_SOURCE}")")"

aws s3 cp "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.0.jar" $BUCKET/
aws s3 cp "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.1.jar" $BUCKET/

#aws s3 sync "$DISCOUNT_HOME/resources/PASHA" $BUCKET/PASHA/

Expand All @@ -23,7 +23,7 @@ aws s3 cp "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.0.jar" $BUCKET
#To set SPLIT or other variables, uncomment below.
COMMAND=( \
# --conf $SPLIT \
--class com.jnpersson.discount.spark.Discount $BUCKET/Discount-assembly-3.0.0.jar $*)
--class com.jnpersson.discount.spark.Discount $BUCKET/Discount-assembly-3.0.1.jar $*)

#Turn off paging for output
export AWS_PAGER=""
Expand Down
2 changes: 1 addition & 1 deletion discount-gcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ PROPERTIES=$MAXRES
DISCOUNT_HOME="$(dirname -- "$(readlink "${BASH_SOURCE}")")"

exec gcloud --verbosity=info dataproc jobs submit spark --region $REGION --cluster $CLUSTER \
--class com.jnpersson.discount.spark.Discount --jars "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.0.jar" \
--class com.jnpersson.discount.spark.Discount --jars "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.1.jar" \
--properties $PROPERTIES -- "$@"

2 changes: 1 addition & 1 deletion discount-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ exec $SPARK/bin/spark-shell \
--master $MASTER \
--conf $MEMORY \
--conf $LOCAL_DIR \
--jars "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.0.jar"
--jars "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.1.jar"
2 changes: 1 addition & 1 deletion discount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ exec $SPARK/bin/spark-submit \
--conf $MEMORY \
--conf $LOCAL_DIR \
--master $MASTER \
--class com.jnpersson.discount.spark.Discount "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.0.jar" $*
--class com.jnpersson.discount.spark.Discount "$DISCOUNT_HOME/target/scala-2.13/Discount-assembly-3.0.1.jar" $*
8 changes: 4 additions & 4 deletions docs/com/jnpersson/discount/bucket/BucketStats$.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="CountReducer.html" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down
8 changes: 4 additions & 4 deletions docs/com/jnpersson/discount/bucket/BucketStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="CountReducer.html" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down
8 changes: 4 additions & 4 deletions docs/com/jnpersson/discount/bucket/CountReducer.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down
12 changes: 7 additions & 5 deletions docs/com/jnpersson/discount/bucket/CountersSubtractReducer.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="CountReducer.html" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down Expand Up @@ -210,7 +210,9 @@ <h4 id="signature" class="signature">
</h4>


<div id="comment" class="fullcommenttop"><div class="comment cmt"><p>Implements the <a href="../spark/package$$Rule$$CountersSubtract$.html" class="extype" name="com.jnpersson.discount.spark.Rule.CountersSubtract">com.jnpersson.discount.spark.Rule.CountersSubtract</a> reduction rule</p></div><div class="toggleContainer block">
<div id="comment" class="fullcommenttop"><div class="comment cmt"><p>Implements the <a href="../spark/package$$Rule$$CountersSubtract$.html" class="extype" name="com.jnpersson.discount.spark.Rule.CountersSubtract">com.jnpersson.discount.spark.Rule.CountersSubtract</a> reduction rule.
For each k-mer we calculate count_1 - count_2 and set the result to this value.
Only positive counts are preserved in the output.</p></div><div class="toggleContainer block">
<span class="toggle">
Linear Supertypes
</span>
Expand Down
8 changes: 4 additions & 4 deletions docs/com/jnpersson/discount/bucket/KmerBucket.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="CountReducer.html" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="KmerSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down
11 changes: 6 additions & 5 deletions docs/com/jnpersson/discount/bucket/KmerSubtractReducer.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ <h1>Packages</h1>
<a href="CountReducer.html" title="A reducer that handles k-mer count values stored in the longsForK(k) + 1 tag position.">CountReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule"></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule">CountersSubtractReducer</a>
<a class="class" href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule."></a>
<a href="CountersSubtractReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.CountersSubtract reduction rule.">CountersSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g."></a>
<a href="KmerBucket.html" title="A bucket that maintains some number of super-mers and associated tags (e.g.">KmerBucket</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule"></a>
<a href="" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule">KmerSubtractReducer</a>
<a class="class" href="" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule."></a>
<a href="" title="Implements the com.jnpersson.discount.spark.Rule.KmersSubtract reduction rule.">KmerSubtractReducer</a>
</li><li class="current-entities indented4">
<span class="separator"></span>
<a class="class" href="LeftReducer.html" title="Implements the com.jnpersson.discount.spark.Rule.Left reduction rule"></a>
Expand Down Expand Up @@ -210,7 +210,8 @@ <h4 id="signature" class="signature">
</h4>


<div id="comment" class="fullcommenttop"><div class="comment cmt"><p>Implements the <a href="../spark/package$$Rule$$KmersSubtract$.html" class="extype" name="com.jnpersson.discount.spark.Rule.KmersSubtract">com.jnpersson.discount.spark.Rule.KmersSubtract</a> reduction rule</p></div><div class="toggleContainer block">
<div id="comment" class="fullcommenttop"><div class="comment cmt"><p>Implements the <a href="../spark/package$$Rule$$KmersSubtract$.html" class="extype" name="com.jnpersson.discount.spark.Rule.KmersSubtract">com.jnpersson.discount.spark.Rule.KmersSubtract</a> reduction rule.
k-mers are kept if they existed in bucket A, but not in bucket B.</p></div><div class="toggleContainer block">
<span class="toggle">
Linear Supertypes
</span>
Expand Down
Loading

0 comments on commit 270e9da

Please sign in to comment.