Closed AMCalejandro closed 1 year ago
Not sure I understand what exactly the ask is here, could you try explaining in a different way? Or even better make a Pull Request with the change implemented? I'm not sure when I would have time to implement an enhancement change like this myself.
What I am saying is that the logs derived from the _log_mungesumstatsmsgs, and _log_folderind in format_sumstats() have a hard coded name.
What would be nice is that the function takes the filename from the input ( similar to what _savepath argument does), and write the logs using the same string than _savepath (without file extension), as the prefix to name the log files.
Otherwise, the files get overwritten if you iteratively format some sumstats
Yep that makes sense, thanks! I'll look to add this in the next development cycle.
Cheers, Alan.
Hey!
So got some time to have a look at this and just two things. Firstly, you can control where the log messages are stored using the log_folder
parameter. The documentation states:
Filepath to the directory for the log files and the log of MungeSumstats messages to be stored. Default is a temporary directory.
I think this should remain separate to the save path parameter as I know of users who like to store these separately. However, I agree the hardcoded names might not be the best solution. So I have updated the code (v1.7.1) so the name of the log files (log messages and log outputs) are the same as the name of the file specified in the save path parameter with the extension '_log_msg.txt' and '_log_output.txt' respectively. I think taking the name from the file name in the save path makes more sense than the input path (remember sumstats in memory can also be passed as input rather than just paths).
Let me know if this doesn't answer the issues you were noting?
Cheers, Alan.
Yeah that is good, I will test it shortly. Thanks Alan.
Is your feature request related to a problem? Please describe. It would be nice that when I set log folder, to save log_mungesumstats_msgs and log_folder_ind, format_sumstats took the name from the input data to save the logs
Describe the solution you'd like I am running mungesumstats for a bunch of gwas, and I would like to see the logs of all of them and run a small script in the bg
A code example would be:
The input data
In this context, the log files would be rewritten every step of the mapping, which is unfortunate
Thanks