robinweide / GENOVA

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

ARA and pyramid plots issues #344

Open BERICP01 opened 6 months ago

BERICP01 commented 6 months ago

Hello,

I am facing some issues when I try to use ARA and pyramid plot functions.

For the ARA here is my script:

**library(GENOVA) library(rhdf5) library(strawr)

setwd('/gpfs/data/HernandoLab/home/bericp01/HiC/results/ARA') dir <- '/gpfs/data/HernandoLab/home/bericp01/HiC/results/ARA'

CTRL_10kb_juicer <- readRDS("/gpfs/data/HernandoLab/home/bericp01/HiC/results/cis-quantification/CTRL_10kb_juicer.rds") CHD7_10kb_juicer <- readRDS("/gpfs/data/HernandoLab/home/bericp01/HiC/results/cis-quantification/CHD7_10kb_juicer.rds") CTRL_CHD7 <- sync_indices(list(CTRL_10kb_juicer, CHD7_10kb_juicer)) CHD7_peaks <- read.delim('/gpfs/data/HernandoLab/home/bericp01/HiC/MACS2/bedtools_Intersect_CHD7.bed')

CTRL_CHD7_ARA <- ARA(CTRL_CHD7, bed = CHD7_peaks[,1:3], shift = 1e+06) pdf(file.path(dir, "ARA_CHD7.pdf")) visualise(CTRL_CHD7_ARA, title = "ARA 501mel sgCHD7", colour_lim = c(0, 40), colour_lim_contrast = c(-5, 5), metric = "diff", contrast = 1) dev.off() quantifyARA_chd7 <- quantify(CTRL_CHD7_ARA) pdf(file.path(dir, "ARA_CHD7_boxplot.pdf")) boxplot(split(quantifyARA_chd7$per_loop$foldchange, f = quantifyARA_chd7$per_loop$sample), col = c('red', 'darkgrey'), outline = F, ylab = 'pixel enrichment extended loops') dev.off()**

Then I get this error: Error in value[[1L]] : subscript out of bounds Calls: ARA -> anchors_ARA -> bed2idx -> unsplit -> is.data.frame Execution halted

With the pyramid plot the script is:

**library(GENOVA) library(rhdf5) library(strawr)

setwd('/gpfs/data/HernandoLab/home/bericp01/HiC/results/Plots') dir <- '/gpfs/data/HernandoLab/home/bericp01/HiC/results/Plots' bed <- '/gpfs/data/HernandoLab/home/bericp01/genome_references/GENCODE_v44_Hg38.bed'

MELANOCYTIC_10kb_juicer <- readRDS("/gpfs/data/HernandoLab/home/bericp01/HiC/results/cis-quantification/MELANOCYTIC_10kb_juicer.rds") MESENCHYMAL_10kb_juicer <- readRDS("/gpfs/data/HernandoLab/home/bericp01/HiC/results/cis-quantification/MESENCHYMAL_10kb_juicer.rds")

Region TFAP2A

pdf(file.path(dir, "HiC_diff_MEL_MES_TFAP2A.pdf")) pyramid_difference(exp1 = MELANOCYTIC_10kb_juicer, exp2 = MESENCHYMAL_10kb_juicer, coplot = 'diff', chrom = "chr6:9,700,000-10,800,000", cut.off = 50, genes = bed) dev.off()**

Then I get this error: Error in standardise_location(chrom, start, end, singular = TRUE) : could not find function "standardise_location" Calls: pyramid_difference Execution halted

Any help would be extremely appreciate! Thanks Pietro

teunbrand commented 5 months ago

I don't know where to begin debugging this. Can you please provide a minimal reproducible example instead of pasting entire scripts? Preferably using the data provided in get_test_data() funciton.