Class DataFileGenomeIndexStorage

  • All Implemented Interfaces:
    fr.ens.biologie.genomique.kenetre.storage.GenomeIndexStorage

    public class DataFileGenomeIndexStorage
    extends fr.ens.biologie.genomique.kenetre.storage.AbstractFileGenomeIndexStorage
    This class define a storage for genome indexes using DataFile API.
    Since:
    2.6
    Author:
    Laurent Jourdren
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DataFileGenomeIndexStorage​(fr.ens.biologie.genomique.kenetre.storage.DataPath dir, fr.ens.biologie.genomique.kenetre.log.GenericLogger logger)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DataFile getDataFile​(fr.ens.biologie.genomique.kenetre.bio.readmapper.MapperInstance mapperInstance, fr.ens.biologie.genomique.kenetre.bio.GenomeDescription genome, Map<String,​String> additionalDescription)
      Get the DataFile that corresponds to a mapper and a genome
      static fr.ens.biologie.genomique.kenetre.storage.GenomeIndexStorage getInstance​(String source, fr.ens.biologie.genomique.kenetre.log.GenericLogger logger)
      Create a GenomeIndexStorage
      protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(fr.ens.biologie.genomique.kenetre.storage.DataPath parent, String filename)  
      protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(String source)  
      void put​(fr.ens.biologie.genomique.kenetre.bio.readmapper.MapperInstance mapperInstance, fr.ens.biologie.genomique.kenetre.bio.GenomeDescription genome, Map<String,​String> additionalDescription, DataFile indexArchive)
      Put the index archive in the storage.
      • Methods inherited from class fr.ens.biologie.genomique.kenetre.storage.AbstractFileGenomeIndexStorage

        get, getDataPath, put, put
    • Constructor Detail

      • DataFileGenomeIndexStorage

        protected DataFileGenomeIndexStorage​(fr.ens.biologie.genomique.kenetre.storage.DataPath dir,
                                             fr.ens.biologie.genomique.kenetre.log.GenericLogger logger)
                                      throws IOException
        Constructor.
        Parameters:
        dir - directory of the storage.
        logger - logger to use
        Throws:
        IOException - if an error occurs while initializing the object
    • Method Detail

      • newDataPath

        protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(String source)
        Specified by:
        newDataPath in class fr.ens.biologie.genomique.kenetre.storage.AbstractFileGenomeIndexStorage
      • newDataPath

        protected fr.ens.biologie.genomique.kenetre.storage.DataPath newDataPath​(fr.ens.biologie.genomique.kenetre.storage.DataPath parent,
                                                                                 String filename)
        Specified by:
        newDataPath in class fr.ens.biologie.genomique.kenetre.storage.AbstractFileGenomeIndexStorage
      • getDataFile

        public DataFile getDataFile​(fr.ens.biologie.genomique.kenetre.bio.readmapper.MapperInstance mapperInstance,
                                    fr.ens.biologie.genomique.kenetre.bio.GenomeDescription genome,
                                    Map<String,​String> additionalDescription)
        Get the DataFile that corresponds to a mapper and a genome
        Parameters:
        mapperInstance - mapper
        genome - genome description object for the genome
        additionalDescription - description of the additional parameters
        Returns:
        a file that contains the path to the index or null if the index has not yet been computed
      • put

        public void put​(fr.ens.biologie.genomique.kenetre.bio.readmapper.MapperInstance mapperInstance,
                        fr.ens.biologie.genomique.kenetre.bio.GenomeDescription genome,
                        Map<String,​String> additionalDescription,
                        DataFile indexArchive)
        Put the index archive in the storage.
        Parameters:
        mapperInstance - mapper
        genome - genome description object
        additionalDescription - description of the additional parameters
        indexArchive - the file that contains the index
      • getInstance

        public static fr.ens.biologie.genomique.kenetre.storage.GenomeIndexStorage getInstance​(String source,
                                                                                               fr.ens.biologie.genomique.kenetre.log.GenericLogger logger)
        Create a GenomeIndexStorage
        Parameters:
        source - the path of the index storage
        logger - the logger
        Returns:
        a GenomeIndexStorage object if the path contains an index storage or null if no index storage is found