Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hicAggregateContacts: list index out of range #825

Closed
Lucas446 opened this issue Nov 3, 2022 · 2 comments
Closed

hicAggregateContacts: list index out of range #825

Lucas446 opened this issue Nov 3, 2022 · 2 comments

Comments

@Lucas446
Copy link

Lucas446 commented Nov 3, 2022

Hi,

I am using HiCexplorer hicAggregateContacts function to get the contacts between a set of genomic positions (.bed file).

head of my bed file:

chr3R 11371536 11373001
chr3R 16249423 16250737
chr3R 30911966 30912930
chr3R 16811677 16812290
chr3R 8181381 8182042
chr3R 7000639 7001267
chr3R 7037218 7037914
chr3R 16899483 16900033
chr3R 16829995 16830605
chr3R 4852336 4852868

first line of the validPair.bam:

NB551631:263:HTCJYAFX3:1:11101:17094:1026 81 chr3R 17458342 60 4S71M chr3L 8205337 0 TGATCGATCTCAACGAAGCATTCATATCGATATGCAGCCAGTATTAAATGCAATTTATGCAAATTTTTGNCATCA E/<EEAEAEEE/EEEEA/A/EEEAEE6EEEEE/EEEEEE/EE//EE//EEAE/EEEAEE/E///EE/EE#AAA/A NM:i:1 MD:Z:65C5 AS:i:69 XS:i:0

HiCexplorer command for hicAggregateContacts:

hicAggregateContacts -m ${FILE} --outFileName norm_smallest_esc_CyO_St10_St14cat_st10_25000bp_norm_ICE_autoCorr --BED ${BED} --mode ${MODE[1]} --range ${RANGE} --numberOfBins ${NUMBERofBINS} --transform ${TRAN[2]} --operationType ${OPTYPE[1]} --largeRegionsOperation ${LRO[0]} --outFilePrefixMatrix norm_smallest_esc_CyO_St10_St14cat_st10_25000bp_norm_ICE_autoCorr --outFileContactPairs ContactPairs --outFileObsExp FileObsExp --diagnosticHeatmapFile diagnosticHeatmapFile --chromosomes chr3R

The h5 resolution is 5000bp
RANGE="300000:1000000"
NUMBERofBINS=30

Here is the error I get:

Traceback (most recent call last):
File "/opt/miniconda3/envs/HiCexplorer_env/bin/hicAggregateContacts", line 7, in
main()
File "/opt/miniconda3/envs/HiCexplorer_env/lib/python3.9/site-packages/hicexplorer/hicAggregateContacts.py", line 915, in main
bed_intervals = read_bed_per_chrom(args.BED, chrom_list, args.considerStrandDirection)
File "/opt/miniconda3/envs/HiCexplorer_env/lib/python3.9/site-packages/hicexplorer/hicAggregateContacts.py", line 254, in read_bed_per_chrom
if fields[0] not in chrom_list:
IndexError: list index out of range

I don't understand what is wrong,

Thanks for your help,
Best,
Tanguy

@lldelisle
Copy link
Collaborator

Hi,
You may have an empty line in your file. Could you do a tail of your bed file?
Thanks

@Lucas446
Copy link
Author

Lucas446 commented Nov 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants