edu.unc.csbio.RNASim
Class ReadModifier

java.lang.Object
  extended by edu.unc.csbio.RNASim.ReadModifier

public class ReadModifier
extends java.lang.Object

The class modifies pair-end reads from a sequence.

Version:
0.1
Author:
Shunping Huang , Jack Wang

Field Summary
private static char[] whole
          all possible nucleotides as a char array
 
Constructor Summary
ReadModifier()
           
 
Method Summary
private static char change(char original, double errorProb)
          the method to change original nucleotide based on given error probability
static int modify(Read[] r, java.lang.String[] qs)
          a method to change read sequence based on given quality score For each char, qs[i], in the array, Qphred = qs[i] - 64.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whole

private static char[] whole
all possible nucleotides as a char array

Constructor Detail

ReadModifier

public ReadModifier()
Method Detail

change

private static char change(char original,
                           double errorProb)
the method to change original nucleotide based on given error probability

Parameters:
original - nucleotide
errorProb - the error probability
Returns:
the character of new nucleotide

modify

public static int modify(Read[] r,
                         java.lang.String[] qs)
                  throws java.lang.RuntimeException
a method to change read sequence based on given quality score For each char, qs[i], in the array, Qphred = qs[i] - 64. Also, Qphred = -10 log10(e), where e is the estimated probability of a base being wrong

Parameters:
r - read sequence
qs - an array of encoded Phred scores
Returns:
total number of positions being changed
Throws:
java.lang.RuntimeException