A better name for the qscript utilities. Throw here every method you find yourself repeatedly implementing in your qscripts!
Refactoring appropriately.
This commit is contained in:
parent
a670d6420a
commit
7b7d40d5d9
|
|
@ -10,7 +10,7 @@ import org.broadinstitute.sting.queue.extensions.picard._
|
||||||
import net.sf.samtools.SAMFileReader
|
import net.sf.samtools.SAMFileReader
|
||||||
import net.sf.samtools.SAMFileHeader.SortOrder
|
import net.sf.samtools.SAMFileHeader.SortOrder
|
||||||
|
|
||||||
import org.broadinstitute.sting.queue.util.Utils
|
import org.broadinstitute.sting.queue.util.QScriptUtils
|
||||||
|
|
||||||
class DataProcessingPipeline extends QScript {
|
class DataProcessingPipeline extends QScript {
|
||||||
qscript =>
|
qscript =>
|
||||||
|
|
@ -123,7 +123,7 @@ class DataProcessingPipeline extends QScript {
|
||||||
|
|
||||||
// only allow one sample per file. Bam files with multiple samples would require pre-processing of the file
|
// only allow one sample per file. Bam files with multiple samples would require pre-processing of the file
|
||||||
// with PrintReads to separate the samples. Tell user to do it himself!
|
// with PrintReads to separate the samples. Tell user to do it himself!
|
||||||
assert(!Utils.hasMultipleSamples(readGroups), "The pipeline requires that only one sample is present in a BAM file. Please separate the samples in " + bam)
|
assert(!QScriptUtils.hasMultipleSamples(readGroups), "The pipeline requires that only one sample is present in a BAM file. Please separate the samples in " + bam)
|
||||||
|
|
||||||
// Fill out the sample table with the readgroups in this file
|
// Fill out the sample table with the readgroups in this file
|
||||||
for (rg <- readGroups) {
|
for (rg <- readGroups) {
|
||||||
|
|
@ -200,8 +200,8 @@ class DataProcessingPipeline extends QScript {
|
||||||
def script = {
|
def script = {
|
||||||
|
|
||||||
// keep a record of the number of contigs in the first bam file in the list
|
// keep a record of the number of contigs in the first bam file in the list
|
||||||
val bams = Utils.createListFromFile(input)
|
val bams = QScriptUtils.createListFromFile(input)
|
||||||
nContigs = Utils.getNumberOfContigs(bams(0))
|
nContigs = QScriptUtils.getNumberOfContigs(bams(0))
|
||||||
|
|
||||||
val realignedBams = if (useBWApe || useBWAse) {performAlignment(bams)} else {bams}
|
val realignedBams = if (useBWApe || useBWAse) {performAlignment(bams)} else {bams}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package org.broadinstitute.sting.queue.qscripts
|
||||||
|
|
||||||
import org.broadinstitute.sting.queue.QScript
|
import org.broadinstitute.sting.queue.QScript
|
||||||
import org.broadinstitute.sting.queue.extensions.gatk._
|
import org.broadinstitute.sting.queue.extensions.gatk._
|
||||||
import org.broadinstitute.sting.queue.util.Utils
|
import org.broadinstitute.sting.queue.util.QScriptUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by IntelliJ IDEA.
|
* Created by IntelliJ IDEA.
|
||||||
|
|
@ -34,8 +34,8 @@ class RecalibrateBaseQualities extends QScript {
|
||||||
|
|
||||||
def script = {
|
def script = {
|
||||||
|
|
||||||
val bamList = Utils.createListFromFile(input)
|
val bamList = QScriptUtils.createListFromFile(input)
|
||||||
nContigs = Utils.getNumberOfContigs(bamList(0))
|
nContigs = QScriptUtils.getNumberOfContigs(bamList(0))
|
||||||
|
|
||||||
for (bam <- bamList) {
|
for (bam <- bamList) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import collection.JavaConversions._
|
||||||
* To change this template use File | Settings | File Templates.
|
* To change this template use File | Settings | File Templates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
object Utils {
|
object QScriptUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes a bam list file and produces a scala list with each file allowing the bam list
|
* Takes a bam list file and produces a scala list with each file allowing the bam list
|
||||||
Loading…
Reference in New Issue