Skip to content

Test problematic variants#37

Merged
iskandr merged 16 commits intomasterfrom
test_problematic_variants
Mar 21, 2015
Merged

Test problematic variants#37
iskandr merged 16 commits intomasterfrom
test_problematic_variants

Conversation

@iskandr
Copy link
Copy Markdown
Contributor

@iskandr iskandr commented Mar 18, 2015

  • added unit test module for "problematic" variants (anything which raises an exception when annotating variants in the wild, e.g. from TCGA MAF files)
  • Variant now trims any shared suffix or prefix strings from ref and alt and adjusts the variant position accordingly. The position field has been renamed to start. The original variant fields are preserved as Variant.original_ref, Variant.original_alt, Variant.original_start. For example, if a VCF contains "chr1 10 CAG CATG", then the corresponding Variant object will have ref = "", alt = "T", start = 11, original_ref = "CAG", original_alt = "CATG", original_start = 10.
  • Renamed top_priority_transcript_effect to top_priority_effect (since we now have effects like Intergenic which aren't tied to a particular transcript)
  • Added ExonLoss as an effect
  • Reorganized the effect annotation logic in Variant to deal with variants which span feature boundaries (e.g. deletions which affect both an exon and its neighboring intron).
  • renamed VariantCollection.variant_effects to just VariantCollection.effects
  • renamed VariantCollection.variant_summary to VariantCollection.summary_string
  • added unit tests for misc. VariantCollection methods

Review on Reviewable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

will this code actually run? will nose call next() automatically on tests that return generators?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nvm, I googled, and the answer is yes! good to know http://nose.readthedocs.org/en/latest/writing_tests.html

@timodonnell
Copy link
Copy Markdown
Contributor

I didn't check all the logic here (really unit tests are the only way), and sounds like much of this will change if you move to the ref_position_before and ref_position_after way of localizing variants, but from looking at what you have so far I don't see any major flaws

@iskandr
Copy link
Copy Markdown
Contributor Author

iskandr commented Mar 21, 2015

Did anything stand out as particularly in need of more/any unit tests?

iskandr added a commit that referenced this pull request Mar 21, 2015
@iskandr iskandr merged commit 023f27b into master Mar 21, 2015
@iskandr iskandr deleted the test_problematic_variants branch March 21, 2015 18:02
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