Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for generate-names.pl to load included tracks.conf files #551

Closed
carrere opened this Issue Jan 6, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@carrere
Copy link

carrere commented Jan 6, 2015

Bonjour,

We are using the "include" keyword in our tracks.conf to manage our tracks.
So we have one tracks.conf file with refSeq and GFF3 annotation and for example one myHits-tracks.conf file containing GMAP hits

include += ./myHits-tracks.conf

When I try to generate names for these data, only tracks from tracks.conf are taken into account.
This behaviour come from GenomeDB.pm module (called in the sub "run" of IndexNames.pm):

sub trackList {
    my ( $self ) = @_;
    my $json_tracks = $self->{rootStore}->get( 'trackList.json', { tracks => [] } )->{tracks};
    my $conf_tracks = $self->_read_text_conf( 'tracks.conf' )->{tracks} || [];
    return [ @$json_tracks, @$conf_tracks ];
}

included conf files are then ignored and autocompletion is not available for these tracks.

@cmdcolin

This comment has been minimized.

Copy link
Contributor

cmdcolin commented Jan 7, 2015

Good catch. patches welcome :)

@rdhayes

This comment has been minimized.

Copy link
Contributor

rdhayes commented Jan 7, 2015

Something to point out quickly is that generate-names.pl is only strictly
necessary for tracks that contain data that you wish to have searchable in
JBrowse by feature name/alias. I routinely do not index all tracks.

This one might be not that simple. The perl scripts for data generation
don't have access to the JBrowse installation main config where additional
include file names are specified (jbrowse.conf), as far as I know.

Richard D. Hayes, Ph.D.
Joint Genome Institute / Lawrence Berkeley National Lab
http://phytozome.jgi.doe.gov

On Tue, Jan 6, 2015 at 5:19 PM, Colin Diesh notifications@github.com
wrote:

Good catch. patches welcome :)


Reply to this email directly or view it on GitHub
#551 (comment).

@cmdcolin

This comment has been minimized.

Copy link
Contributor

cmdcolin commented Jan 7, 2015

That's also a good point but I guess it would be nice for the generate-names script to follow additional includes directives contained in the trackList.json/tracks.conf

Of course "trackList.json"/"tracks.conf" are the defaults and they don't even have to exist since they are specified in the root config, but i think most jbrowse scripts currently assume they do exist. The alternative is doing what things like add-bam-track.pl do which is to explicitly specify the path to the config files, but i actually prefer the generic --out directory parameter and assuming trackList.json/tracks.conf exist :)

@cmdcolin cmdcolin changed the title generate-names.pl does not load included tracks.conf files Add ability for generate-names.pl to load included tracks.conf files Jul 20, 2015

@carrere

This comment has been minimized.

Copy link
Author

carrere commented Mar 16, 2016

Here is what I do (really quick and dirty) to deal with included .conf files in the GenomeDB.pm module:

sub trackList {
    my ( $self ) = @_;
    my $json_tracks = $self->{rootStore}->get( 'trackList.json', { tracks => [] } )->{tracks};
    #my $conf_tracks = $self->_read_text_conf( 'tracks.conf' )->{tracks} || [];

    my $dataDir =  $self->{dataDir};
    system ("cat $dataDir/*.conf > $dataDir/tmp.conf");
    my $conf_tracks = $self->_read_text_conf( 'tmp.conf' )->{tracks} || [];
    system ("rm $dataDir/tmp.conf");

    return [ @$json_tracks, @$conf_tracks ];
}

@rbuels rbuels added the bug label Jan 30, 2018

@rbuels rbuels modified the milestones: 1.12.4, 1.13.0 Jan 30, 2018

@rbuels rbuels modified the milestones: 1.13.0, 1.14.0 Mar 14, 2018

rbuels added a commit that referenced this issue Mar 27, 2018

convert volvox_gff3_tabix track conf to JSON
so that generate-names.pl can parse it. because we
have not yet done #551

@rbuels rbuels modified the milestones: 1.14.0, 1.14.1 Apr 9, 2018

@rbuels rbuels self-assigned this May 1, 2018

@rbuels rbuels added the in progress label May 1, 2018

@rbuels rbuels closed this in b932909 May 1, 2018

@rbuels rbuels removed the in progress label May 1, 2018

@carrere

This comment has been minimized.

Copy link
Author

carrere commented May 3, 2018

Thanks @rbuels for the fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.