vaquerizaslab / fanc

FAN-C: Framework for the ANalysis of C-like data
GNU General Public License v3.0
107 stars 14 forks source link

Virtual 4C on different chromosomes #124

Open Lucas446 opened 2 years ago

Lucas446 commented 2 years ago

Hi,

I am trying to get virtual 4C data using this code (https://github.com/vaquerizaslab/fanc/issues/29#issuecomment-757898287)

# get y values
submatrix = hic.matrix((viewpoint, region), norm=True, oe=False)
v4c_signal = np.nanmean(submatrix, axis=0)

# get x values
x = []
for r in hic.regions(region):
    x.append(r.center)

It is working well when the viewpoint and the region are in cis on the same chromosome arm. However when I have the viewpoint and the region on different chromosomes the Observed/Expected are always below 1 and quantized.

It is even possible with FANC to get a virtual 4C on different chromosomes ?

Additionally, how to get p-value in a case of virtual 4C, in order to sort to contacts by significance ?

Thanks a lot for your help, Best, Tanguy

liz-is commented 2 years ago

Hi,

By default normalisation is carried out on each chromosome individually - see the Note on this page. You likely want to renormalise with the --whole-matrix if you are interested in inter-chromosomal data.

FAN-C doesn't have a built-in method for giving a p-value for virtual 4C - I'd suggest looking into 4C-specific packages or loop-calling approaches, depending on what exactly you're interested in.