inc/nibTwo.h

Go to the documentation of this file.
00001 /* nibTwo - Something to let you transparently access either
00002  * .2bit or .nib files. */
00003 
00004 #ifndef NIBTWO_H
00005 #define NIBTWO_H
00006 
00007 #ifndef NIB_H
00008 #include "nib.h"
00009 #endif
00010 
00011 #ifndef TWOBIT_H
00012 #include "twoBit.h"
00013 #endif
00014 
00015 struct nibTwoCache
00016 /* This is a cache for either a directory full of nib files or a .2bit file. */
00017     {
00018     struct nibTwoCache *next;   /* Next in list */
00019     char *pathName;             /* Nib dir name or .2bit file name. */
00020     boolean isTwoBit;           /* True if this is a .2bit file. */
00021     struct twoBitFile *tbf;     /* Two bit file handle if any. */
00022     struct hash *nibHash;       /* Hash of nibInfo's if any. */
00023     };
00024 
00025 struct nibTwoCache *nibTwoCacheNew(char *pathName);
00026 /* Get something that will more or less transparently get sequence from 
00027  * nib files or .2bit. */ 
00028 
00029 void nibTwoCacheFree(struct nibTwoCache **pNtc);
00030 /* Free up resources associated with nibTwoCache. */
00031 
00032 struct dnaSeq *nibTwoCacheSeq(struct nibTwoCache *ntc, char *seqName);
00033 /* Return all of sequence. This will have repeats in lower case. */
00034 
00035 struct dnaSeq *nibTwoCacheSeqPartExt(struct nibTwoCache *ntc, char *seqName, int start, int size,
00036                                      boolean doMask, int *retFullSeqSize);
00037 /* Return part of sequence. If *retFullSeqSize is non-null then return full
00038  * size of sequence (not just loaded part) there.   Sequence will be lower
00039  * case if doMask is false, mixed case (repeats in lower)
00040  * if doMask is true. */
00041 
00042 struct dnaSeq *nibTwoCacheSeqPart(struct nibTwoCache *ntc, char *seqName, 
00043         int start, int size, int *retFullSeqSize);
00044 /* Return part of sequence. If *retFullSeqSize is non-null then return full size of
00045  * sequence (not just loaded part) there. This will have repeats in lower case. */
00046 
00047 struct dnaSeq *nibTwoLoadOne(char *pathName, char *seqName);
00048 /* Return sequence from a directory full of nibs or a .2bit file. 
00049  * The sequence will have repeats in lower case. */
00050 
00051 #endif /* NIBTWO_H */
00052 

Generated on Tue Dec 25 18:39:29 2007 for blat by  doxygen 1.5.2