GENOVA icon indicating copy to clipboard operation
GENOVA copied to clipboard

Error in APA analysis

Open jiangshan529 opened this issue 3 years ago • 10 comments

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!

jiangshan529 avatar Oct 20 '22 21:10 jiangshan529

Hi there,

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

explist <- sync_indices(list(WT, KO))
apa <- APA(explist, bedpe = peaks)

teunbrand avatar Oct 20 '22 21:10 teunbrand

apa <- APA(explist, bedpe = peaks)

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

jiangshan529 avatar Oct 20 '22 21:10 jiangshan529

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)?

teunbrand avatar Oct 20 '22 21:10 teunbrand

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

jiangshan529 avatar Oct 20 '22 21:10 jiangshan529

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

teunbrand avatar Oct 20 '22 21:10 teunbrand

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 avatar Oct 20 '22 21:10 jiangshan529

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

jiangshan529 avatar Oct 21 '22 14:10 jiangshan529

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

teunbrand avatar Oct 21 '22 14:10 teunbrand

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

Moonriver1988 avatar Oct 28 '22 18:10 Moonriver1988

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.

teunbrand avatar Oct 28 '22 19:10 teunbrand