Created
August 10, 2017 21:41
-
-
Save holgerbrandl/a712112c392400ad503a46bcefe706a6 to your computer and use it in GitHub Desktop.
kotlin docopt wrapper example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env kscript | |
//DEPS com.offbytwo:docopt:0.6.0.20150202,log4j:log4j:1.2.14,com.github.holgerbrandl:kscript:1.2.2-SNAPSHOT | |
//import org.docopt.Docopt | |
import java.util.* | |
import kscript.util.DocOpt | |
//val args = arrayOf("hg19", "/some/where/N.bam", "/some/where/aRG.bam", "/some/where/bRG.bam") | |
val usage = """ | |
Use this cool tool to do cool stuff | |
Usage: cooltool.kts [options] <igenome> <fastq_files>... | |
Options: | |
--gtf <gtfFile> Custom gtf file instead of igenome bundled copy | |
--pc-only Use protein coding genes only for mapping and quantification | |
""" | |
val doArgs = DocOpt(args, usage) | |
println("Hello from Kotlin!") | |
println("Parsed script arguments are: \n" + doArgs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment