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

Creating log files #76

Merged
merged 6 commits into from
Jul 10, 2024
Merged

Creating log files #76

merged 6 commits into from
Jul 10, 2024

Conversation

rnmitchell
Copy link
Contributor

RebJ has requested that lusSTR creates and stores log files. Since snakemake already creates log files but stores them within the .snakemake dir, I copy those files into a new logs directory within the wd. The log is saved within a dir named with the date and time of the run, creating a new dir for each run. The config file and input file(s) are also copied to this dir (at RebJ's request).

@rnmitchell rnmitchell marked this pull request as ready for review July 8, 2024 20:30
@rnmitchell rnmitchell assigned rnmitchell and standage and unassigned rnmitchell Jul 8, 2024
@rnmitchell
Copy link
Contributor Author

Ready for your review @standage

"WD",
str(inputfile),
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the significance of this change throughout this test script.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was erring out with just using the WD. Really, the input doesn't matter because it's skipping the initial convert step anyway for all of these tests.

Comment on lines +18 to +27
def create_log(log):
now = datetime.now()
dt = now.strftime("%m%d%Y_%H_%M_%S")
shell("mkdir -p logs/{dt}/input/")
shell("cp {log} logs/{dt}/strs.log")
if os.path.isdir(input_name):
shell("cp {input_name}/* logs/{dt}/input/")
else:
shell("cp '{input_name}' logs/{dt}/input/")
shell("cp snp_config.yaml logs/{dt}/")
Copy link
Member

Choose a reason for hiding this comment

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

Is the log argument to this function a path to the Snakemake logfile in $WD/.snakemake/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it must be built in.

@standage standage merged commit aac73a4 into master Jul 10, 2024
2 checks passed
@standage standage deleted the logs branch July 10, 2024 17:02
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