Immediate work

Set up link to svn web view of TODO.txt file.


TODO 
----

Goals
-----

- GREG: !!!! Clean up broken case-control power function & put in
             fixed replacements

- Basic support for loading and manipulate genetic data

  Status: 
 
    - We think can get our own data in
    

  Need:

    - We need to create a document describing how to read in genotype data:  
	 HOWTO-ReadGenoytpeData.Rnw (GREG-I)

    - More efficient representation (See below)

    - Conversion function from genetics:::genotype objects to GeneticsBase:geneSet object

    - Check documentation for makeGeneSet from data frame.
    
- Support for calculating allele frequencies, HWE, and LD.

  Status: 

    - LD: Efficient C++ biallelic implementation in place (LDMAX Gold C++ code)

	  Question: Future handling of multi-allele cases?

    - HWE: Inefficient R implementation in place.  Probably need to
           convert to a vectorized or C implementation. 

    - alleleFreq: Done, inefficienly in R

- Support for FBAT - see the fbat package

  Status: Inefficient but works.

- Basic tools for including genetic data in models (ie, carrier,
  allele.count, homozygote, ...)

**  Status: Need to create vignette based on the old genetics package
**  R-News article. (Greg-II)

- Ability to produce a nice marker summary report

  Status: Done, very (!!!) inefficient. 

	  Need to use numeric and not name-based indexing to reduce
	  overhead of getting row/col names. (Greg-III)

- Access to haplo.score code.

  - Basic Wrappers in place, haplo.score itself doesn't handle many
    markers.  

    Need to make a Vignette demoing them.  (Ross)  

- Tool for apply a model to each marker

  Status: Example code in tutorial.Rnw

  Ideally: we should see how to optimize & generalize this (avoiding
  re-calculation of non-changing items, e.g. most of the model matrix)


- A vignette demonstrating how to

    - read data from various formats (genotypes and phenotypes)

         Status: Partially done in the SummaryTables.Rnw, but needs to be
                 moved and expanded (including header of files) in
		 HOWTO-ReadGenotypeData.Rwn).

    - a nice marker summary report for each marker

        Status: Done in SummaryTables.Rnw

    - perform HWE and LD calculations 

        Status: DONE GeneticsBase:tutorial.Rnw

    - apply FBAT

        Status: DONE in tutorial.Rnw and Fbat vignette

    - Add annotation data to the markers (Look at SNPer package)

	Status: NOT DONE  (Ross)

    - apply a statistical model to each marker & produce a nice report

        Status: - Apply model part DONE in GeneticsBase:tutorial.Rnw
                - Nice summary part, not done

Specific Tasks 
--------------


- Make list of required and recommended fields for markerInfo,
  sampleInfo, and studyInfo.  

  - Everyone: Look at wiki page

  - For 1.0: put this information into .tex documents in GeneticsBase/inst/doc
 
- as.data.frame:  creates a data frame by taking the sampleInfo data frame 
   and adding  genotype data as columns.


- as.geneSet for "data.frame":  accepts data frame and a vector/list of column 
  indexes/names containing gene information, optional information on how to 
  interpret the gene information. IE, (..., format='sep', sep='/'), 
  (..., format='sep', sep=''),  (..., format='longstring', codes=c('r','a','h') )
  (count';sep=1, format=

  Status: Initial version in place.  


- Create a sample-size / experimental design package
  "GeneticsDesign"

  Status: Done, but has broken sample size calculation code


TODO for Release 1.0
--------------------


<Jason+Nitin>
12.  Document treatment of missing genotype or allele values!
	      NA --> No knowledge of this genotype
	      A/NA or NA/A --> partial knowledge
	      NA/NA mapped to NA
</Jason+Nitin>

- Define actual objects / fields to store annotation information

TODO for Eventually
-------------------

<?>
- Create a comprehensive set of unit tests
</?>


---------------
Completed Tasks
---------------
<?> 
Split useful code out of readGenes.* for use in geneCodeSet
constructor.  
</?>


<Nitin+Greg>
13. Translate the object manipulation functions in the R genetics
    package
</Nitin+Greg>


<Scott>
2.  When creating geneCodeSet, need to check that all values in
    TransTable column of markerInfo slot match a value in names
    of transTables slot!

3.  Write check methods?

9.  We have decided to require row and column names in callCodes and
    errorMetrics slots.  We will need to check consistency with
    markerInfo and sampleInfo slots, and enforce that the dimnames exist.
</Scott>


<All>
Create 1 example data set each.
</All>

<Greg>
- allele list and missing value code specification to readGenes functions.

- code to decodeCallCodes to properly handle missing value codes

- code to alleleNames, and AlleleCodes to properly handle missing value codes

- methods for 'subset' '[' '[<-' '[[' '[[<-' 
</Greg>


<Greg>
Port LD code from 'genetics' to GeneticsBase.
</Greg>


<Greg>
Optimize performance of readGenes functions.  (Use scan instead of read.table).
</Greg>


<Greg>
Function to read hapmap .ped files
</Greg>

<Greg>
add print method -- fixed show method
</Greg>

<Scott>
1.  Break source file into multiple files?
</Scott>

<Jason+Nitin>
14. Create R helpfile templates --> Jason + Nitin
</Jason+Nitin>

6.  Should callCodes slot be of mode "integer", not "numeric"? 
    Currently, I AM using "integer".  --> KEEP AS INTEGER

<Jason+Scott>
7.  Write function decodeCallCodes.  Call this in, e.g. show method for
    class geneCallSet.   This function should loop over components of
    the transTables slot, NOT over rows of the callCodes slot!  The
    efficiency gain can be VERY large for large objects.


8.  Revise show method for class geneCallSet (see 7. above).
</Jason+Scott>

<Jason+Scott>
10.  Add ploidy slot?
11.  Add phase slot?  How will we encode phase info?

     1. Yes/No for all (logicial scaler)
     2. Yes/No for each Marker (logical vector)
     3. phaseObject (TBD): observation by marker by phase
        probabilities + definitions of contigs + probabilty of contigs
         
</Jason+Scott>

#####
# Old
#####

 

