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

GatherVcfs and MergeVcfs: add COMMENT= + GatherVcfs SORT #1480

Merged
merged 18 commits into from
May 18, 2020

Conversation

lindenb
Copy link
Contributor

@lindenb lindenb commented Mar 3, 2020

Description

GatherVcfs and MergeVcfs are often my last steps in the workflow; This is the moment where I wish I could add a comment in my VCFS.

Here I added a an option COMMENT= for both commands.

Furthermore, I added an option SORT to GatherVcfs to avoid sorting my VCF according to the dictionary. if SORT=true, the first variant of each VCF is extracted and we use those variants to sort the INPUT.

I updated the test and fixed a one or two resource leak.


Checklist (never delete this)

Never delete this, it is our record that procedure was followed. If you find that for whatever reason one of the checklist points doesn't apply to your PR, you can leave it unchecked but please add an explanation below.

Content

  • Added or modified tests to cover changes and any new functionality
  • Edited the README / documentation (if applicable)
  • All tests passing on Travis

Review

  • Final thumbs-up from reviewer
  • Rebase, squash and reword as applicable

For more detailed guidelines, see https:/broadinstitute/picard/wiki/Guidelines-for-pull-requests

@Argument(doc = "Comment(s) to include in the merged output file's header.", optional = true, shortName = "CO")
public List<String> COMMENT = new ArrayList<>();

@Argument(doc = "Re-order the INPUT files according to order of their first variant.", optional = true, shortName = "S")
Copy link
Contributor

Choose a reason for hiding this comment

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

This documentation is unclear...I needed to read the code to understand what you mean.

Explain that the program will assume that the variants in the files come from non overlapping regions, but that while each file is itself sorted, the order that the files are provided in is not to be trusted. If TRUE, instead of sorting all the variants, the program will concatenate the variants from the files using the order of the first variant in each file as the order of the files.

Also, "SORT" is not a good name, since it's is used elsewhere to mean that the outputs will be sorted....I suggest you use REORDER_INPUT_BY_FIRST_VARIANT

Copy link
Contributor

@yfarjoun yfarjoun left a comment

Choose a reason for hiding this comment

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

please use multiline if-statements, with braces, and automattically format to get spaces around operators etc.

@lindenb
Copy link
Contributor Author

lindenb commented Apr 28, 2020

@yfarjoun I got time to return to this PR. I fixed things according to your comments, and I hope the formatting is fixed now (eclipse... )

Copy link
Contributor

@gbggrant gbggrant left a comment

Choose a reason for hiding this comment

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

Looks better. A couple of suggestions.

src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/main/java/picard/vcf/GatherVcfs.java Outdated Show resolved Hide resolved
src/test/java/picard/vcf/GatherVcfsTest.java Outdated Show resolved Hide resolved
src/test/java/picard/vcf/GatherVcfsTest.java Outdated Show resolved Hide resolved
src/test/java/picard/vcf/MergeVcfsTest.java Outdated Show resolved Hide resolved
@gbggrant
Copy link
Contributor

Looks good. @lindenb could you update this with the latest master?

@gbggrant gbggrant merged commit 1e6c51e into broadinstitute:master May 18, 2020
@lindenb lindenb deleted the pl_vcfcomments branch May 18, 2020 19:35
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