robinweide / GENOVA

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

Error in APA analysis #312

Open jiangshan529 opened 1 year ago

jiangshan529 commented 1 year ago

Hello, I have two hic files, I read them to R using the codes:

WT <- load_contacts(signal_path = 'GSM4754923_WT_E14_MN_rep1_filtered.hic',sample_name='WT')
KO <- load_contacts(signal_path = 'GSM4754925_Maz_KO_MN_rep1_filtered.hic',sample_name='KO')
peak <- read.delim('left_right_CTCF1.txt',sep = '\t',h = F,stringsAsFactors = F)

and when I run APA like this:

apa <- APA(list(WT = WT, KO = KO), bedpe = peak)

there is an error:

Error: Indices of experiment(s) 2 are not equal to indices of experiment 1

So how to deal with this? Thanks!

teunbrand commented 1 year ago

Hi there,

Have you tried the sync_indices() function? E.g.

explist <- sync_indices(list(WT, KO))
apa <- APA(explist, bedpe = peaks)
jiangshan529 commented 1 year ago
apa <- APA(explist, bedpe = peaks)

Hi, another error: 'Error in value[[1L]] : subscript out of bounds'

teunbrand commented 1 year ago

I made a typo, I meant bedpe = peak instead of peaks. Is it specifically APA() that gives this error, or do others give this error as well? If it is just APA(), can you show me the output of head(peak)?

jiangshan529 commented 1 year ago

Hi, I know there's a typo, so I changed it. APA runs successfully. head(peak) shows this: V1 V2 V3 V4 V5 V6 1 chr19 3290000 3300000 chr19 3440000 3450000 2 chr19 8570000 8580000 chr19 8680000 8690000 3 chr16 42160000 42170000 chr16 44060000 44070000 4 chr16 44760000 44770000 chr16 45090000 45100000 5 chr16 44760000 44770000 chr16 45630000 45640000 6 chr16 62940000 62950000 chr16 64740000 64750000

teunbrand commented 1 year ago

Ah good, so this issue appears to be resolved then?

jiangshan529 commented 1 year ago

Ah good, so this issue appears to be resolved then? no, the same error:

apa <- APA(explist, bedpe = peak) Error in value[[1L]] : subscript out of bounds

jiangshan529 commented 1 year ago

Ah good, so this issue appears to be resolved then?

Hello, there is still such an error: apa <- APA(explist, bedpe = peak) Error in value[[1L]] : subscript out of bounds

teunbrand commented 1 year ago

Yeah sorry I don't know what causes the error, I cannot reproduce this on my end.

Moonriver1988 commented 1 year ago

the error "subscript out of bounds" in this package is often caused by chromosome name is inconsistent between files, i.e. "1" vs. "chr1"

teunbrand commented 1 year ago

Thanks @Moonriver1988, that seems like a reasonable thing to check against. I'll see what I can do to give a more friendly error in this case.