tanaylab / mcATAC

Metacell analysis for ATAC data
https://tanaylab.github.io/mcATAC/
Other
1 stars 0 forks source link

solve unnamed peaks set without raising Error when creating McPeaks object from McCounts #52

Open tomgome opened 2 years ago

tomgome commented 2 years ago

if a valid peaks interval set is passed (i.e. has 'chrom','start','end'), but lacking peak_name column - call peak_names() internally to solve this issue, instead of aborting:

peak_set = fread('path/to/peak/file.txt')

mcatac_obj <- mcc_to_mcatac(mcc, peaks = peak_set, metadata = mc_md)
Error in `mcc_to_mcatac()`:
! The `peaks` must have a column called peak_name

Solution: if(!has_name(peak_set)){ peak_set$peak_name = peak_names(peak_set) }

aviezerl commented 2 years ago

Fixed in the shiny-app branch. The issue would be closed when it would be merged.