Skip to content

Refactor read_dist() #13

Open
Open

Description

@kelly-sovacool

read_dist() should check whether the file provided is a lower triangular distance matrix, a square matrix, or not a valid format.

Details on phylip-formatted distance matrices: https://mothur.org/wiki/phylip-formatted_distance_matrix/#:~:text=The%20basic%20format%20of%20a,sequence%20to%20the%20other%20sequences.

Note: phyloseq::import_mothur_dist() exists, but we should have our own version because:

  • That function returns a matrix, but we like dataframes.
  • We don't want to have many external dependencies.

Activity

  1. kelly-sovacool commented on Oct 13, 2020

    @kelly-sovacool
    MemberAuthor

    @NLesniak I wonder if read_dist() should have a more specific name since it is specifically for phylip-formatted lower triangular matrices, and not for square matrices or mothur's column format? e.g. read_mtx_phylip() or something like that?

  2. NLesniak commented on Oct 15, 2020

    @NLesniak
    Collaborator

    @kelly-sovacool do you think we should rename this and have a specific function for each or add the ability to read different input types to this function?

  3. kelly-sovacool commented on Oct 15, 2020

    @kelly-sovacool
    MemberAuthor

    @NLesniak perhaps both? For now maybe we should rename this one to something phylip-specific. If we want/need to add support for other file types, we would add those as functions following a similar naming scheme. Potentially then read_dist() could become a wrapper around those functions with a file type parameter.

  4. kelly-sovacool commented on Mar 20, 2023

    @kelly-sovacool
    MemberAuthor
  5. changed the title [-]read_dist() input validation[/-] [+]Refactor `read_dist()`[/+] on Mar 20, 2023
  6. changed the title [-]Refactor `read_dist()`[/-] [+]Refactor read_dist()[/+] on Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions