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

Adds checks for removal of ORFs during scoring. #25

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

samhorsfield96
Copy link
Collaborator

Addresses out of range error, where occasionally multithreading will cause the same item to be remove from a map twice.

@johnlees
Copy link
Member

The OS X tests are timing out here:

Fri, 24 Nov 2023 12:05:52 GMT 100%|██████████| 1/1 [00:00<00:00, 31300.78it/s]
Fri, 24 Nov 2023 12:05:55 GMT trimming contig ends...
Fri, 24 Nov 2023 12:05:55 GMT refinding genes...
Fri, 24 Nov 2023 12:05:55 GMT Number of searches to perform:  41
Fri, 24 Nov 2023 12:05:55 GMT Searching...
Fri, 24 Nov 2023 17:53:05 GMT Error: The operation was canceled.

Comment on lines +405 to +408
if (centroid_entry == colour_ORF_vec_map[centroid_ID_pair.first].end())
{
continue;
}
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to refactor this whole thing as an if/else rather than using continue (which can be a bit hard to follow). But doesn't matter too much – if that's difficult because it's a long or complex loop this is fine

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's because the loop is parallelised, I'm not sure an if/else block would work with how openmp wants for loops to be structured.

@samhorsfield96
Copy link
Collaborator Author

The OS X tests are timing out here:

Fri, 24 Nov 2023 12:05:52 GMT 100%|██████████| 1/1 [00:00<00:00, 31300.78it/s]
Fri, 24 Nov 2023 12:05:55 GMT trimming contig ends...
Fri, 24 Nov 2023 12:05:55 GMT refinding genes...
Fri, 24 Nov 2023 12:05:55 GMT Number of searches to perform:  41
Fri, 24 Nov 2023 12:05:55 GMT Searching...
Fri, 24 Nov 2023 17:53:05 GMT Error: The operation was canceled.

I've worked out why this is happening - the OSX implementation doesn't work with the python shared memory objects being used. I'm planning to rewrite these sections fully in C++ to avoid this issue entirely.

@samhorsfield96 samhorsfield96 merged commit a59b553 into master Mar 6, 2024
1 of 2 checks passed
@samhorsfield96 samhorsfield96 deleted the oor_error branch March 6, 2024 10:08
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.

2 participants