Annotations.scala 2.19 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1
2
3
4
5
6
7
8
9
10
/**
 * Biopet is built on top of GATK Queue for building bioinformatic
 * pipelines. It is mainly intended to support LUMC SHARK cluster which is running
 * SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
 * should also be able to execute Biopet tools and pipelines.
 *
 * Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
 *
 * Contact us at: sasc@lumc.nl
 *
11
 * A dual licensing mode is applied. The source code within this project is freely available for non-commercial use under an AGPL
Peter van 't Hof's avatar
Peter van 't Hof committed
12
13
14
 * license; For commercial users or users who do not want to follow the AGPL
 * license, please contact us to obtain a separate license.
 */
Peter van 't Hof's avatar
Peter van 't Hof committed
15
16
17
18
package nl.lumc.sasc.biopet.core.annotations

import nl.lumc.sasc.biopet.core.BiopetQScript
import nl.lumc.sasc.biopet.core.BiopetQScript.InputFile
Peter van 't Hof's avatar
Peter van 't Hof committed
19
import nl.lumc.sasc.biopet.utils.LazyCheck
Peter van 't Hof's avatar
Peter van 't Hof committed
20
21
22
import org.broadinstitute.gatk.queue.QScript

/**
23
24
 * Created by pjvan_thof on 1/12/16.
 */
Peter van 't Hof's avatar
Peter van 't Hof committed
25
26
27
trait AnnotationGtf extends BiopetQScript { qscript: QScript =>
  /** GTF reference file */
  lazy val annotationGtf: File = {
28
29
    val file: File = config("annotation_gtf", freeVar = true)
    inputFiles :+ InputFile(file, config("annotation_gtf_md5", freeVar = true))
Peter van 't Hof's avatar
Peter van 't Hof committed
30
31
32
    file
  }
}
33
34
35
36
37
38
39
40
trait AnnotationGff extends BiopetQScript { qscript: QScript =>
  /** GFF reference file in GFF3 format */
  lazy val annotationGff: File = {
    val file: File = config("annotation_gff", freeVar = true)
    inputFiles :+ InputFile(file, config("annotation_gff_md5", freeVar = true))
    file
  }
}
Peter van 't Hof's avatar
Peter van 't Hof committed
41
42
43

trait AnnotationRefFlat extends BiopetQScript { qscript: QScript =>
  /** GTF reference file */
Peter van 't Hof's avatar
Peter van 't Hof committed
44
  lazy val annotationRefFlat = new LazyCheck({
45
46
    val file: File = config("annotation_refflat", freeVar = true)
    inputFiles :+ InputFile(file, config("annotation_refflat_md5", freeVar = true))
Peter van 't Hof's avatar
Peter van 't Hof committed
47
    file
Peter van 't Hof's avatar
Peter van 't Hof committed
48
  })
Peter van 't Hof's avatar
Peter van 't Hof committed
49
50
51
52
}

trait RibosomalRefFlat extends BiopetQScript { qscript: QScript =>
  /** GTF reference file */
Peter van 't Hof's avatar
Peter van 't Hof committed
53
  lazy val ribosomalRefFlat = new LazyCheck({
54
55
56
    val file: Option[File] = config("ribosome_refflat", freeVar = true)
    file match {
      case Some(f) => inputFiles :+ InputFile(f, config("ribosome_refflat_md5", freeVar = true))
Peter van 't Hof's avatar
Peter van 't Hof committed
57
      case _       =>
58
    }
Peter van 't Hof's avatar
Peter van 't Hof committed
59
    file
Peter van 't Hof's avatar
Peter van 't Hof committed
60
  })
Peter van 't Hof's avatar
Peter van 't Hof committed
61
}