nanofilt
nanofilt copied to clipboard
no log file output
run nanofilt and add --logfile file options, but no log file output
Could you maybe add some more information?
I ran this command and expecting the log file to be output, but the log file was not output. "NanoFilt --readtype 1D --quality 7 --length 100 --logfile RS3_HS_Hela_siCTL.log RS3_HS_Hela_siCTL.fastq > RS3_HS_Hela_siCTL.filter.fastq"
Do you have write permission to the current directory? Did you get the filtered fastq file?
Yes,I have permission to the directory, and I get the filtered fastq file, but no log file
Our team is having this same issue. NanoFilt outputs a trimmed read but the logfile is nowhere to be seen.
NanoFilt --logfile full/path/to/cwd/trim_1.log --quality 10 SRR12142658.fastq > SRR12142658_trimmed1.fastq `
Are there any updates on this bug?
Which NanoFilt version are you running?
Which NanoFilt version are you running?
2.8.0; installed with conda
Same bug found here, running NanoFilt 2.8.0 from the quay Biocontainer (which I believe is built on conda) via Singularity. Definitely have write permissions and get an output file, but no log file. I put NanoFilt through its paces, so it should have something to report.
$ touch newfile
$ echo $?
0
$ rm newfile
$ gunzip < sample.fastq.gz | NanoFilt --logfile sample.nanofilt.log \
> --length 50 \
> --maxlength 10000 \
> --quality 6 \
> --minGC 0.01 \
> --maxGC 0.99 \
> --headcrop 1 \
> --tailcrop 1 | \
> gzip -9 > sample.trimmed.fastq.gz
$ [ -f sample.trimmed.fastq.gz ]
$ echo $?
0
$ [ -f sample.nanofilt.log ]
$ echo $?
1
I can confirm we have the same issue. This answer suggests to prepend the logging command
logging.basicConfig(
format='%(asctime)s %(message)s',
filename="logfile.txt",
level=logging.DEBUG)
with
for handler in logging.root.handlers[:]:
logging.root.removeHandler(handler)
I tested this in jupyter-lab and it solved the issue.
Are there any news about this error? it would be great if the log files will be written. I have tried the solution offered in the last comment and added this snippet just before the command in utils.py, but I still don't get any log files.
def start_logging(logfile):
try:
for handler in logging.root.handlers[:]:
logging.root.removeHandler(handler)
logging.basicConfig(
format='%(asctime)s %(message)s',
filename=logfile,
level=logging.INFO)
except PermissionError:
I have also changed the permissions to 777 for testing reasons, but no log files are written.
Are there any news about this error?
I have tried the solution offered in the last comment and added this snippet just before the command in utils.py, but I still don't get any log files.And an error occurred.
So I canceled these two lines of code.
Are there any news about this error? I have tried the solution offered in the last comment and added this snippet just before the command in utils.py, but I still don't get any log files.And an error occurred.
So I canceled these two lines of code.
This seems to be a problem with the indentations. I didn't get this error after adding the two lines. You need to make sure, that you keep the rows in the correct format.
Thank you. The problem has been solved and the result file has been generated
So how did you get the log file? my script still doesn't produce it?
@yeroslaviz Is to add two lines of code according to the method you use. Execute the following command: gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz
Ok I have now a log file. But is this correct to have only one line in the log file?
2022-06-29 14:48:17,621 NanoFilt finished.
I don't have anymore output here.
If everything went as expected, without any errors, then that is indeed the output in the log file that you would expect.
thanks for the help. I guess it can be closed now.