rr1859 / R.4Cker

MIT License
16 stars 15 forks source link

unable to plot using ggplot2, object 'count' not found #44

Open dotaa opened 6 years ago

dotaa commented 6 years ago

Hello, I have successfully loaded the 4Cker object as: my_obj = createR4CkerObjectFromFiles(files = "hs75l6_13_DN-4C_9p21_DD1_CTCF_view_GACCAG_L006_R1_001_aligned.bedGraph",bait_chr="chr9",bait_coord= 22231303,bait_name = "CTCF-9p21locus", primary_enz = "AAGCTT", samples = c("CTCF_DD1"), conditions = "DD1", replicates = 1,species = "hg",output_dir = "/home/dnotani/ssanaa/software/R.4Cker-master/folder_for_analysis",enz_file=enz_file) however, upon plotting the object i am getting the following error: Don't know how to automatically pick scale for object of type Coord/ggproto. Defaulting to continuous. Error in eval(expr, envir, enclos) : object 'Count' not found

the command for plotting used is the default command given in readme: ggplot(nb_results$norm_counts_avg, aes(x=Coord, y=Count, colour=Condition))+ theme_bw()+ geom_line()+xlab(paste("Chromosome coordinates (", my_obj@bait_chr, ")", sep =""))+ ylab("Normalized counts")+ ggtitle(paste("Near bait analysis (", my_obj@bait_name, " bait)", sep = ""))

Please help! Thank you.

rr1859 commented 6 years ago

Hi,

Did you do a nearBait analysis? - nb_results=nearBaitAnalysis(my_obj,k=5)

dotaa commented 6 years ago

yes! i'm sorry. i did, nb_results=nearBaitAnalysis(my_obj,k=10). I get that error.

Hi,

Did you do a nearBait analysis? - nb_results=nearBaitAnalysis(my_obj,k=5)

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/rr1859/R.4Cker/issues/44#issuecomment-334553114

dotaa commented 6 years ago

maybe it doesnt work with no replicates? is that the case??

rr1859 commented 6 years ago

Yes sorry the plotting doesnt work with one replicate - i would recommend visualizing the bedGraph file on a browser.

dotaa commented 6 years ago

Hi, In that case, what if i give the same file copy as a replicate? the results wouldn't be different from there being just one replicate would it? or will i give incorrect results?