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

Implements Targets.parse_alignment #20

Merged
merged 30 commits into from
Aug 26, 2019
Merged

Implements Targets.parse_alignment #20

merged 30 commits into from
Aug 26, 2019

Commits on Aug 12, 2019

  1. Set up Targets to have feature_parse_specs

    This changes how features are specified to `Targets`,
    in a way that will mesh with `parse_alignments`.
    jbloom committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    0c368b8 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2019

  1. update feature_parse_specs, add to RecA example

    Slightly altered specs for `feature_parse_specs` as
    described in docs for `Targets`. This allows the
    `feature_parse_specs` to also specifying filtering criteria.
    
    Then updated code to better check for correct targets / features
    in `feature_parse_specs` in `Targets.__init__`, and removed
    redundant code from `Targets.parse_alignment_cs`.
    
    Finally, added the feature parse specs YAML file for the RecA
    example and updated the corresponding Jupyter notebook.
    jbloom committed Aug 13, 2019
    1 Configuration menu
    Copy the full SHA
    783438d View commit details
    Browse the repository at this point in the history
  2. Targets feature_parse_specs as YAML or dict

    Now can pass and get `feature_parse_specs` as a YAML
    file or a dict.
    jbloom committed Aug 13, 2019
    Configuration menu
    Copy the full SHA
    f686f57 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2019

  1. Configuration menu
    Copy the full SHA
    3262f1b View commit details
    Browse the repository at this point in the history
  2. Initial docs and cs_to_mutation_count function

    Edited `regex` matching to handle custom `cs` '<clip#>' ops.
    khdcrawford committed Aug 22, 2019
    1 Configuration menu
    Copy the full SHA
    74760e2 View commit details
    Browse the repository at this point in the history
  3. Removed custom '<clipN>' cs notation.

    Instead of writing a script to process the '<clipN>' notation, I
    decided to stick with just using tuples to designate features
    that have clipping. This makes counting mutations and clipping
    easier.
    khdcrawford committed Aug 22, 2019
    1 Configuration menu
    Copy the full SHA
    dcdb543 View commit details
    Browse the repository at this point in the history
  4. Targets.parse_alignment_cs cs, clip separate col

    Return columns suffixes `_cs`, `_clip5`, and `_clip3`
    in `Targets.parse_alignment_cs`.
    jbloom committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    e994bb2 View commit details
    Browse the repository at this point in the history
  5. 2 Configuration menu
    Copy the full SHA
    af99af1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7c35ceb View commit details
    Browse the repository at this point in the history
  7. parse_alignment_cs only gets features in specs

    Previously `Targets.parse_alignment_cs` parsed **all**
    features; now it only parses the ones in
    `feature_parse_specs`.
    jbloom committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    3c3caf9 View commit details
    Browse the repository at this point in the history
  8. parse_alignment_cs does not return target clip

    Previously the `feature_parse_specs` and the returns
    from `parse_alignment_cs` included `target_clip5` and
    `target_clip3`. However, this is redundant with the feature-
    level clipping information, and so has been removed.
    
    The query clipping is retained as that is not redundant
    with feature-level clipping.
    jbloom committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    c480df0 View commit details
    Browse the repository at this point in the history
  9. Finished cs_to____ functions for parsing cs str.

    Still need to add more rigorous tests.
    khdcrawford committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    5c54039 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    786614f View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6c7c2fe View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2019

  1. update to new pandas and plotnine

    There are new vesions of `pandas` (0.25.1)
    and `plotnine` (0.6.0). Use those, and also
    update notebooks to have output from these;
    in particular the new `pandas` no longer shows
    the index in bold in data frames displayed in
    Jupyter notebooks.
    jbloom committed Aug 23, 2019
    Configuration menu
    Copy the full SHA
    44ab13c View commit details
    Browse the repository at this point in the history
  2. tweak functions to get mutations from cs tags

    Only major change is that mutations from ambiguous
    are **not** counted as mutations in mutation strings.
    
    Otherwise just streamline code.
    jbloom committed Aug 23, 2019
    2 Configuration menu
    Copy the full SHA
    4ac5e49 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    434c164 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fbf7fd8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aa03b38 View commit details
    Browse the repository at this point in the history
  6. Initial filtering on feature clipping.

    Likely has bugs, but general outline is there.
    khdcrawford committed Aug 23, 2019
    Configuration menu
    Copy the full SHA
    8a3797d View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2019

  1. tweaks to pass tests

    Fixed some formatting, reverted making
    `Targets.parse_alignment_cs` private; it's now public
    method again. We can re-visit whether to make it public
    later.
    jbloom committed Aug 24, 2019
    Configuration menu
    Copy the full SHA
    6ed3cf1 View commit details
    Browse the repository at this point in the history
  2. refactor Targets.__init__

    Simplify the initialization of `Targets`
    by modularizing operations like filling the defaults
    of `feature_parse_specs` and getting the names of
    features to parse in their own methods.
    
    Also, eliminated some redundant parameter checks that
    were confusing to read in the code.
    jbloom committed Aug 24, 2019
    Configuration menu
    Copy the full SHA
    a6a5790 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2019

  1. Update parse_alignments docs.

    Updates to `feature_parse_specs` input to `Targets`,
    and docs for `parse_alignments`.
    
    Specifically:
    
      - `parse_alignments` has different return described and
        can write CSV.
    
      - Previously there was a single `clip_count` in
        `feature_parse_specs`; now it is `clip5` and `clip3`
        separately. Example notebooks updated to reflect this.
    jbloom committed Aug 25, 2019
    Configuration menu
    Copy the full SHA
    70fa968 View commit details
    Browse the repository at this point in the history
  2. implement multi_align in alignment parsing

    Previously, the `multi_align` option to
    `Targets.parse_alignment_cs` was ignored and
    secondary alignments were not filtered.
    jbloom committed Aug 25, 2019
    Configuration menu
    Copy the full SHA
    fc49dde View commit details
    Browse the repository at this point in the history
  3. new parse_alignment skeleton

    The new `Targets.parse_alignment` is fully implemented
    except for the `Targets._parse_single_Alignment` method
    it utilizes.
    
    No testing yet.
    jbloom committed Aug 25, 2019
    Configuration menu
    Copy the full SHA
    f41b670 View commit details
    Browse the repository at this point in the history
  4. fully implemented Targets.parse_alignment

    The new `Targets.parse_alignments` is fully implemented
    and tested against `Targets._parse_alignments_csv` and
    for consistency in writing CSVs versus returning data frames.
    
    It still needs more testing for correctness of output and
    illustrative example.
    
    Also, added a parameter to `Targets` explicitly permittting
    the return of mutations / sequences of features with clipping;
    otherwise this is disallowed as it can give confusing results.
    jbloom committed Aug 25, 2019
    Configuration menu
    Copy the full SHA
    837fcc5 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2019

  1. minor code / doc cleanup and update test

    In addition to minor doc tweaks and slight code
    cleaning, implemented testing of `Targets.parse_alignment`
    in `test_Targets_parse_alignment.ipynb`.
    jbloom committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    682f837 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d2bd92 View commit details
    Browse the repository at this point in the history
  3. minor docs proofreading

    khdcrawford committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    b6a4f87 View commit details
    Browse the repository at this point in the history
  4. fix doc caught by @khdusenbury

    Fixes this:
    #20 (comment)
    jbloom committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    cee13bf View commit details
    Browse the repository at this point in the history