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

updated the comparison function format #73

Merged
merged 4 commits into from
Jan 8, 2024

Conversation

waterflow80
Copy link
Collaborator

@waterflow80 waterflow80 commented Dec 22, 2023

closes #71
Updated the comparison function format as discussed in issue #71 .

The new comparison result of comparing these two seqcol objects: 3mTg0tAA3PS-R1TzelLVWJ2ilUzoWfVq and rkTW1yZ0e22IN8K-0frqoGOMT8dynNyE is :

{
    "digests": {
        "a": "3mTg0tAA3PS-R1TzelLVWJ2ilUzoWfVq",
        "b": "rkTW1yZ0e22IN8K-0frqoGOMT8dynNyE"
    },
    "attributes": {
        "a_and_b": [
            "sequences",
            "names",
            "lengths",
            "md5_sequences",
            "sorted_name_length_pairs"
        ],
        "a_only": [],
        "b_only": []
    },
    "array_elements": {
        "a": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 16,
            "sequences": 16,
            "sorted_name_length_pairs": 16
        },
        "b": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 16,
            "sequences": 16,
            "sorted_name_length_pairs": 16
        },
        "a_and_b": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 0,
            "sequences": 16,
            "sorted_name_length_pairs": 0
        },
        "a_and_b_same_order": {
            "lengths": true,
            "md5_sequences": true,
            "names": null,
            "sequences": true,
            "sorted_name_length_pairs": null
        }
    }
}

Implemented the logic described here.

@@ -19,21 +19,22 @@ public class SeqColComparisonResultEntity {
/**
* The "arrays" attribute contains three sub-attributes:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The "arrays" attribute contains three sub-attributes:
* The "attributes" contains three sub-attributes:

@@ -19,21 +19,22 @@ public class SeqColComparisonResultEntity {
/**
* The "arrays" attribute contains three sub-attributes:
* "a_only", "b_only", "a_and_b"*/
private SortedMap<String, List<String>> arrays;
private SortedMap<String, List<String>> attributes;

/**
* The "elements" attribute contains three sub-attributes:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The "elements" attribute contains three sub-attributes:
* The "array_elements" attribute contains three sub-attributes:

@tcezard
Copy link
Member

tcezard commented Jan 6, 2024

The change looks good but there is one late change in the specs we should reflect (see here) I would wait for this ADR to be merged before finalising though

@waterflow80
Copy link
Collaborator Author

See latest commit, with the following comparison result:

{
    "digests": {
        "a": "3mTg0tAA3PS-R1TzelLVWJ2ilUzoWfVq",
        "b": "rkTW1yZ0e22IN8K-0frqoGOMT8dynNyE"
    },
    "attributes": {
        "a_and_b": [
            "sequences",
            "names",
            "lengths",
            "md5_sequences",
            "sorted_name_length_pairs"
        ],
        "a_only": [],
        "b_only": []
    },
    "array_elements": {
        "a_count": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 16,
            "sequences": 16,
            "sorted_name_length_pairs": 16
        },
        "b_count": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 16,
            "sequences": 16,
            "sorted_name_length_pairs": 16
        },
        "a_and_b_count": {
            "lengths": 16,
            "md5_sequences": 16,
            "names": 0,
            "sequences": 16,
            "sorted_name_length_pairs": 0
        },
        "a_and_b_same_order": {
            "lengths": true,
            "md5_sequences": true,
            "names": null,
            "sequences": true,
            "sorted_name_length_pairs": null
        }
    }
}

@waterflow80 waterflow80 merged commit ca90fc9 into EBIvariation:main Jan 8, 2024
1 check passed
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.

Update the format of the comparison function output
4 participants