MagpiePKU / EpiTrace

Cell age determination by scATAC-seq and bulk-ATAC-seq
https://epitrace.readthedocs.io
GNU General Public License v3.0
26 stars 1 forks source link

peakset genome version in EpiTraceAge_Convergence #12

Open HaikuoLi opened 13 hours ago

HaikuoLi commented 13 hours ago

Hello!

I am trying to run your package on my own ATAC-seq dataset. Although I set ref_genome = 'hg38' in EpiTraceAge_Convergence, I still got a message of Input peakset is set to be hg19. In addition, the EpiTraceAge_Convergence has been taking time so long that I haven't completed it. What's the issue of this do you think?

Here are my scripts:

novaseq_initiated_peaks <- Init_Peakset(seuratobject@assays$peaks@ranges)
novaseq_initiated_peaks_df <- as.data.frame(novaseq_initiated_peaks,row.names = NULL)
paste0(novaseq_initiated_peaks_df$seqnames,'-',novaseq_initiated_peaks_df$start,'-',novaseq_initiated_peaks_df$end) -> novaseq_initiated_peaks_df$peakName

as(seuratobject@assays$peaks@data, "sparseMatrix") -> novaseq_mtx

initiated_mm <- Init_Matrix(cellname = colnames(novaseq_mtx),
                            peakname = novaseq_initiated_peaks_df$peakName,
                            matrix = novaseq_mtx)

epitrace_obj_age_estimated <- EpiTraceAge_Convergence(novaseq_initiated_peaks, initiated_mm, celltype = NULL, qualnum = 10,
                                                      Z_cutoff = 2.5,iterative_time = 2, parallel = T,
                                                      ref_genome = 'hg38', non_standard_clock = F,
                                                      sep_string = c("-","-"))

Messages shown up:

Preparing obj...
ref clock list is not standard. Please make sure the input data, peak set and clock set are in similar reference genome.
Input peakset is set to be hg19
Joining with `by = join_by(Clock_panel)`
add iterative
good quality cells 8368 and peaks 10295
Finished prepare obj
Estimating age for initialization...

Thank you in advance!

HaikuoLi commented 12 hours ago

Hey, I realized in EpiTraceAge_Convergence, it will first run EpiTrace_prepare_object. But hg19 is a fixed parameter there. Is this the reason? Hope you can fix it soon (line 662 EpiTrace.R)

  epitrace_obj <- EpiTrace_prepare_object(initial_peakSet_clk,
                                          initial_matrix_clk, celltype, ref_genome = "hg19", non_standard_clock = T,
                                          clock_gr_list = iterative_GR_list, sep_string = sep_string,
                                          fn.k.param = fn.k.param, lsi_dim = lsi_dim, qualnum = qualnum,
                                          min.cutoff = min.cutoff, run_reduction = F,remove_peaks_number=remove_peaks_number)