Skip to content

Conversation

@roohy
Copy link
Contributor

@roohy roohy commented Jan 24, 2022

Description

I added modified to python/tskit/vcf.py file to write the site ID of the variant in the ID field of the VCF file output.
I added a test to check VCF variant ID and site ID in the ts object are the same in test_vcf.py file under the TestInterface class just in case. I did not add anything to documentation or the changelogs since I first wanted to submit this draft pull request and ask first since the change is very minimal.
Fixes #2103

PR Checklist:

  • [ ✅] Tests that fully cover new/changed functionality.

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #2107 (92e7125) into main (f950e34) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 92e7125 differs from pull request most recent head fb29186. Consider uploading reports for the commit fb29186 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2107   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          27       27           
  Lines       25586    25587    +1     
  Branches     1159     1159           
=======================================
+ Hits        23890    23891    +1     
  Misses       1666     1666           
  Partials       30       30           
Flag Coverage Δ
c-tests 92.34% <ø> (ø)
lwt-tests 89.05% <ø> (ø)
python-c-tests 72.12% <0.00%> (-0.01%) ⬇️
python-tests 98.89% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
python/tskit/trees.py 98.05% <ø> (ø)
python/tskit/vcf.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f950e34...fb29186. Read the comment docs.

@roohy
Copy link
Contributor Author

roohy commented Jan 25, 2022

Hi,
The error in the test process is raised by the mismatch between the VCF file with ID columns and the function 'legacy_write_vcf' which is implemented in the test_vcf.py to ensure compatibility with previous versions (there is also a minor Pylint issue). Is it OK if I change that function?

@benjeffery
Copy link
Member

Thanks for the PR @roohy! Will review today.

Copy link
Member

@benjeffery benjeffery left a comment

Choose a reason for hiding this comment

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

Great! Thanks @roohy!
I've made one small suggestion to simplify the testing.
Please go ahead and add a changelog and a note in the docs.

@roohy
Copy link
Contributor Author

roohy commented Jan 26, 2022

Changelog and docs added.

@benjeffery
Copy link
Member

Changelog and docs added.

Great, thanks. All that is left is to fix the failing test (tests/test_vcf.py::TestLegacyOutput) and run the linting pre-commit run --all. I can do those bits if you like?

@roohy
Copy link
Contributor Author

roohy commented Jan 27, 2022

Thank you! I tried doing them so as not to take any more of your time. Please let me know if I am still forgetting something.

@benjeffery benjeffery marked this pull request as ready for review January 27, 2022 11:28
@benjeffery benjeffery changed the title Issue 2103 Add site ID to VCF output Jan 27, 2022
Copy link
Member

@benjeffery benjeffery left a comment

Choose a reason for hiding this comment

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

I've squashed and rebased.
Thanks for this @roohy, great to have you on the contributors list.

@mergify mergify bot merged commit 137b645 into tskit-dev:main Jan 27, 2022
@roohy
Copy link
Contributor Author

roohy commented Jan 27, 2022

Thanks @benjeffery for your help. I hope I can make more/bigger contributions to your great software in the future!

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.

Variant IDs in write_vcf function

2 participants