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 a native GATK implementation for 2bit references, and remove the dependency on the ADAM library #8606

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

droazen
Copy link
Contributor

@droazen droazen commented Dec 8, 2023

No description provided.

@gatk-bot
Copy link

gatk-bot commented Dec 8, 2023

Github actions tests reported job failures from actions build 7138120890
Failures in the following jobs:

Test Type JDK Job ID Logs
unit 17.0.6+10 7138120890.12 logs
unit 17.0.6+10 7138120890.1 logs

private static Int2ObjectMap<Insert> consolidateInserts(final List<Insert> inserts, final IntList offsets) {
final int size = inserts.size();
if (size == 0) {
return Int2ObjectMaps.emptyMap();
return (Int2ObjectMap<Insert>)Int2ObjectMaps.EMPTY_MAP;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pin fastutil to 7.0.13 and get rid of this

* @param rule Whether to merge adjacent intervals, or just overlapping intervals
* @return A new list of merged disjoint intervals, sorted by start position
*/
public static List<SimpleInterval> sortAndMergeIntervals(final List<SimpleInterval> raw, final IntervalMergingRule rule) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strongly consider adding a check enforcing a single-contig restriction

// TTCCAttgTTGTGATTTTGTGctaTTAAAATGATCAAAACANNNCCCTTAAAAATCTTAT
// TCTAACCTCTCAANNNCTTTTAAAaatgaNNNATTTCAGTACAGTCGGATGCATCTGTAA
// AAGATAAAAAtaTaACATTGATTAGTTTgCAAAAATAATTGTTTGACCCCAGTTAAGNga
private static final GATKPath maskedTwoBitTest = new GATKPath(packageRootTestDir + "utils/reference/masked.2bit");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make a note of how this was created


try {
// Load the raw contents of the 2bit file into a read-only in-memory ByteBuffer
rawBytes = ByteBuffer.wrap(ByteStreams.toByteArray(BucketUtils.openFile(referencePath.getRawInputString()))).asReadOnlyBuffer();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GATKPath.getInputStream()

// The total number of sequences in the file
private int sequenceCount;

private LinkedHashMap<String, TwoBitSequenceRecord> sequenceRecords;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add a comment that the order does in fact matter here

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

Looks 2bit to me 👍

@droazen droazen merged commit bf24519 into master Dec 8, 2023
20 checks passed
@droazen droazen deleted the dr_remove_adam_dependency branch December 8, 2023 20:46
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.

3 participants