Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alanlamsiu opened this issue Jul 5, 2023 · 3 comments
Open

Comments

@alanlamsiu
Copy link

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="<barcodes.tsv>", 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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants