Class SubsetFastqThread

  • All Implemented Interfaces:
    Runnable

    public class SubsetFastqThread
    extends Object
    The class define a class for a thread that create a temporary partial fastq file, with fixed reads (200 000) to use for contamination research. Only the reads pf are used. They are selected among the first 30 millions reads pf.
    Since:
    1.1
    Author:
    Sandrine Perrin
    • Constructor Detail

      • SubsetFastqThread

        public SubsetFastqThread​(FastqSample fastqSample,
                                 long rawClusterCount,
                                 long pfClusterCount,
                                 int numberReadsToCopy,
                                 int maxReadsToParse,
                                 int maxReadLength)
                          throws AozanException
        Thread constructor.
        Parameters:
        fastqSample - fastq sample instance
        rawClusterCount - raw cluster count for the sample
        pfClusterCount - passing filter cluster count for the sample
        numberReadsToCopy - number reads in partial fastq to create
        maxReadsToParse - maximum number reads to parse for create partial fastq
        Throws:
        AozanException - if an error occurs while creating sequence file for FastQC
    • Method Detail

      • logThreadStart

        protected void logThreadStart()
      • logThreadEnd

        protected void logThreadEnd​(String duration)
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • getResults

        public RunData getResults()
        Get the results of the analysis.
        Returns:
        a RunData object with only the result of the thread
      • getException

        public Throwable getException()
        Get the exception generated by the call to processSequences in the run() method.
        Returns:
        a exception object or null if no Exception has been thrown
      • isSuccess

        public boolean isSuccess()
        Test if the call to run method was a success.
        Returns:
        true if the call to run method was a success
      • getFastqSample

        public FastqSample getFastqSample()
        Return the fastqSample which represent a sample to treat.
        Returns:
        fastqSample, object which represent a sample to treat
      • setException

        protected void setException​(Throwable exception)
        Set the exception if occurs.
        Parameters:
        exception - the exception
      • setSuccess

        protected void setSuccess​(boolean success)
        Set if the process has been successful.
        Parameters:
        success - the success result