Skip to content

Release version 1 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run-publish-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
token: ${{secrets.BIOKOTLINMAVEN}}
fetch-depth: 0

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17'
java-version: '21'
cache: 'gradle'

- name: Make gradlew executable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-version: 21
- name: Setup Gradle
uses: gradle/[email protected]
with:
Expand Down
56 changes: 22 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,42 @@
# README #

BioKotlin is in the early stages of development, but we expect to support nucleotide and
[BioKotlin](https://www.biokotlin.org) supports nucleotide and
protein sequence manipulation, fast sequence IO, alignment, motif, pathway support.

BioKotlin leverages the performance and type safety of the JVM languages with ease of Python like scripting.
Because the Kotlin language is compiled on the fly it can be thousands of times faster for
certain applications than scripting languages. Because it uses the JVM, we expect high interoperability with
Because the Kotlin language is compiled, it can be many times faster for
certain applications than scripting languages. Because it uses the JVM, we expect high interoperability with
[GATK](https://gatk.broadinstitute.org/hc/en-us), SamTools [HTSJDK](https://samtools.github.io/htsjdk/),
BioJava, [TASSEL](https://www.maizegenetics.net/tassel) for GWAS and Genome Wide Prediction, and the PHG - the
pangenome representation. Additionally, since we have mimicked the beautiful API of [BioPython](https://biopython.org),
pangenome representation. Additionally, since we have mimicked the beautiful API of [BioPython](https://biopython.org),
we expect fast and efficient interoperability with BioPython through GraalVM.

We expect to have extensive cross language support with the use of GraalVM's support of JVM, Python, and R (FastR).
You can follow our current progress at our [GitHub Page](https://github.com/maize-genetics/BioKotlin)

You can follow our current progress at our [Trello Board](https://bitbucket.org/bucklerlab/biokotlin/addon/trello/trello-board)

### What is this repository for? ###
### BioKotlin Links ###

* This is the main repository for BioKotlin development
* We follow a Git-Flow branching structure
* Since we are in early development, most of the code is in the
[develop](https://bitbucket.org/bucklerlab/biokotlin/branch/develop) and associated branches
* Main website for [BioKotlin](https://www.biokotlin.org)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be linked to in the "About" section along with a short description and some tags.

* [Documentation (API)](https://javadoc.io/doc/org.biokotlin/biokotlin/latest/index.html)

### How do I get set up? ###
### How to Use ###

* Configuration for a User
* JupyterLab with Kotlin
* JupyterLab with Kotlin
* Install the Kotlin kernel for JupyterLab
* Add the following to your JupyterLab configuration file:
* %use biokotlin

* Configuration for a Power User (or Developer)
* IntelliJ with Kotlin support
* JupyterLab with Kotlin

* Dependencies
*
* Kotlin Script
* Add the following to your Kotlin script (.main.kts) file:
* @file:DependsOn("org.biokotlin:biokotlin:1.0.0")

* How to run tests
* Deployment instructions
* Maven Central Dependency (i.e. pom.xml, build.gradle.kts)
* https://mvnrepository.com/artifact/org.biokotlin/biokotlin

### Contribution guidelines ###

* Writing tests
* Code review
* Other guidelines
* Installable Tar File from Biokotlin Tools
* Download the latest tar file from (https://github.com/maize-genetics/biokotlin-tools/releases)

### Who do I talk to? ###

* Edward Buckler - [email protected]
* Terry Casstevens - [email protected]

### ToDo ###
1. Making the
8. Interop between languages using GraalVM
* [Discussion Page](https://github.com/maize-genetics/BioKotlin/discussions)
* [Issues Page](https://github.com/maize-genetics/BioKotlin/issues)

49 changes: 23 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jreleaser.model.Active
import java.io.ByteArrayOutputStream
import java.nio.file.Files
import java.nio.file.Paths
import kotlin.io.path.isRegularFile
Expand All @@ -10,20 +10,24 @@ import kotlin.jvm.optionals.getOrNull
// The version is expected to be in the format X.Y.Z
// JReleaser will use this version to create the release
fun getVersionName(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "describe", "--tags", "--abbrev=0")
standardOutput = stdout
}
val versionStr = stdout.toString().trim().removePrefix("v").removePrefix("V")

val process = ProcessBuilder("git", "describe", "--tags", "--abbrev=0")
.redirectErrorStream(true)
.start()
val versionStr = process.inputStream.bufferedReader().readText().trim()
.removePrefix("v")
.removePrefix("V")

val parts = versionStr.split('.')
val normalizedStr = when (parts.size) {
0 -> throw IllegalArgumentException("Version string is empty")
1 -> "${parts[0]}.0.0"
2 -> "${parts[0]}.${parts[1]}.0"
else -> versionStr
}

return normalizedStr

}

group = "org.biokotlin"
Expand All @@ -33,11 +37,15 @@ version = getVersionName()
This build script is need to use the early access
*/
buildscript {
val kotlinVersion by extra("1.9.24")
val kotlinVersion by extra("2.1.21")
}

kotlin {
jvmToolchain(21)
}

plugins {
val kotlinVersion = "1.9.24"
val kotlinVersion = "2.1.21"
java
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
Expand All @@ -49,7 +57,7 @@ plugins {
//id("org.jetbrains.kotlinx.dataframe") version "1.0-SNAPSHOT"

application
id("org.jetbrains.dokka") version "1.9.20"
id("org.jetbrains.dokka") version "2.0.0"
`java-library`
`maven-publish`
signing
Expand All @@ -74,8 +82,8 @@ dependencies {

implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")

implementation("org.nield:kotlin-statistics:1.2.1")
implementation("org.jetbrains.kotlinx:dataframe:0.8.0-rc-7")
Expand All @@ -91,18 +99,10 @@ dependencies {
// https://kotlinlang.org/docs/reference/evolution/compatibility-modes.html
// implementation("net.maizegenetics:tassel:5.2.60")

// Wide range of sequence tools in Java - API is dated
// implementation("org.biojava:biojava:5.3.0")
// implementation("org.biojava:biojava-genome:5.3.0")

implementation("org.graalvm.sdk:graal-sdk:21.2.0")
implementation("org.apache.commons:commons-csv:1.8")

implementation("com.google.guava:guava:33.1.0-jre")
implementation("org.apache.tinkerpop:gremlin-core:3.5.1")


implementation(group = "ch.qos.logback", name = "logback-classic", version = "1.2.6")
implementation("it.unimi.dsi:fastutil:8.5.12")
implementation("org.lz4:lz4-java:1.8.0")

Expand All @@ -120,12 +120,11 @@ dependencies {
// kotlin.sourceSets.getByName("main").kotlin.srcDir("build/generated/ksp/main/kotlin/")

java {
// withJavadocJar()
withSourcesJar()
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "17"
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
}

tasks {
Expand Down Expand Up @@ -197,9 +196,7 @@ fun tutorialInjector() {
.filter { it.toString().endsWith("package-list") }
.findFirst()

val packageList = optionalPackageList.getOrNull()?.let {
it.toFile().readText()
} ?: ""
val packageList = optionalPackageList.getOrNull()?.toFile()?.readText() ?: ""

//Replaces shorthand links with accurate ones and inserts links into code
val linkFinder = Regex("<a href=\"\\..*?>")
Expand Down Expand Up @@ -359,7 +356,7 @@ fun recursivelyInjectImages(file: File, depth: Int) {
}
}

val dokkaJar by tasks.creating(Jar::class) {
val dokkaJar by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
mustRunAfter(dokkaHtml)
group = JavaBasePlugin.DOCUMENTATION_GROUP
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 7 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -112,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -203,15 +205,15 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
6 changes: 4 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -68,11 +70,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be blank?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file and the other gradle files were autogenerated by this command. We didn't code that.
./gradlew wrapper --gradle-version 8.14.1 --distribution-type bin



@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down