Class DesignBuilder


  • public class DesignBuilder
    extends Object
    This class allow to easily build Design object from files paths.
    Since:
    1.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • DesignBuilder

        public DesignBuilder()
        Public constructor.
      • DesignBuilder

        public DesignBuilder​(String[] filenames)
                      throws EoulsanException
        Public constructor.
        Parameters:
        filenames - filenames to add
        Throws:
        EoulsanException - if a file to add to the design does not exist or is not handled
    • Method Detail

      • addFile

        public void addFile​(String filename)
                     throws EoulsanException
        Add a filename to the design builder
        Parameters:
        filename - filename of the file to add
        Throws:
        EoulsanException - if the file does not exists
      • addFiles

        public void addFiles​(String[] filenames)
                      throws EoulsanException
        Add filenames to the design builder
        Parameters:
        filenames - array with the filenames to add
        Throws:
        EoulsanException - if the file does not exists
      • addFiles

        public void addFiles​(List<String> filenames)
                      throws EoulsanException
        Add filenames to the design builder
        Parameters:
        filenames - array with the filenames to add
        Throws:
        EoulsanException - if the file does not exists
      • addBcl2FastqSamplesheetProject

        public void addBcl2FastqSamplesheetProject​(fr.ens.biologie.genomique.kenetre.illumina.samplesheet.SampleSheet samplesheet,
                                                   String projectName,
                                                   File bcl2fastqOutputDir)
                                            throws EoulsanException
        Add all the sample from a Bclfastq samplesheet.
        Parameters:
        samplesheet - The Bcl2fastq samplesheet object
        projectName - name of the project
        bcl2fastqOutputDir - the output directory of Bcl2fastq demultiplexing
        Throws:
        EoulsanException - if an error occurs while adding the Bcl2fastq samplesheet
      • addBcl2FastqSamplesheetProject

        public void addBcl2FastqSamplesheetProject​(File samplesheetFile,
                                                   String projectName)
                                            throws EoulsanException
        Add all the samples from a Bcl2Fastq samplesheet.
        Parameters:
        samplesheetFile - the path to the Casava design
        projectName - the name of the project
        Throws:
        EoulsanException - if an error occurs while reading the Casava design
      • getDesign

        public Design getDesign​(boolean pairedEndMode)
                         throws EoulsanException
        Create design object.
        Parameters:
        pairedEndMode - true if the paired end mode is enabled
        Returns:
        a new Design object
        Throws:
        EoulsanException - if an error occurs while analyzing input files
      • defineSampleSubDirName

        public static String defineSampleSubDirName​(String sampleId,
                                                    String sampleName)
        Get the sample sub directory.
        Parameters:
        sampleId - sample identifier
        sampleName - sample name
        Returns:
        the sample sub directory or an empty string