xie186 / ViewBS

ViewBS - a powerful toolkit for visualization of high-throughput bisulfite sequencing data
GNU General Public License v3.0
81 stars 27 forks source link

MethHeatmap : Error in library(pheatmap) #45

Closed RRebo closed 4 years ago

RRebo commented 4 years ago

Hi, I am running MethHeatmap and I run into an error for te pheatmap library. Here is my codeline and error:

(env_ViewBS019) rrebollo@bf2i-galaxy:/home/data/rrebollo/DNAMethylationSitophilu s/Sitophilus$ ~/ViewBS-0.1.9/ViewBS MethHeatmap --region Exons3BEDunique.interva l --sample NDPS110Cytosinereport.CpG_report.cov.gz,NDPS110 --sample NDPS122Cytos inereport.CpG_report.cov.gz,NDPS122 --prefix reaction --context CpG --outdir Met hHeatmap

Subcommand: MethHeatmap NDPS110Cytosinereport.CpG_report.cov.gz,NDPS110 NDPS122Cytosinereport.CpG_report .cov.gz,NDPS122 Exons3BEDunique.interval Output directory is: /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus/Met hHeatmap Output prefix: reaction Start calculate methylation information for target context CpG ..................................................Error in library(pheatmap) : t here is no package called 'pheatmap' Execution halted Meth::Heatmap=HASH(0x558c99eb7890): Useage: R --vanilla --slave --input <> --hei ght --width --height2 --width2 --random_regi on --output1 --output2 < trans_DMS_heatmap .R /home/data/rrebollo/.conda/envs/env_ViewBS019/lib/R/bin/exec/R --slave --no-rest ore --file=/home/data/rrebollo/ViewBS-0.1.9/lib/Meth/Heatmap.R --args --input /h ome/data/rrebollo/DNAMethylationSitophilus/Sitophilus/MethHeatmap/reaction_MethH eatmap_CpG.txt --output1 /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus /MethHeatmap/reaction_MethHeatmap_CpG.pdf --output2 /home/data/rrebollo/DNAMethy lationSitophilus/Sitophilus/MethHeatmap/reaction_MethHist_CpG.pdf --cluster_cols FALSE --cluster_rows TRUE --height 10 --width 10 --height2 10 --width2 10 --ran dom_region 2000 FALSE TRUE

Running time:167 wallclock secs (166.19 usr 0.72 sys + 1.17 cusr 1.21 csys = 169.29 CPU)

Can you guide me as how to fix this please? Thank you (and thank you for resolving my other issue too!!) Rita

xie186 commented 4 years ago

Hi @RRebo ,

I seems that pheatmap is not installed. Could you please check this? Thanks.

Use install.packages("pheatmap", dep=T) to install pheatmap.

Best, Shaojun

RRebo commented 4 years ago

Hi! I'm sorry fot this, so I actually opened R in my env_ViewBS and installed pheatmap, and it did work, but I had another issue, which I think might be related to my data. I'll past here in case you have seen this before:

(env_ViewBS019) rrebollo@bf2i-galaxy:/home/data/rrebollo/DNAMethylationSitophilus/Sitophilus$ ~/ViewBS-0.1.9/ViewBS MethHeatmap --region Exons3BEDunique.interval --sample NDPS110Cytosinereport.CpG_report.cov.gz,NDPS110 --sample NDPS122Cytosinereport.CpG_report.cov.gz,NDPS122 --prefix reaction --context CpG --outdir MethHeatmap

Subcommand: MethHeatmap NDPS110Cytosinereport.CpG_report.cov.gz,NDPS110 NDPS122Cytosinereport.CpG_report.cov.gz,NDPS122 Exons3BEDunique.interval Output directory is: /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus/MethHeatmap Output prefix: reaction Start calculate methylation information for target context CpG ..................................................Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE' Calls: tryCatch ... tryCatchList -> tryCatchOne -> -> sample -> sample.int Execution halted Meth::Heatmap=HASH(0x55926e790b00): Useage: R --vanilla --slave --input <> --height --width --height2 --width2 --random_region --output1 --output2 < trans_DMS_heatmap.R /home/data/rrebollo/.conda/envs/env_ViewBS019/lib/R/bin/exec/R --slave --no-restore --file=/home/data/rrebollo/ViewBS-0.1.9/lib/Meth/Heatmap.R --args --input /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus/MethHeatmap/reaction_MethHeatmap_CpG.txt --output1 /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus/MethHeatmap/reaction_MethHeatmap_CpG.pdf --output2 /home/data/rrebollo/DNAMethylationSitophilus/Sitophilus/MethHeatmap/reaction_MethHist_CpG.pdf --cluster_cols FALSE --cluster_rows TRUE --height 10 --width 10 --height2 10 --width2 10 --random_region 2000 FALSE TRUE

Running time:167 wallclock secs (165.61 usr 0.76 sys + 1.25 cusr 1.27 csys = 168.89 CPU)

Thanks again for the fast replies! Rita

xie186 commented 4 years ago

If you can share the output with me, I can take a look.

RRebo commented 4 years ago

Thanks! The PDF can't be open, something is wrong, but I am attaching the txt file and also the interval input file.

Here is the command I used again : ~/ViewBS-0.1.9/ViewBS MethHeatmap --region Exons3BEDunique.interval --sample NDPS110Cytosinereport.CpG_report.cov.gz,NDPS110 --sample NDPS122Cytosinereport.CpG_report.cov.gz,NDPS122 --prefix reaction --context CpG --outdir MethHeatmap

The error:

Error in sample.int(length(x), size, replace, prob) :
  cannot take a sample larger than the population when 'replace = FALSE'
Calls: tryCatch ... tryCatchList -> tryCatchOne -> <Anonymous> -> sample -> sample.int
Execution halted

If you need the cov file please, keep me informed (but you should have it from my other issue 43 I think).

Thanks Rita Issue45.zip

xie186 commented 4 years ago

Hi @RRebo , It seems that there is no methylation information in the output. Given the number of regions you provided, it doesn't make sense. I guess it's possible that the chromosome coordinates in the region file and methylation file come from different genome build. Check the chromosome IDs in the methylation data and region file. Best, Shaojun

RRebo commented 4 years ago

It is the same genome build... Could it be that my genome is very fragmented (roughly 2000 scaffolds)? Maybe my coverage is not good enough and there is a filter for MethHeatmap? I attached my coverage PDF file. reaction.pdf

xie186 commented 4 years ago

If you can share me the data at xie186@purdue.edu, I can take a look.

xie186 commented 4 years ago

Use 'CG' instead of "CpG". Please let me know if there is any further problem.

RRebo commented 4 years ago

Perfect! All working now. Sorry for the mistake :(

xie186 commented 4 years ago

It's OK. I'll add warning messages in the next version.