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

Rc 274 passing sites only #7275

Merged
merged 5 commits into from
May 27, 2021
Merged

Conversation

RoriCremer
Copy link
Contributor

@RoriCremer RoriCremer commented May 25, 2021

Locally tested and the exclude-filtered flag removes filtered rows
Screen Shot 2021-05-25 at 7 09 22 PM

@RoriCremer RoriCremer marked this pull request as ready for review May 25, 2021 23:08
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.

code looks great. Feels like we could use some better tests involving filtering in general, maybe make a ticket for that?

fullName="exclude-filtered",
doc="Don't include filtered sites in the final jointVCF",
optional=true)
private boolean XLfiltered = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

typically Java variables start with lower case, (and XL looks like extra large to me!). How about excludeFilteredSites just to be super clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah---XL did feel weird---but I wanted to lift it directly from SelectVariants. Is it better to be clear or match the already existing pattern?

@@ -429,7 +433,7 @@ private void finalizeCurrentVariant(final List<VariantContext> unmergedCalls,

// apply VQSLod-based filters
VariantContext filteredVC =
noVqslodFilteringRequested ? genotypedVC : filterSiteByVQSLOD(genotypedVC, vqsLodMap, yngMap, performGenotypeVQSLODFiltering);
noVqslodFilteringRequested ? genotypedVC : filterSiteAlleleByVQSLOD(genotypedVC, vqsLodMap, yngMap, performGenotypeVQSLODFiltering);
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically this is filtering at the site level (ie the entire site gets filtered, not a site-allele). If you wanted to make it more specific, maybe filterSiteByAlleleSpecificVQSLOD would be more accurate

@@ -450,12 +454,15 @@ private void finalizeCurrentVariant(final List<VariantContext> unmergedCalls,
final VariantContext finalVC = removeAnnotations(filteredVC);

if ( finalVC != null ) {
vcfWriter.add(finalVC);
// If XLfiltered is true, than the filtered sites should not be added
if (!XLfiltered || finalVC.isNotFiltered()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this made my brain hurt :D. What do you think of ! (XLfiltered && finalVC.isFiltered). Meh, ok I don't love that either 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hahaha Andrea listened to me repeat this about 30 times before it was correct. I'm not sure of the best option, but I can comment it more clearly for sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it any clearer if I just swap them?
if (finalVC.isNotFiltered() || !XLfiltered ) { foo }

@RoriCremer RoriCremer merged commit 58a7687 into ah_var_store May 27, 2021
@RoriCremer RoriCremer deleted the rc-274-passing-sites-only branch February 16, 2022 17:03
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.

2 participants