-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Ready for your review @standage |
"WD", | ||
str(inputfile), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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}/") |
There was a problem hiding this comment.
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/
?
There was a problem hiding this comment.
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.
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 newlogs
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).