Commit a61995a1 authored by Holger Brandl's avatar Holger Brandl

allow for symbolic link fastq references. more stringent pe check

parent 4ea1f4dd
......@@ -12,6 +12,7 @@ import de.mpicbg.scicomp.kutils.joblist.createHtmlReport
import joblist.JobList
import org.docopt.Docopt
import java.io.File
import java.nio.file.Files
//val args = listOf("/projects/bioinfo/igenomes/Drosophila_melanogaster/Ensembl/BDGP6", "test.fastq.gz")
//val args = listOf("--disable-pe-pairing", "/projects/bioinfo/igenomes/Drosophila_melanogaster/Ensembl/BDGP6", "test.fastq.gz")
......@@ -72,12 +73,12 @@ if (!File("${star_index}/SA").isFile())
//println("files are ${fastqFiles.joinToString(", ")}")
// make sure all fastq files do exist (for symlinks see http://www.java2s.com/Code/Java/JDK-7/Isfileasymboliclink.htm
//fastqFiles.filter { !(it.exists() || Files.isSymbolicLink(it.toPath())) }.let {
fastqFiles.filter { !it.isFile }.let {
//fastqFiles.filter { !it.isFile }.let {
fastqFiles.filter { !(it.exists() || Files.isSymbolicLink(it.toPath())) }.let {
require(it.isEmpty()) { "Some fastq files do not exist ${it.map { it.absoluteFile }.joinToString(", ")}" }
}
require(fastqFiles.filter { it.name.contains("_2.fastq") }.isEmpty()) {
require(fastqFiles.filter { it.name.contains("_R2.fastq") }.isEmpty()) {
"""Mapping 2nd mate alone is unlikely to have meaningful semantics.
Just provide _1 and star_align.kts will pick up corresponding _2 for PE alignment if present"""
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment