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

ExtractCohort supports -XL exclusion and follows intervals, other optimizations #7181

Merged
merged 17 commits into from
Apr 6, 2021

Conversation

mmorgantaylor
Copy link
Member

@mmorgantaylor mmorgantaylor commented Apr 2, 2021

  • added custom classes ExtractCohortRecord and ExtractCohortFilterRecord that implement Locatable
  • refactored attribute building from these records
  • now that the records are Locatables, can use OverlapDetector to filter locations down to only desired intervals (including excluded sites)
  • removed queryMode QUERY and associated querying from options


@Test
public void testGetContig() {
String expectedContig = "chr1";
Copy link
Member Author

Choose a reason for hiding this comment

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

is it preferred to define these single-use objects explicitly or just stick "chr1" into the assertion statement directly?

Copy link
Contributor

Choose a reason for hiding this comment

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

either way is fine. I tend to put them right in the assertion so it's easier to read if I'm not also using it to construct the test data. In that case I pull it out so I don't have "chr1" repeated throughout the method

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah reading the rest of these tests I would just inline it into the assert for readability

Copy link
Contributor

@kcibul kcibul left a comment

Choose a reason for hiding this comment

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

Great refactoring

final Allele alt = Allele.create(queryRow.get("alt").toString(), false);
final ExtractCohortFilterRecord filterRow = new ExtractCohortFilterRecord( queryRow );

final long location = filterRow.getLocation();
Copy link
Contributor

Choose a reason for hiding this comment

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

So lovely!

sampleRecords.add(new QueryRecord(row));

// TODO remove queryMode entirely from ExtractTool
throw new NotImplementedException("QUERY mode not supported. Please use `--query-mode LOCAL_SORT`.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Yassssss!


@Test
public void testGetContig() {
String expectedContig = "chr1";
Copy link
Contributor

Choose a reason for hiding this comment

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

either way is fine. I tend to put them right in the assertion so it's easier to read if I'm not also using it to construct the test data. In that case I pull it out so I don't have "chr1" repeated throughout the method


@Test
public void testGetContig() {
String expectedContig = "chr1";
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah reading the rest of these tests I would just inline it into the assert for readability

@gatk-bot
Copy link

gatk-bot commented Apr 5, 2021

Travis reported job failures from build 33556
Failures in the following jobs:

Test Type JDK Job ID Logs
cloud openjdk8 33556.1 logs
cloud openjdk11 33556.14 logs

@mmorgantaylor mmorgantaylor merged commit 2cbfc3a into ah_var_store Apr 6, 2021
@mmorgantaylor mmorgantaylor deleted the mmt_extract_cohort_records branch April 6, 2021 19:04
This was referenced Mar 17, 2023
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