File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
8
8
}
9
9
10
10
group = " com.genomealmanac.rnaseq"
11
- version = " 1.0.5 "
11
+ version = " 1.0.6 "
12
12
val artifactID = " rsem"
13
13
14
14
repositories {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class Cli : CliktCommand() {
27
27
private val cores: Int by option(" --cores" , help = " number of cores available to the task" ).int().default(1 )
28
28
private val ram: Int by option(" --ram-gb" , help = " amount of RAM available to the task, in GB" ).int().default(16 )
29
29
private val indexTarPrefix: String? by option(" --index-tar-prefix" , help = " the root directory of files in the index tar archive" )
30
+ private val indexNamePrefix: String? by option(" --index-name-prefix" , help = " prefix of the name of the files in the index tar archive" )
30
31
31
32
override fun run () {
32
33
DefaultCmdRunner ().runRSEMQuant(
@@ -40,7 +41,8 @@ class Cli : CliktCommand() {
40
41
outputDirectory = outputDirectory,
41
42
cores = cores,
42
43
ram = ram,
43
- indexTarPrefix = indexTarPrefix
44
+ indexTarPrefix = indexTarPrefix,
45
+ indexNamePrefix = indexNamePrefix
44
46
)
45
47
)
46
48
}
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ data class RSEMParameters (
17
17
val ram : Int = 16 ,
18
18
val outputPrefix : String = " output" ,
19
19
val pairedEnd : Boolean ,
20
- val indexTarPrefix : String? = null
20
+ val indexTarPrefix : String? = null ,
21
+ val indexNamePrefix : String? = null
21
22
)
22
23
23
24
val FORWARD_PROB : Map <String , Float > = mapOf (
@@ -31,6 +32,7 @@ fun CmdRunner.runRSEMQuant(parameters: RSEMParameters) {
31
32
// create output directory, unpack index
32
33
this .run (" tar xvf ${parameters.index} -C ${parameters.outputDirectory} " )
33
34
if (parameters.indexTarPrefix != = null ) this .run (" mv ${parameters.outputDirectory} /${parameters.indexTarPrefix} /* ${parameters.outputDirectory} " )
35
+ val indexNamePrefix = if (parameters.indexNamePrefix != = null ) parameters.indexNamePrefix else parameters.index.getFileName().toString().split(" .tar.gz" )[0 ]
34
36
35
37
// run RSEM
36
38
this .run ("""
@@ -45,7 +47,7 @@ fun CmdRunner.runRSEMQuant(parameters: RSEMParameters) {
45
47
--forward-prob ${FORWARD_PROB [parameters.strand]} \
46
48
${ if (parameters.pairedEnd) " --paired-end" else " " } \
47
49
${parameters.bam} \
48
- ${parameters.outputDirectory.resolve(parameters.index.getFileName().toString().split( " .tar.gz " )[ 0 ] )} \
50
+ ${parameters.outputDirectory.resolve(indexNamePrefix )} \
49
51
${parameters.outputDirectory.resolve(" ${parameters.outputPrefix} " )}
50
52
""" )
51
53
You can’t perform that action at this time.
0 commit comments