Skip to content

UnboundLocalError: local variable 'out_bam_file' referenced before assignment #954

@NJU-Bio-Info

Description

@NJU-Bio-Info

When I run:

hicBuildMatrix -s ../../2.map/r1.sam ../../2.map/r2.sam -o hic_matrix.h5 --binSize 10000 --QCfolder QC --doTestRun --outBam TestRun.bam -rs DpnII.bed HinfI.bed -seq GATC GA.TC --danglingSequence GATC A.T

it throw an error message:

Traceback (most recent call last):
  File "/share/apps/anaconda3/envs/python3_2/bin/hicBuildMatrix", line 7, in <module>
    main()
  File "/share/apps/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicBuildMatrix.py", line 270, in main
    pKeepSelfCircles=args.keepSelfCircles, pKeepSelfLigation=args.keepSelfLigation, pGenomeAssembly=args.genomeAssembly)
  File "/share/apps/hicexplorer/lib/python3.8/site-packages/hicexplorer/lib/buildMatrixMethods.py", line 1169, in createMatrix
    out_bam_file.write(mate1)
UnboundLocalError: local variable 'out_bam_file' referenced before assignment

hicBuildMatrix version info:

hicBuildMatrix 3.7.6

How can I solve it?

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