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

Allows BAM with csi index to be used #58

Merged
merged 1 commit into from Mar 5, 2018
Merged

Allows BAM with csi index to be used #58

merged 1 commit into from Mar 5, 2018

Conversation

keiranmraine
Copy link
Contributor

@keiranmraine keiranmraine commented Mar 2, 2018

Provide csi support for use of BAMs with csi already generated as discussed in #57.

  • Errors if csi is older than BAM indicating it can't handle generation of csi currently.
  • Test added to confirm access via index works

I tested with HTSlib 1.7

elsif ( -e "${path}.crai" && mtime($path) > mtime("${path}.crai") ) {
$self->reindex($path);
}
}

croak "No index file for $path; try opening file with -autoindex"
unless -e "${path}.bai" or
-e "${path}.crai";
-e "${path}.csi" or
-e "${path}.crai";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you actually suggesting to fail in the csi case by telling to rerun with autoindex?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming at some point -autoindex will allow csi.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.

@@ -514,6 +514,15 @@ for my $use_fasta ( 0, 1 ) {
ok( $matches{matched}/$matches{total} > 0.99 );
} ## end for my $use_fasta ( 0, ...)

{ # test access via csi index
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, but for complete coverage, I would do something similar to the low/high level tests performed on ex1 to check whether certain operations with the csi index work as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can look into extending the tests if it's the only way to get this moving. I only created the branch as we were getting no response or idea when something would happen.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the comment, but haven't actually requested the mandatory change. Sorry if you feel communication isn't what you expect. Rishi has just recently handed over maintenance to the e! core team (specifically me). I'm gradually getting my way through this, but this task is not the priority of my job at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently adding more robust tests by changing the ex1 tests to be reused for the ex3.bam with csi index. Looking at this test class looks like I've written most of them over the years. I'll raise a new pr once I've finished them

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most appreciated, thanks 👍

@avullo avullo merged commit e2cb6ee into Ensembl:master Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants