From: Giles V. <gv...@sa...> - 2009-09-17 10:30:38
|
On 15 Sep 2009, at 14:49, Giles Velarde wrote: > > On 15 Sep 2009, at 09:41, Giles Velarde wrote: > >> >> On 11 Sep 2009, at 17:19, Mitch Skinner wrote: >> >>> On 09/11/2009 07:23 AM, Giles Velarde wrote: >>>> My apologies for sending this on a Friday afternoon. Since this >>>> is my >>>> first mail to the list let me say that JBrowse looks fantastic. >>> >>> Thanks! >>> >>>> bin/flatfile-to-json.pl -gff >>>> /data/gv1/gff3-ftp/export_2009-09-10/Lmajor/Lmjchr10.gff >>>> --autocomplete all --getType --getLabel --getSubs -- >>>> subfeatureClasses >>>> '{"CDS": "transcript-CDS", "exon": "transcript-exon"}' --getPhase >>>> >>>> bin/generate-names.pl -v >>>> >>>> This works fine (see screenshot below). However I don't see quite >>>> how >>>> to split things up into several tracks using this approach.Should I >>>> be >>>> using a config file to do that? If that's the case, does anyone >>>> have >>>> an example config file for specifying loading from GFF files? The >>>> provided example is for a DB. >>> >>> You have two options; one is to use flatfile-to-json.pl with the -- >>> type >>> command line parameter. That allows you to filter the GFF file for >>> specific feature types (you can have more than one --type option on >>> the >>> command line). The other option is to use a config file. The >>> example >>> in docs/tutorial/conf_files uses the Bio::DB::SeqFeature::Store >>> "memory" >>> adaptor, which reads a flat file into memory and then acts as a DB. >>> That allows you to use a config file with a GFF source of features. >>> >>> If you use flatfile-to-json.pl, you probably also want to specify >>> the >>> --cssclass, --tracklabel, and --key command line parameters. >>> >>> Hope this helps; I'm assuming you want to organize your tracks by >>> feature type. >>> >>> Mitch >>> >> >> >> Thanks, Mitch! I'll have a go. >> > > > Using the config file does indeed seem to be the best option for me. > I ended up writing a little bash script : > > rm -rf data > for file in /data/gv1/gff3-ftp/export_2009-09-10/Lmajor/*.gff > do > echo "processing GFF file? $file" > ./bin/prepare-refseqs.pl -gff $file --conf conf.json > done > ./bin/biodb-to-json.pl --conf conf.json > ./bin/generate-names.pl -v > > > > and used it with the following conf file : > > > > > { > "description": "GFF Database", > "db_adaptor": "Bio::DB::SeqFeature::Store", > "db_args": { "-adaptor": "memory", > "-dir": "/data/gv1/gff3-ftp/export_2009-09-14/ > Lmajor/" }, > > "TRACK DEFAULTS": { > "class": "feature", > "autocomplete": "all", > "urlTemplate": "http://beta.genedb.org/NamedFeature? > name={load_id}", > "extraData": {"load_id": "sub {shift->attributes(\"load_id\");}"} > }, > > "tracks": [ > { > "track" : "Gene", > "feature": ["gene"], > "key" : "Gene Span", > "class": "dblhelix", > "category": "Gene Model features" > } > ] > } > > > Thanks again, Mitch! > Giles > > Hi All, Just wanted to report that I am getting a lot of print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 597, <GEN4> line 1423. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1423. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1456. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1489. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1523. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1556. print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN4> line 1589. ......... print() on closed filehandle GEN2 at /usr/local/share/perl/5.10.0/Bio/ DB/SeqFeature/Store/memory.pm line 599, <GEN38> line 11008. on the console when running ./bin/biodb-to-json.pl --conf conf.json Other than that, everything seems to be working with the GFF building... Best, Giles -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |