Key error running HiCKRy.py

52 views
Skip to first unread message

Daiane Hemerich

unread,
Aug 19, 2022, 2:24:16 PM8/19/22
to Fit-Hi-C
Hi,

I'd like to run FitHiC2 using a publicly available validPairs file generated from human heart.

To create the contact files I run:
sh validPairs2FitHiC-fixedSize.sh 10000 myfile myfile_validPairs.txt .

To create the fragment files I run:
python createFitHiCFragments-fixedsize.py --chrLens fithic_protocol_data/data/referenceGenomes/hg19wY-lengths --resolution 10000 --outFile myfile.fragmentsfile.gz

My contact file looks like:

10 100005000 10 100005000 17
10 100005000 10 100015000 19
10 100005000 10 100025000 3
10 100005000 10 100035000 3
10 100005000 10 100045000 6
10 100005000 10 100055000 7
10 100005000 10 100065000 2
10 100005000 10 100075000 2
10 100005000 10 100095000 1
10 100005000 10 100105000 6

The fragment file looks like:

1 0 5000 1 1
1 10000 15000 1 1
1 20000 25000 1 1
1 30000 35000 1 1
1 40000 45000 1 1
1 50000 55000 1 1
1 60000 65000 1 1
1 70000 75000 1 1
1 80000 85000 1 1
1 90000 95000 1 1

 

But I when creating the bias file with HiCKRy.py, I get the error:

Creating sparse matrix...
Traceback (most recent call last):
File "fithic/fithic/utils/HiCKRy.py", line 283, in 
main()
File "fithic/fithic/utils/HiCKRy.py", line 276, in main
matrix,revFrag = loadfastfithicInteractions(args.interactions, args.fragments)
File "fithic/fithic/utils/HiCKRy.py", line 46, in loadfastfithicInteractions
y.append(fragDic[chrom2][mid2])
KeyError: 82155000

Were my fragment and contact files created incorrectly? How to solve the key error?

Thank you,


Reply all
Reply to author
Forward
0 new messages