Hi all,

I've written a simple GFF3 parser, and a GMAP -> ivals parser, as part
of the lamprey genome analysis we're doing; they're here,

    http://github.com/ctb/lamprey-est-map/tree/master

files 'gff_parser.py' and 'gmap_pygr.py'.

Some example code:

---
genome = '/scratch/titus/lamprey/supercontigs.fa'
ests = '/scratch/titus/lamprey/Pma200805_collapsed_ESTs.fasta'
 
genome_db = seqdb.SequenceFileDB(genome)
ests_db = seqdb.SequenceFileDB(ests)
  
fp = open(sys.argv[1])
ivals = gmap_pygr.build_ivals(fp, genome_db, ests_db)
   
first100 = list(izip(range(100), ivals))
    
pprint.pprint(first100)
---

produces:

[(0, ('Pma200805_5.path1', [(-Contig100273[794:831], Pma200805_5[24:61])])),   
 (1, ('Pma200805_5.path2', [(-Contig100971[763:800], Pma200805_5[24:61])])),
 (2, ('Pma200805_5.path3', [(Contig102055[281:318], Pma200805_5[24:61])])),
 (3, ('Pma200805_5.path4', [(Contig121568[307:344], Pma200805_5[24:61])])),
 (4, ('Pma200805_5.path5', [(-Contig175959[291:328], Pma200805_5[24:61])])),
 (5,
  ('Pma200805_1.path1',
   [(Contig100273[253:277], Pma200805_1[7:31]),
    (Contig100273[277:307], Pma200805_1[32:62]),
    (Contig100273[307:325], Pma200805_1[63:81])])),
 (6,
  ('Pma200805_1.path2',
   [(-Contig111318[96:120], Pma200805_1[7:31]),
    (-Contig111318[66:96], Pma200805_1[32:62]),
    (-Contig111318[48:66], Pma200805_1[63:81])])),
 (7,
  ('Pma200805_1.path3',
   [(Contig150286[581:605], Pma200805_1[7:31]),
    (Contig150286[605:635], Pma200805_1[32:62]),
    (Contig150286[635:653], Pma200805_1[63:81])])),
...

Not being much of an expert on GFF3, I tried to provide the minimal
necessary set of code to be useful, and then put anything that seemed
GMAP specific into gmap_pygr.

Questions & comments welcome!  Watch the github space for updates and
bugfixes.

cheers,
--titus
-- 
C. Titus Brown, [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to