open2c / coolpuppy

A versatile tool to perform pile-up analysis on Hi-C data in .cool format.
MIT License
77 stars 11 forks source link

TypeError: unsupported operand type(s) for +: 'int' and 'str' #155

Open ratheraarif opened 1 month ago

ratheraarif commented 1 month ago

I received the following error: TypeError: unsupported operand type(s) for +: 'int' and 'str'

when I execute the following code

pup_MT = coolpup.pileup(clr_MT, df_arm_p_pairs, features_format='bedpe', trans=True, expected_df=trans_expected_MT, flank = 50000, rescale=False)

df_arm_p_pairs file looks like this

image

Actually I want to know the pileup of telomeric telomeric interaction. I can find the pile up of Centro Centro interaction for which the file looks similar. However, I receive the above error when I do so for telo telo

Any suggestion?

ratheraarif commented 1 month ago

Oh! there was a minor error I rectified that, however, I now got the different error

ValueError: No chromosomes are in common between the coordinate file and the cooler file. Are they in the same format, e.g. starting with "chr"?

however, as I can see the chromnames match perfectly

clr_MT.chromnames gives:

'chr1', 'chr2', 'chr3', 'chr4', 'chr5', 'chr6', 'chr7', 'chr8', 'chr9', 'chr10', 'chr11', 'chr12', 'chr13', 'chr14', 'chr15', 'chr16'

and the df_arm_p_pairs file also have same chromnames

image
efriman commented 1 month ago

Your regions are then being filtered out for some reason. Can you try with format="bed", it should do the same the way you've constructed the peak file

ratheraarif commented 1 month ago

This again raises an obvious error:

AssertionError: Column names must include chrom, start, and end

image

Pleas note that centro-centro file given below works fine with format set to bedpe

image

The problem is only with the Telomere-Telomere file

ratheraarif commented 1 month ago

I found a way to run the code. but instead of signal being aggregated at the centre its located at the corner like here.

image

I am not sure how should I set the flank. Please note that these are the telomeres of yeast.