You should follow typical Scala folder structure. Ideally your IDE will handles this for you.
An example structure looks like:
```
.
├── pom.xml
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── path
│ │ │ └── to
│ │ │ └── your
│ │ │ └── myProject
│ │ │ └── a_resource.txt
│ │ └── scala
│ │ └── path
│ │ └── to
│ │ └── your
│ │ └── myProject
│ │ └── MyProject.scala
│ └── test
│ ├── resources
│ └── scala
│ └── path
│ └── to
│ └── your
│ └── MyProject
│ └── MyProjectTest.scala
```
## POM
(skip this section if using SBT)
When using Biopet, your Maven pom.xml file should at minimum contain the following dependency:
```xml
<dependencies>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>BiopetCore</artifactId>
<version>0.7.0</version>
</dependency>
</dependencies>
```
In case you want to use a specific pipeline you want to add this to your dependencies. E.g.
```xml
<dependencies>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>BiopetCore</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>Shiva</artifactId>
<version>0.7.0</version>
</dependency>
</dependencies>
```
For a complete example pom.xml see [here](../examples/pom.xml).
## SBT build
You can use SBT to build a fat JAR that contains all the required class files in a single JAR file. This can be done
using the [sbt-assembly plugin](https://github.com/sbt/sbt-assembly). Keep in mind that you have to explicitly define a specific merge strategy for conflicting
file names. In our experience, the merge strategy below works quite well:
```
assemblyMergeStrategy in assembly := {
case "git.properties" => MergeStrategy.first
// Discard the GATK's queueJobReport.R and use the one from Biopet
case PathList("org", "broadinstitute", "gatk", "queue", "util", x) if x.endsWith("queueJobReport.R")
=> MergeStrategy.first
case "GATKText.properties" => MergeStrategy.first
case "dependency_list.txt" => MergeStrategy.discard
case other => MergeStrategy.defaultMergeStrategy(other)
}
```
## New pipeline
To create a new pipeline in your project you need a class that extends from `Qscript` and `SummaryQScript`.