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

Extra logging and hmmsearch fix #87

Merged
merged 13 commits into from
Feb 16, 2023
Merged

Conversation

malanjary-wur
Copy link
Contributor

Latest updates to improve stability

Copy link
Owner

@gamcil gamcil left a comment

Choose a reason for hiding this comment

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

Sorry it took a while to get around to looking at this PR. Mostly happy with everything, would just like to take out the specific CAGECAT stuff.

@@ -131,7 +134,13 @@ def write_profiles(profiles: Collection[str], output: str=None) -> str:
output: name of output file
"""
if not output:
output = datetime.now().strftime("cblaster_%Y%m%d%H%M%S.hmm")
counter = 0
output = Path(cagecat_prefix, datetime.now().strftime(f"cblaster_%Y%m%d%H%M%S-{counter}.hmm"))
Copy link
Owner

Choose a reason for hiding this comment

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

Can we generalise this and take out the hardcoded CAGECAT stuff here? (e.g. add an output folder to the arguments for write_profiles)

@@ -149,7 +158,10 @@ def run_hmmsearch(fasta, query):
temp_res: List, String of result file names
"""
LOG.info("Performing hmmsearch")
output = Path(query).with_suffix(".txt")
output = Path(cagecat_prefix, query).with_suffix(".txt")
Copy link
Owner

Choose a reason for hiding this comment

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

Here as well, on the CAGECAT side can you just have cagecat_prefix as part of query when you pass it to the function?

@malanjary-wur
Copy link
Contributor Author

malanjary-wur commented Feb 14, 2023 via email

@malanjary-wur
Copy link
Contributor Author

malanjary-wur commented Feb 15, 2023 via email

@gamcil
Copy link
Owner

gamcil commented Feb 16, 2023

Yeah I have noticed that error and have made pretty much the exact same fix for the next release.

It might just be quicker if I edit the PR directly - I think the easiest way will be to just use temporary files here, which will also remove the need to generate the unique name from a timestamp. Do you do anything special on the CAGECAT side with the HMM files or just delete them post search?

@gamcil gamcil merged commit f15dd00 into gamcil:master Feb 16, 2023
@malanjary-wur
Copy link
Contributor Author

malanjary-wur commented Feb 16, 2023 via email

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