Skip to content
Snippets Groups Projects
Commit 37653696 authored by bow's avatar bow
Browse files

Fix optional symlink error in Cutadapt step in Flexiprep

parent 95a926d8
No related branches found
No related tags found
No related merge requests found
......@@ -53,11 +53,10 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
private lazy val inRelative: String = {
// calculate 'distance' from output directory to input
// which is the number of directory walks required to get to the inUnique directory from outDir
val outDir = FilenameUtils.getFullPathNoEndSeparator(outUnique)
val dist: Int = scala.math.max(0, outDir.split(File.separator).length - 1)
val dist: Int = scala.math.max(0, inUnique.split(File.separator).length - 1)
val result =
if (dist > 0)
((".." + File.separator) * dist) + File.separator + inUnique
((".." + File.separator) * dist) + inUnique
else
inUnique
result
......
......@@ -33,8 +33,8 @@ class Cutadapt(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Cutada
} else {
analysisName = getClass.getSimpleName + "-ln"
val lnOut = new Ln(this)
lnOut.in = new java.io.File(required(fastq_input))
lnOut.out = new java.io.File(required(fastq_output))
lnOut.in = fastq_input
lnOut.out = fastq_output
lnOut.relative = true
lnOut.cmd
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment