Class SAMSplitter

  • All Implemented Interfaces:
    Splitter

    public class SAMSplitter
    extends Object
    implements Splitter
    This class define a splitter class for SAM files.
    Since:
    2.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • SAMSplitter

        public SAMSplitter()
    • Method Detail

      • getFormat

        public DataFormat getFormat()
        Description copied from interface: Splitter
        Get the format related to the splitter.
        Specified by:
        getFormat in interface Splitter
        Returns:
        a DataFormat object
      • split

        public void split​(DataFile inFile,
                          Iterator<DataFile> outFileIterator)
                   throws IOException
        Description copied from interface: Splitter
        Split data.
        Specified by:
        split in interface Splitter
        Parameters:
        inFile - input DataFile
        outFileIterator - iterator over DataFile to create
        Throws:
        IOException - if an error occurs while split data
      • splitByChromosomes

        public void splitByChromosomes​(DataFile inFile,
                                       Iterator<DataFile> outFileIterator)
                                throws IOException
        Split SAM file by chromosomes.
        Parameters:
        inFile - input file
        outFileIterator - output files iterator
        Throws:
        IOException - if an error occurs while reading or creating output files