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

Refactor clean_obs_names #532

Merged
merged 11 commits into from
Jul 14, 2021

Commits on Jul 13, 2021

  1. Configuration menu
    Copy the full SHA
    9e04132 View commit details
    Browse the repository at this point in the history
  2. Refactor if clause check

    Checking if all observation names are of equal length can entirely be
    done using Pandas functionality. This looks slightly cleaner.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    d5fe462 View commit details
    Browse the repository at this point in the history
  3. Rename variables

    Rename
    * `ID_length`  to `id_length` to consistently use lower case
    letters for variables.
    * `newIDs` and `newID` to `new_obs_names` and `new_obs_name` to have
    clearer names and consistently use lower case letters and snake case for
    variable names.
    * `id` to `new_obs_name` to use more informative name.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    f19f58e View commit details
    Browse the repository at this point in the history
  4. Remove variable names

    Refactor code to not rely on variable `names` but use adata.obs_names
    directly.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    1b79dd4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bdc706b View commit details
    Browse the repository at this point in the history
  6. Rename argument data to adata

    The argument `data` needs to be an `AnnData` object. The argument name
    should convey this.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    c45bb61 View commit details
    Browse the repository at this point in the history
  7. Refactor calculation of start and end position

    Makes use of regex expression instead of relying on custom function.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    a4f6e35 View commit details
    Browse the repository at this point in the history
  8. Refactor else clause

    * Use regex expression to find start and end positions.
    * Apply to each observation using map on Pandas index.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    c3d1b25 View commit details
    Browse the repository at this point in the history
  9. Update docs

    Update docs to match new argument names.
    WeilerP committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    7880b11 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2021

  1. Reorder code

    Move `adata.obs_names_make_unique()` up to group similar parts of the
    code together.
    WeilerP committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    b4bc19a View commit details
    Browse the repository at this point in the history
  2. Refactor prefix definition

    Refactor definition of prefixes when observation names have same length.
    WeilerP committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    d903fdb View commit details
    Browse the repository at this point in the history