Class AbstractSingleCellDetector

    • Field Detail

      • log

        protected final org.apache.commons.logging.Log log
    • Constructor Detail

      • AbstractSingleCellDetector

        public AbstractSingleCellDetector()
    • Method Detail

      • setFTPClientFactory

        public void setFTPClientFactory​(FTPClientFactory ftpClientFactory)
        Set the FTP client factory to use for downloading data over FTP.
      • getDownloadDirectory

        public Path getDownloadDirectory()
      • setDownloadDirectory

        public void setDownloadDirectory​(Path downloadDirectory)
        Set the download directory to use for storing single-cell data.

        It may be left unset if downloading is not intended or needed.

        Specified by:
        setDownloadDirectory in interface SingleCellDetector
      • existsAndHasExpectedSize

        protected boolean existsAndHasExpectedSize​(Path dest,
                                                   String remoteFile,
                                                   long expectedContentLength,
                                                   boolean decompressIfNeeded,
                                                   boolean storeCompressed)
                                            throws IOException
        Check if a file at a given destination exists and has the size of a remote file.
        Parameters:
        dest - file at destination
        remoteFile - filename at origin
        expectedContentLength - expected size, or -1 if unknown
        decompressIfNeeded - if true and the remote file is gzipped, will only check if the local file exists
        storeCompressed - if true and the remote file is *not* gzipped, will only check if the local file exists
        Throws:
        IOException
      • openSupplementaryFileAsStream

        protected InputStream openSupplementaryFileAsStream​(String filename,
                                                            int attempt,
                                                            boolean decompressIfNeeded)
                                                     throws IOException
        Open a supplementary file as an input stream, possibly decompressing it.
        Throws:
        IOException