Skip to content

NameError: free variable 'mask' referenced before assignment in enclosing scope #387

@kstagaman

Description

@kstagaman

checkm was working totally fine for me just a few days ago, but now even running the checkm test gives me this following error:

checkm test ~/checkm_test_results
[2024-01-31 17:56:43] INFO: CheckM v1.2.2
[2024-01-31 17:56:43] INFO: checkm test /home/checkm_test_results
[2024-01-31 17:56:43] INFO: CheckM data: /home/checkm_databases
[2024-01-31 17:56:43] INFO: [CheckM - Test] Processing E.coli K12-W3310 to verify operation of CheckM.
[2024-01-31 17:56:43] INFO: [Step 1]: Verifying tree command.
[2024-01-31 17:56:43] INFO: [CheckM - tree] Placing bins in reference genome tree.
[2024-01-31 17:56:43] INFO: Identifying marker genes in 1 bins with 1 threads:
    Finished processing 1 of 1 (100.00%) bins.
[2024-01-31 17:56:55] INFO: Saving HMM info to file.
[2024-01-31 17:56:55] INFO: Calculating genome statistics for 1 bins with 1 threads:
    Finished processing 1 of 1 (100.00%) bins.
[2024-01-31 17:56:55] INFO: Extracting marker genes to align.
[2024-01-31 17:56:55] INFO: Parsing HMM hits to marker genes:
    Finished parsing hits for 1 of 1 (100.00%) bins.
[2024-01-31 17:56:55] INFO: Extracting 43 HMMs with 1 threads:
    Finished extracting 43 of 43 (100.00%) HMMs.
[2024-01-31 17:56:56] INFO: Aligning 43 marker genes with 1 threads:
Process Process-8:ing 0 of 43 (0.00%) marker genes.
Traceback (most recent call last):
  File "/_admin/build/bld/python/ntjcyzuaylge/lib/python3.10/multiprocessing/process.py", line
 314, in _bootstrap
    self.run()
  File "/_admin/build/bld/python/ntjcyzuaylge/lib/python3.10/multiprocessing/process.py", line
 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/.local/lib/python3.10/site-packages/checkm/hmmerAligner.py", line 272, in _alignMarkerParallel
    self._alignMarker(markerId, markerSeqs[markerId], markerStats[markerId], bReportHitStats, alignOutputDir, hmmModelFi
les[markerId], bKeepUnmaskedAlign)
  File "/home/.local/lib/python3.10/site-packages/checkm/hmmerAligner.py", line 297, in _alignMarker
    self._maskAlignment(alignSeqFile, makedSeqFile)
  File "/home/.local/lib/python3.10/site-packages/checkm/hmmerAligner.py", line 356, in _maskAlignment
    maskedSeq = ''.join([seq[i] for i in range(0, len(seq)) if mask[i] == 'x'])
  File "/home/.local/lib/python3.10/site-packages/checkm/hmmerAligner.py", line 356, in <listcomp>
    maskedSeq = ''.join([seq[i] for i in range(0, len(seq)) if mask[i] == 'x'])
NameError: free variable 'mask' referenced before assignment in enclosing scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions