mappingmicroarrayprobestotheratgenomeviaapersistentindex
Class CreateArr1

java.lang.Object
  extended by mappingmicroarrayprobestotheratgenomeviaapersistentindex.CreateArr1

public class CreateArr1
extends java.lang.Object

This code processes the provided chromosome file into a control file and .dat files for loading into the database. It takes as arguments the location of the chromosome, ** the number of the chromosome (1-22) and the location where the control and .dat files have to be saved to.


Field Summary
(package private) static int alphabet
           
(package private) static int binNum
           
(package private) static int[] bins
           
(package private) static long binSize
           
(package private) static java.io.DataOutputStream[] files
           
(package private) static int maxLength
           
(package private) static java.lang.String path
           
(package private) static int sequenceCount
           
(package private) static long totalIndexSize
           
(package private) static byte[] values
           
(package private) static int windowLen
           
 
Constructor Summary
CreateArr1()
           
 
Method Summary
static void createControlAndDATFiles(java.lang.String chromosomesLocation, java.lang.String filesDestination, java.lang.String genome, javax.swing.JTextArea area)
          Creates the control and .dat files
static void getAA(java.io.FileInputStream in, java.io.PrintWriter cpw, int chrom, javax.swing.JTextArea area)
          Processes chromosome and writes output to the control file and .dat files to be loaded into a database
static byte getLetterCode(byte let)
          Takes the byte version of the letter and returns the number associated with it.
private static boolean isFastaFile(java.io.File f)
          Checks to see if file f is a fasta file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

static byte[] values

files

static java.io.DataOutputStream[] files

path

static java.lang.String path

sequenceCount

static int sequenceCount

maxLength

static int maxLength

bins

static int[] bins

binNum

static int binNum

binSize

static long binSize

alphabet

static int alphabet

totalIndexSize

static long totalIndexSize

windowLen

static int windowLen
Constructor Detail

CreateArr1

public CreateArr1()
Method Detail

getLetterCode

public static byte getLetterCode(byte let)
Takes the byte version of the letter and returns the number associated with it.

Parameters:
let - the byte version of the letter
Returns:
the byte containing the number associated with the letter, in case of error returns -1

getAA

public static void getAA(java.io.FileInputStream in,
                         java.io.PrintWriter cpw,
                         int chrom,
                         javax.swing.JTextArea area)
                  throws java.lang.Exception
Processes chromosome and writes output to the control file and .dat files to be loaded into a database

Parameters:
in - the chromosome file
cpw - the PrintWriter for the control file
chrom - the chromosome number
Throws:
java.lang.Exception

createControlAndDATFiles

public static void createControlAndDATFiles(java.lang.String chromosomesLocation,
                                            java.lang.String filesDestination,
                                            java.lang.String genome,
                                            javax.swing.JTextArea area)
                                     throws java.io.IOException
Creates the control and .dat files

Parameters:
chromosomesLocation - the location of the chromosome files
filesDestination - the destination of the control and .dat files
genome - the genome
Throws:
java.io.IOException - if there is a problem with the files

isFastaFile

private static boolean isFastaFile(java.io.File f)
Checks to see if file f is a fasta file

Parameters:
f - the file to be checked
Returns:
true if file f is a fasta file, false otherwise