-
-
-def buildDmelanogasterDB(db=geneDB):
- """ genes and annotations are from UCSC. GO association file is from geneontology.org.
- """
- genePath = "%s/download/flyBaseGene.txt" % cisRoot
- annotPath = "%s/download/gene_info" % cisRoot
- goDefPath = "%s/download/GO.terms_and_ids" % cisRoot
- goPath = "%s/download/gene2go" % cisRoot
- chromos = {"2L": "%s/download/chr2L.fa" % cisRoot,
- "2R": "%s/download/chr2R.fa" % cisRoot,
- "2LHet": "%s/download/chr2LHet.fa" % cisRoot,
- "2RHet": "%s/download/chr2RHet.fa" % cisRoot,
- "3L": "%s/download/chr3L.fa" % cisRoot,
- "3LHet": "%s/download/chr3LHet.fa" % cisRoot,
- "3R": "%s/download/chr3R.fa" % cisRoot,
- "3RHet": "%s/download/chr3RHet.fa" % cisRoot,
- "4": "%s/download/chr4.fa" % cisRoot,
- "X": "%s/download/chrX.fa" % cisRoot,
- "XHet": "%s/download/chrXHet.fa" % cisRoot,
- "YHet": "%s/download/chrYHet.fa" % cisRoot,
- "U": "%s/download/chrU.fa" % cisRoot,
- "Uextra": "%s/download/chrUextra.fa" % cisRoot,
- "M": "%s/download/chrM.fa" % cisRoot
- }
-
- print "Creating database %s" % db
- createDBFile(db)
-
- print "Adding gene entries"
- loadGeneEntries(db, genePath)
-
- print "Adding gene features"
- loadGeneFeatures(db, genePath)
-
- print "Adding gene annotations"
- loadGeneAnnotations(db, annotPath)
-
- print "Adding gene ontology"
- loadGeneOntology(db, goPath, goDefPath, annotPath)
-
- for chromID in chromos.keys():
- print "Loading chromosome %s" % chromID
- loadChromosome(db, chromID, chromos[chromID], "/D_melanogaster/chromo%s.bin" % chromID)
-
- print "Creating Indices"
- createDBindices(db)
-
- print "Finished creating database %s" % db
\ No newline at end of file