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

Unify Python and C++ scripts into a single C++ script #30

Merged
merged 3 commits into from
Dec 10, 2021
Merged

Conversation

acrinklaw
Copy link
Contributor

No description provided.

@acrinklaw
Copy link
Contributor Author

@danielmarrama this should produce the same output that the Python script did before and clear up all issues at once. Unity has been achieved. Please give it a test and make sure things look ok. I did not spend too much time ensuring the minor details like fixing the readme, ensuring the table is in the right order, etc. The last thing I need to do now is to add a default output file, right now it writes to std out.

@wchronister
Copy link
Contributor

wchronister commented Dec 9, 2021

This commit should resolve issues with n identical database match sequences leading to n^2 rows in results (e.g. 5 matches with ASSLAPGATNEKLF became 25 rows in output). I implemented a find() function to check for a unique combination of input sequence, match sequence, score, and input sequence index. If it's unique, add it to the results vector; if it is not unique, (e.g. if it's a match with num. 2-5 of the 5 identical IEDB sequences), then skip it, since the first match will be expanded to 5 rows of results later on, using iedb_map.

I also moved the iedb_map generation below the argument parsing to ensure that the -d parameter is checked for a user-chosen path before iedb_map is generated. Previously, the script was using the default value of iedb_file, "data/IEDB_data.tsv", to create iedb_map, and using the user's database path for iedb_data, leading to empty output.

@dmx2
Copy link
Contributor

dmx2 commented Dec 10, 2021

@wchronister @acrinklaw Tested. This is good to go.

@acrinklaw acrinklaw merged commit 465d081 into master Dec 10, 2021
@acrinklaw acrinklaw deleted the unity branch July 14, 2022 16:48
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.

3 participants