BackupGenes.c geneid v 1.1 source documentation


Description:
Data structures about predicted signals and exons are emptied and fill in in every fragment processing, but some exons (and genes) are needed to be used in the next split and therefore they must be temporally in the arrays of sites and exons into the dumpster. To avoid copying twice or more times the same exon, a hash table (DumpHash) is available to record which exons have been already copied and their address. Gene structure (linked exons) must be preserved between copies of genes.
Briefing:
long IncrMod(long x, long Modulus)
Increase values modulus an input long number.
exonGFF* backupExon(exonGFF* E,
                    exonGFF* Prev,
                    packDump* d)
It saves an exon (properties and sites) into the dumpster. Returns the pointer to the new copy for this exon.
exonGFF* backupGene(exonGFF* E, packDump* d)
It saves the gene (exons, sites, properties) which last exon is E, into the dumpster. For every exon of this gene, check whether it has already been copied or not, by looking up the hash table. Note: Whenever any exon of a gene is found to be in the dumpster, it is not necessary to go on copying the rest of the gene, because, from this point, both genes will be exactly equal (dynamic programming). This is because there is only one best gene finished in this exon, whatever exons have forward. Obviously, this function is recursive due to the need to conserve exon links (to backup one exon, its previous exon must have already been copied, and therefore the address is known).
void BackupGenes(packGenes* pg, int nclass, packDump* d)
To save best partial assembled genes and temporary optimal gene from packGenes structure to be used the next fragment of the input sequence.
void BackupArrayD(packGenes* pg, long accSearch,
                  gparam* gp, packDump* dumpster)
From the set of exons input to genamic (gene assembling algorithm), some ordering functions by donor (right position) are computed for every class or assembling rule in the gene model. Most exons are used in the same iteration where they were produced, but a few of them in the intersection between two fragments of sequence, must be saved to be able to recover the gene assembling process in the next iteration, checking minimum/maximum distance requirements as well.
void cleanGenes(packGenes* pg,
                int nclass,
                packDump* dumpster)
Preparing sort-by-donor functions and best partial genes structures for the next DNA sequence (reset counters and pointers).




Enrique Blanco Garcia © 2001