Class ReadFamilies

java.lang.Object
  |
  +--ReadFamilies

public class ReadFamilies
extends java.lang.Object

Class ReadFamilies.java - read protein families file mapping protein families to bit #s. The bits go from right to left. So that if a bit # is say 3, the corresponding bit is (1<<3).

 The tab-delimited data looks like:
  UNKNOWN   1
  Apoptosis 2
  Bcl-2 family3
  Cdk inhibition 4
       . . .
  Transport 50
  Tumor suppressor 51
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government and Djamel Medjahed (SAIC-Frederick). As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file.

Version:
$Date: 2002/10/14 20:17:17 $ $Revision: $
Author:
P. Lemkin (NCI), Djamel Medjahed (SAIC), NCI-Frederick, Frederick, MD
See Also:
ProtPlot Home

This work was derived from MAExplorer under the Mozilla 1.1 Open Source Public License by Peter Lemkin of the National Cancer Institute, an agency of the United States Government subject to the limitations noted in the accompanying LEGAL file. See licence info on http://maexplorer.sourceforge.org/


Field Summary
private  java.lang.String[] defFamilies
          default list of protein families
 long[] familyBits
          list of tissue family BITS [0:nFamilies-1] return all tokens/row the familyBit[i] = 2**familyNbr[i].
 java.lang.String[] familyNames
          list of tissue family names [0:nFamilies-1] return all tokens/row
 java.lang.String familyNamesFile
          Name of the family data tab-delimited file.
 int[] familyNbrs
          list of tissue family Numbers [0:nFamilies-1] return all tokens/row
 int maxFamilies
          max # of families
 int nFamilies
          # of families
private  ProtPlot prp
          instance of ProtPlot
private  char[] tokBuf
          token buffer
private  UtilPRP util
          instance of UtilPRP
 
Constructor Summary
(package private) ReadFamilies(ProtPlot prp, java.lang.String familyNamesFile, int maxFamilies, java.lang.String msg)
          ReadFamilies() - constructor
 
Method Summary
 java.lang.String cvtFamiliesStr(long fBits)
          cvtFamiliesStr() - lookup family strings for familyBits
 long cvtFamilyNamesToBits(java.lang.String useFamilyNames)
          cvtFamilyNamesToBits() - convert a String list of family names to familyBits.
private  boolean parseRows(java.lang.String sData)
          parseRows() - parse and save a rows of data in rd.protList[] data structures.
 boolean readFamiliesFile(java.lang.String msg)
          readFamiliesFile() - read list of Families into data structure
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

prp

private ProtPlot prp
instance of ProtPlot

util

private UtilPRP util
instance of UtilPRP

defFamilies

private java.lang.String[] defFamilies
default list of protein families

familyNamesFile

public java.lang.String familyNamesFile
Name of the family data tab-delimited file. This consists of 2 columns "FamilyName" "FamilyNbr" which is followed by the data.

maxFamilies

public int maxFamilies
max # of families

nFamilies

public int nFamilies
# of families

familyNames

public java.lang.String[] familyNames
list of tissue family names [0:nFamilies-1] return all tokens/row

familyNbrs

public int[] familyNbrs
list of tissue family Numbers [0:nFamilies-1] return all tokens/row

familyBits

public long[] familyBits
list of tissue family BITS [0:nFamilies-1] return all tokens/row the familyBit[i] = 2**familyNbr[i].

tokBuf

private char[] tokBuf
token buffer
Constructor Detail

ReadFamilies

ReadFamilies(ProtPlot prp,
             java.lang.String familyNamesFile,
             int maxFamilies,
             java.lang.String msg)
ReadFamilies() - constructor
Parameters:
prp - is instance of ProtPlot
familyNamesFile - name
maxFamilies - in file
msg - to use while reading
Method Detail

readFamiliesFile

public boolean readFamiliesFile(java.lang.String msg)
readFamiliesFile() - read list of Families into data structure
Parameters:
msg - to display while reading file.

parseRows

private boolean parseRows(java.lang.String sData)
parseRows() - parse and save a rows of data in rd.protList[] data structures.
Parameters:
sData - to parse
Returns:
true if ok.

cvtFamiliesStr

public java.lang.String cvtFamiliesStr(long fBits)
cvtFamiliesStr() - lookup family strings for familyBits
Parameters:
fBits - to lookup as string equivalent
Returns:
"Families: c1, c2, ..., cn" list

cvtFamilyNamesToBits

public long cvtFamilyNamesToBits(java.lang.String useFamilyNames)
cvtFamilyNamesToBits() - convert a String list of family names to familyBits. Allow alternate form which is a list of familyNbrs e.g. "3,25,13,10" in which case would just build the bit pattern from these
Parameters:
useFamilyNames - to convert to bits, separated by "," (CHK)
Returns:
familyBits. If no names, set to "ALL" equals 1.