"straginst kmerize --filter ..." crashing
Closed this issue · 2 comments
I hadn't used kmerize -F in quite a while, but I have a current need for it. Looks like thresholds
is (min, mode, max) when you are only trying to print min and max.
% straingst kmerize -F D1CLVACXX.1.Solexa-125092.aligned.bam
2022-06-03 10:07:00,681 - INFO:root:K-merizing file D1CLVACXX.1.Solexa-125092.aligned.bam...
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/logging/init.py", line 1025, in emit
msg = self.format(record)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/logging/init.py", line 869, in format
return fmt.format(record)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/logging/init.py", line 608, in format
record.message = record.getMessage()
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/logging/init.py", line 369, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/anaconda3/envs/strainge/bin/straingst", line 11, in
sys.exit(straingst_cli())
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/main.py", line 110, in call
self.run(args)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/registry.py", line 83, in run
rc = subcommand_func(**args_dict)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/kmersets.py", line 195, in call
"range [%d, %d] are kept.", *thresholds)
Message: 'Filtered kmerset. Only k-mers within frequency range [%d, %d] are kept.'
Arguments: (37, 114, 884)
2022-06-03 10:08:30,125 - INFO:root:Writing k-merset to None
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/strainge/bin/straingst", line 11, in
sys.exit(straingst_cli())
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/main.py", line 110, in call
self.run(args)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/registry.py", line 83, in run
rc = subcommand_func(**args_dict)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/cli/kmersets.py", line 201, in call
kmerset.save(output, compress=True)
File "/usr/local/anaconda3/envs/strainge/lib/python3.7/site-packages/strainge/kmertools.py", line 544, in save
if not file_name.endswith(".hdf5"):
AttributeError: 'NoneType' object has no attribute 'endswith'
The exact BAM from the crash above is on Broad filesystems in /gsap/archive-bacterial/Users/Bruce/pilondata/f11_on_h37rv
Ah thanks, I will fix the logging issue.
I think the main error is caused by the lack of an output filename given (-o
) on the command line. StrainGE should give a better error message in that case.