Search in sources :

Example 1 with SampleNameSplitter

use of org.broadinstitute.hellbender.tools.readersplitters.SampleNameSplitter in project gatk by broadinstitute.

the class SplitReads method onTraversalStart.

@Override
public void onTraversalStart() {
    IOUtil.assertDirectoryIsWritable(OUTPUT_DIRECTORY);
    if (readArguments.getReadFiles().size() != 1) {
        throw new UserException("This tool only accepts a single SAM/BAM/CRAM as input");
    }
    if (SAMPLE) {
        splitters.add(new SampleNameSplitter());
    }
    if (READ_GROUP) {
        splitters.add(new ReadGroupIdSplitter());
    }
    if (LIBRARY_NAME) {
        splitters.add(new LibraryNameSplitter());
    }
    outs = createWriters(splitters);
}
Also used : LibraryNameSplitter(org.broadinstitute.hellbender.tools.readersplitters.LibraryNameSplitter) SampleNameSplitter(org.broadinstitute.hellbender.tools.readersplitters.SampleNameSplitter) UserException(org.broadinstitute.hellbender.exceptions.UserException) ReadGroupIdSplitter(org.broadinstitute.hellbender.tools.readersplitters.ReadGroupIdSplitter)

Aggregations

UserException (org.broadinstitute.hellbender.exceptions.UserException)1 LibraryNameSplitter (org.broadinstitute.hellbender.tools.readersplitters.LibraryNameSplitter)1 ReadGroupIdSplitter (org.broadinstitute.hellbender.tools.readersplitters.ReadGroupIdSplitter)1 SampleNameSplitter (org.broadinstitute.hellbender.tools.readersplitters.SampleNameSplitter)1