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

Change build_index to only occur for old index #66

Merged
merged 1 commit into from
May 12, 2015

Conversation

sveint
Copy link
Contributor

@sveint sveint commented May 12, 2015

In current implementation a new index file will be created if the index file modification time is older than, or equal, to the fasta file. In some cases, e.g. if the files are downloaded as part of an external bundle, the modification times could be equal for all files. In such cases you often want to preserve the original index.

Fix this by only building index if the index is older than the fasta file. If they have equal mtime, it will be used instead.

The day-to-day reason behind wanting this change is that we're using the reference fasta file from the GATK bundle, and we don't trust to change it from the original bundle index used by GATK. As we don't always have control how the bundle is deployed, touching the index file for each deployment is also a hassle.

In current implementation a new index file will be created if the index file modification time is older than, or equal, to the fasta file. In some cases, e.g. if the files are downloaded as part of an external bundle, the modification times could be equal for all files. In such cases you often want to preserve the original index.

Fix this by only building index if the index is older than the fasta file. If they have equal mtime, it will be used instead.
@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 0311c2f on sveint:index-mtime-fix into b48001a on mdshw5:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 77.52% when pulling 0311c2f on sveint:index-mtime-fix into b48001a on mdshw5:master.

mdshw5 added a commit that referenced this pull request May 12, 2015
Change build_index to only occur for old index
@mdshw5 mdshw5 merged commit 7fccb82 into mdshw5:master May 12, 2015
@mdshw5
Copy link
Owner

mdshw5 commented May 12, 2015

Thanks, @sveint. This change makes sense and I'll merge it and back port it to the versions where index mtime is checked!

@mdshw5 mdshw5 added the bug label May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
mdshw5 added a commit that referenced this pull request May 12, 2015
@sveint
Copy link
Contributor Author

sveint commented May 13, 2015

Nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants