edu.unc.csbio.RNASim
Class RealQualityGenerator

java.lang.Object
  extended by edu.unc.csbio.RNASim.QualityGenerator
      extended by edu.unc.csbio.RNASim.RealQualityGenerator

public class RealQualityGenerator
extends QualityGenerator

The class RealQualityGenerator extending QualityGenerator is for generating quality score from real fq files.

Version:
0.1
Author:
Shunping Huang , Jack Wang

Field Summary
private  java.io.BufferedReader br1
          two BufferedReader to read two fq files
private  java.io.BufferedReader br2
          two BufferedReader to read two fq files
private  java.lang.String fq1
          location of two fq files
private  java.lang.String fq2
          location of two fq files
private  boolean isQualityScoreFound
          to check whether quality score is found
 
Constructor Summary
RealQualityGenerator(java.lang.String _fq1, java.lang.String _fq2)
          this is the constructor for object RealQualityGenerator
 
Method Summary
 java.lang.String[] generate(Read[] r)
          Generate read quality score by sampling real Fastq file.
private  void ResetBufferReader()
          this method reset BufferReader br1 and br2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

br1

private java.io.BufferedReader br1
two BufferedReader to read two fq files


br2

private java.io.BufferedReader br2
two BufferedReader to read two fq files


fq1

private java.lang.String fq1
location of two fq files


fq2

private java.lang.String fq2
location of two fq files


isQualityScoreFound

private boolean isQualityScoreFound
to check whether quality score is found

Constructor Detail

RealQualityGenerator

public RealQualityGenerator(java.lang.String _fq1,
                            java.lang.String _fq2)
                     throws java.io.IOException
this is the constructor for object RealQualityGenerator

Parameters:
_fq1 - location of first fq file
_fq2 - location of second fq file
Throws:
java.io.IOException - if an input or output exception occurred
Method Detail

ResetBufferReader

private void ResetBufferReader()
                        throws java.io.IOException
this method reset BufferReader br1 and br2

Throws:
java.io.IOException - if an input or output exception occurred

generate

public java.lang.String[] generate(Read[] r)
                            throws java.lang.RuntimeException
Generate read quality score by sampling real Fastq file.

Specified by:
generate in class QualityGenerator
Parameters:
r - an array of read
Returns:
a String array of quality scores
Throws:
there - is not enough lines in real Fastq file
java.lang.RuntimeException