From 7474afa7a349e1efb6fb8c0bde5a534b4a5079d5 Mon Sep 17 00:00:00 2001 From: aaron Date: Mon, 23 Aug 2010 18:52:00 +0000 Subject: [PATCH] allow other objects access to the static method that resolves bam lists, and some renaming and improved documentation for the function. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4087 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/CommandLineExecutable.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java b/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java index f93af2ad6..0042817fc 100644 --- a/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java +++ b/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java @@ -32,10 +32,6 @@ import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.text.XReadLines; import org.broadinstitute.sting.gatk.walkers.Walker; -import org.broadinstitute.sting.gatk.io.stubs.OutputStreamArgumentTypeDescriptor; -import org.broadinstitute.sting.gatk.io.stubs.SAMFileWriterArgumentTypeDescriptor; -import org.broadinstitute.sting.gatk.io.stubs.SAMFileReaderArgumentTypeDescriptor; -import org.broadinstitute.sting.gatk.io.stubs.VCFWriterArgumentTypeDescriptor; import java.io.File; import java.io.FileNotFoundException; @@ -145,18 +141,18 @@ public abstract class CommandLineExecutable extends CommandLineProgram { * @param argCollection Collection of arguments to preprocess. */ private void processArguments( GATKArgumentCollection argCollection ) { - argCollection.samFiles = unpackList( argCollection.samFiles ); + argCollection.samFiles = unpackBAMFileList( argCollection.samFiles ); } /** - * Unpack the files to be processed, given a list of files. That list of files can - * itself contain lists of other files to be read. + * Unpack the bam files to be processed, given a list of files. That list of files can + * itself contain entries which are lists of other files to be read (note: you cannot have lists of lists of lists) * - * @param inputFiles + * @param inputFiles a list of files that represent either bam files themselves, or a file containing a list of bam files to process * - * @return + * @return a flattened list of the bam files provided */ - private static List unpackList( List inputFiles ) { + public static List unpackBAMFileList( List inputFiles ) { List unpackedReads = new ArrayList(); for( File inputFile: inputFiles ) { if (inputFile.getName().toLowerCase().endsWith(".list") ) {