robinweide / GENOVA

GENome Organisation Visual Analytics
GNU General Public License v3.0
70 stars 15 forks source link

APA results only contains a minimum part of original loops #331

Open Devalock opened 1 year ago

Devalock commented 1 year ago

Hi, I've used GENOVA with latest version (1.0.0 The Cartographer) to do APA, and I wanted to export the quantifying results to see foldchanges of each loop. While I have 15184 original loops (which is sorted and uniqed so there's no identical loops) as input, the result only contains 7342 records, corresponding to 3671 loops. Could anyone help explain this? I didn't found any solution in manual or elsewhere. I think it's important and really appreciate the answers!

Here is my code:

WT <- load_contacts(signal_path = 'WT_10000_iced.matrix', indices_path = 'WT_10000_abs.bed', sample_name = "WT", colour = "dodgerblue")
MUT <- load_contacts(signal_path = 'MUT_10000_iced.norm.matrix', indices_path = 'MUT_10000_abs.bed', sample_name = "MUT", colour = "orange") # just regular HiC-Pro outputs

Loops = read.delim('WT_loops.bedpe', h = F)
dim(Loops)
[1] 15184     7
APA_Loops <- APA(list("WT" = WT,'MUT' = MUT),bedpe = Loops, outlier_filter = c(0, 1))
quantifyAPA_out <- quantify(APA_Loops)$per_loop
dim(quantifyAPA_out)
[1] 7342   12

And here is my loop file. WT_loops.bedpe.gz

Thank you sir @teunbrand if you could help take a look!

teunbrand commented 1 year ago

I think it might be the dist_thres argument of APA(). If you set APA(..., dist_thres = c(0, Inf)), does that retain all loops?

Devalock commented 1 year ago

I think it might be the dist_thres argument of APA(). If you set APA(..., dist_thres = c(0, Inf)), does that retain all loops?

Indeed, with dist_thres = c(0, Inf), the result contains almost all the loops. I thought there was no threshold since ?APA shows the default parameter as dist_thres = NULL. Much appreciated!

teunbrand commented 1 year ago

I thought there was no threshold since ?APA shows the default parameter as dist_thres = NULL

Yeah maybe the documentation should be a bit clearer on this.