Kotlin Compiler Server Tests

Base Kotlin


fun main(args: Array<String>) {
    println("Compiled from the BioKotlin Playground Server")
}
    


Simple library import - Krangl and Kotlin Statistis


import krangl.*
import org.nield.kotlinstatistics.*

fun main(args: Array<String>) {
    // Make a data frame
    val users : DataFrame = dataFrameOf(
            "firstName", "lastName", "age", "hasSudo")(
            "max", "smith" , 53, false,
            "eva", "miller", 23, true,
            null , "meyer" , 23, null
    )
    println(users)

    // Run some stats
    val someNumbers = sequenceOf(1.0, 3.0, 5.0, 42.0, 3.14)
    println("""
    --- --- ---
    Kotlin Statististics
    Mean..... ${someNumbers.average()}
    Median... ${someNumbers.median()}
    Min...... ${someNumbers.min()}
    Max...... ${someNumbers.max()}
    """.trimIndent())
}
    


BioKotlin v0.01 task - Seq classes


import biokotlin.seq.*

fun main(args: Array<String>) {
    // A test sequence
    val seq = NucSeq("ACGGCGATACGGCGAT")

    // The central dogma
    println(seq.complement())
    println(seq.transcribe())
    println(seq.translate())
}
    


BioKotlin v0.02 task - pathways


import biokotlin.kegg.*

fun main(args: Array<String>) {
    val pathID = "path:zma00072"
    val pathTest = Kegg.pathway(pathID)
    println(pathTest.genes)
}