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

Performance of readGAlignmentPairs with inter-chromosomal pairs #4

Open
LTLA opened this issue Mar 31, 2019 · 0 comments
Open

Performance of readGAlignmentPairs with inter-chromosomal pairs #4

LTLA opened this issue Mar 31, 2019 · 0 comments

Comments

@LTLA
Copy link

LTLA commented Mar 31, 2019

I'm contemplating switching over csaw to use GenomicAlignments for BAM file access, rather than continuing to wrestle with Rhtslib and its poor documentation/unreliability on Windows.

I've been looking at the readGAlignments and readGAlignmentPairs functions, which should be swap-in replacements for my main internal BAM reading functions (see LTLA/csaw#4). Currently, csaw runs on sorted BAM files on a chromosome-by-chromosome basis, so I would be calling these functions with which= set to an interval spanning the current chromosome in each iteration.

However, I am concerned about the performance implications of readGAlignmentPairs's obligations to retrieve mates from other chromosomes. Even with indexing, this would seem to require a lot of additional file accesses that would be unnecessary for my use case.

Would it be worthwhile to add an option to ignore paired reads that are not on the same reference sequence? Alternatively, this could feasibly be part of an expanded suite of scanBamParam options based on the INS isize field, e.g., keeping only non-zero INS isize values.

@LTLA LTLA mentioned this issue Apr 2, 2019
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

No branches or pull requests

1 participant