VCCRI / Sierra

Discover differential transcript usage from polyA-captured single cell RNA-seq data
GNU General Public License v3.0
49 stars 17 forks source link

Getting "Error in (function (x) : attempt to apply non-function" #63

Open alanlamsiu opened 1 year ago

alanlamsiu commented 1 year ago

Hi @rj-patrick. I came across the message, "Error in (function (x) : attempt to apply non-function", when running count peaks as shown below. CountPeaks(peak.sites.file="merged_peaks.txt", gtf.file="", bamfile="", whitelist.file="", output.dir="out_dir", countUMI=TRUE, ncores=10)`

The "merged_peaks.txt" file was generated by the updated merge peak function. Do you have any suggestions regarding getting this message? Thanks!

rj-patrick commented 1 year ago

Hi @alanlamsiu, Sorry for the slow reply. I tried to see if there could be any issues with the update merge peak function, but I am not aware of anything. It's hard to know what could be going on here. Do you get any output from the CountPeaks function?

alanlamsiu commented 1 year ago

Hi @rj-patrick,

I can see the output being generated by CountPeaks and they can be used for downstream analyses. It is just the error message that I am not sure about.

rj-patrick commented 1 year ago

Hi @alanlamsiu,

If CountPeaks is finishing, it's probably fine. One thing you could try, depending on the reference file you're working with, is to specify to include only the autosomal and sex chromosomes. Sometimes weird things can happen with scaffolds that have been included in the reference. For CountPeaks there is a chr.names parameter, and you can just pass it an array of chromosome names that you want to process and it will ignore the rest.

Hope that helps.