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

gCNV vcf cleanup #6352

Merged
merged 3 commits into from
Jan 15, 2020
Merged

gCNV vcf cleanup #6352

merged 3 commits into from
Jan 15, 2020

Conversation

ldgauthier
Copy link
Contributor

Only list called ALTs
Set QUAL to QS (quality of some event), which we've found to be the best for filtering

Resolves most of the rest of #6167

@gatk-bot
Copy link

gatk-bot commented Jan 7, 2020

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

Test Type JDK Job ID Logs
unit openjdk11 28501.13 logs
unit openjdk8 28501.3 logs

Only called alleles as alts; QS to QUAL
@ldgauthier ldgauthier force-pushed the ldg_GCNV_vcf_cleanup branch from 80208b7 to 7f97fb1 Compare January 7, 2020 20:18
@mwalker174 mwalker174 self-assigned this Jan 13, 2020
Copy link
Contributor

@mwalker174 mwalker174 left a comment

Choose a reason for hiding this comment

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

I have a couple of suggestions but otherwise this is great.

@@ -372,7 +374,8 @@ public Object onTraversalSuccess() {

private void generateIntervalsVCFFileFromAllShards() {
logger.info("Generating intervals VCF file...");
final VariantContextWriter intervalsVCFWriter = createVCFWriter(outputIntervalsVCFFile);
final VariantContextWriter intervalsVCFWriter = GATKVariantContextUtils.createVCFWriter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to use GATKTool's createVCFWriter()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The GATKTool method won't accept a sequence dictionary. It relies on the engine discovering a sequence dictionary from one of the inputs, which doesn't work so well here because the inputs are specified as directories.

Copy link
Contributor

@samuelklee samuelklee Jan 14, 2020

Choose a reason for hiding this comment

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

Isn’t the dictionary hooked up to createVCFWriter now via getBestAvailableSequenceDictionary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, this is a holdover from before I implemented that suggestion Louis had. Thanks for the extra set of eyes.

@@ -412,7 +415,8 @@ private void generateSegmentsVCFFileFromAllShards() {

/* write variants */
logger.info(String.format("Writing segments VCF file to %s...", outputSegmentsVCFFile.getAbsolutePath()));
final VariantContextWriter segmentsVCFWriter = createVCFWriter(outputSegmentsVCFFile);
final VariantContextWriter segmentsVCFWriter = GATKVariantContextUtils.createVCFWriter(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here?

@@ -128,7 +128,7 @@ VariantContext composeVariantContext(final IntegerCopyNumberSegment segment) {
int copyNumberCall = segment.getCallIntegerCopyNumberState().getCopyNumber();

final VariantContextBuilder variantContextBuilder = new VariantContextBuilder();
variantContextBuilder.alleles(ALL_ALLELES);
//variantContextBuilder.alleles(ALL_ALLELES);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can delete

@@ -155,8 +155,14 @@ VariantContext composeVariantContext(final IntegerCopyNumberSegment segment) {
genotypeBuilder.attribute(QSE, FastMath.round(segment.getQualityEnd()));
final Genotype genotype = genotypeBuilder.make();

final List<Allele> vcAlleles = new ArrayList<>(Collections.singletonList(REF_ALLELE));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could write this as final List<Allele> vcAlleles = Lists.newArrayList(REF_ALLELE);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lists is in which package? avro?

@ldgauthier ldgauthier merged commit ab73d32 into master Jan 15, 2020
@ldgauthier ldgauthier deleted the ldg_GCNV_vcf_cleanup branch January 15, 2020 17:38
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.

4 participants