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:
Mauricio Carneiro 2011-07-15 14:34:50 -04:00
parent a670d6420a
commit 7b7d40d5d9
3 changed files with 8 additions and 8 deletions

View File

@ -10,7 +10,7 @@ import org.broadinstitute.sting.queue.extensions.picard._
import net.sf.samtools.SAMFileReader
import net.sf.samtools.SAMFileHeader.SortOrder
import org.broadinstitute.sting.queue.util.Utils
import org.broadinstitute.sting.queue.util.QScriptUtils
class DataProcessingPipeline extends 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
// 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
for (rg <- readGroups) {
@ -200,8 +200,8 @@ class DataProcessingPipeline extends QScript {
def script = {
// keep a record of the number of contigs in the first bam file in the list
val bams = Utils.createListFromFile(input)
nContigs = Utils.getNumberOfContigs(bams(0))
val bams = QScriptUtils.createListFromFile(input)
nContigs = QScriptUtils.getNumberOfContigs(bams(0))
val realignedBams = if (useBWApe || useBWAse) {performAlignment(bams)} else {bams}

View File

@ -2,7 +2,7 @@ package org.broadinstitute.sting.queue.qscripts
import org.broadinstitute.sting.queue.QScript
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.
@ -34,8 +34,8 @@ class RecalibrateBaseQualities extends QScript {
def script = {
val bamList = Utils.createListFromFile(input)
nContigs = Utils.getNumberOfContigs(bamList(0))
val bamList = QScriptUtils.createListFromFile(input)
nContigs = QScriptUtils.getNumberOfContigs(bamList(0))
for (bam <- bamList) {

View File

@ -15,7 +15,7 @@ import collection.JavaConversions._
* 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