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

problem with running MethCoverage data #28

Closed Moonju411 closed 5 years ago

Moonju411 commented 5 years ago

Hi,

I have a problem with running MethCoverage command.

I ran code like this : ViewBS MethCoverage --reference mm10.fa --sample ND1_liver_10_500.tab.gz,ND1 --outdir ViewBS_test --prefix ND1_MethCoverage

And result come out like this :+1: Subcommand: MethCoverage Sample(s): ND1_liver_10_500.txt,ND1 Output directory is: /media/user/DATA2/Moon_new_analysis/ViewBS_test/ViewBS_test Output prefix: ND1_MethCoverage Start reading the methylation file Meth::Coverage=HASH(0xd5e768): start to calculate CG, CHG and CHH number ID: C_G_number CG_number CHG_number CHH_number chr1:42515010 1743648 8952708 31818654 chr10:28979623 1371766 6087334 21520523 . . gzip: ND1_liver_10_500.txt: not in gzip format Use of uninitialized value $max_depth_rep in concatenation (.) or string at /media/user/DATA1/ViewBS-0.1.7/lib/Meth/Coverage.pm line 108. Maximum depth that will be calculed is error: Faceting variables must have at least one value

How can I solve this error?

Input sample file format is looking like this, converted from BSseeker2 CGmap file. chr1 3003670 + 0 3 CHG CA chr1 3003673 + 1 2 CHH CC chr1 3003674 + 0 3 CHH CA chr1 3003676 + 0 3 CHH CC chr1 3003677 + 0 3 CHH CT

Please help me!

Best, Moonju

xie186 commented 5 years ago

It seems that in the command line you provided here you have ND1_liver_10_500.tab.gz, but in the error message you have ND1_liver_10_500.txt. Could you please double check you command line?

Did you successfully run the test data?

Moonju411 commented 5 years ago

It seems that in the command line you provided here you have ND1_liver_10_500.tab.gz, but in the error message you have ND1_liver_10_500.txt. Could you please double check you command line?

Did you successfully run the test data?

Hi, I'm sorry for confusing you.

Actually, I tried MethCoverage command line with both .tab.gz form file and .txt form file. (Inputted sample file format was same (converted from BSseeker2 CGmap file), just the file extension was different.)

But both .tab.gz and .txt form file gave me same error. "error: Faceting variables must have at least one value"

Best, Moonju

xie186 commented 5 years ago

Got it. Thanks. I'll look into this and get back to you.

xie186 commented 5 years ago

Hi Moonju, I couldn't repeat your error. Could you please share me the following info if you have: 1) The log message outputted; 2) The output files in the output directory, expecially the tab file and rds file. Thanks, Best, Shaoun

Moonju411 commented 5 years ago

Dear, Shaojun

When I run command line, I got .pdf, .sh, .tab file in the output directory.

In the .sh file, it wrote down like this : Rscript /media/user/DATA1/ViewBS-0.1.7/lib/Meth/Coverage.R --input /media/user/DATA2/Moon_new_analysis/ViewBS_test/ViewBS_test/ND1_MethCoverage.tab --height 10 --width 10 --output /media/user/DATA2/Moon_new_analysis/ViewBS_test/ViewBS_test/ND1_MethCoverage.pdf

And in the .tab file, I got just this Sample Context Depth Percentage

I couldn't get .rds file.

Is log massage meaning this? gzip: ND1_liver_10_500.tab.gz: not in gzip format Use of uninitialized value $max_depth_rep in concatenation (.) or string at /media/user/DATA1/ViewBS-0.1.7/lib/Meth/Coverage.pm line 108. Maximum depth that will be calculed is error: Faceting variables must have at least one value Running stopped Running time:56 wallclock secs (48.55 usr 5.57 sys + 0.44 cusr 0.02 csys = 54.58 CPU)

I really appreciate for your help!

Sincerely, Moonju

xie186 commented 5 years ago

How did you generate the ND1_liver_10_500.tab.gz?

Could you please also paste a piece of the file?

Moonju411 commented 5 years ago

I generated ND1_liver_10_500.tab.gz file by converting from BSseeker2 CGmap file to .tab.gz file using included perl code.

perl bsseeker2bismark.pl ND1_liver_10_500_methylation.CGmap 1 ND1_liver_10_500.tab.gz

Inputted CGmap file was like this chr1 C 3003670 CHG CA 0.0 0 3 chr1 C 3003673 CHH CC 0.33 1 3 chr1 C 3003674 CHH CA 0.0 0 3 chr1 C 3003676 CHH CC 0.0 0 3 chr1 C 3003677 CHH CT 0.0 0 3 chr1 C 3003679 CHH CT 0.0 0 3

And tab.gz file was like this chr1 3003670 + 0 3 CHG CA chr1 3003673 + 1 2 CHH CC chr1 3003674 + 0 3 CHH CA chr1 3003676 + 0 3 CHH CC chr1 3003677 + 0 3 CHH CT chr1 3003679 + 0 3 CHH CT

xie186 commented 5 years ago

I see. Please follow the steps below:

perl bsseeker2bismark.pl ND1_liver_10_500_methylation.CGmap 1 ND1_liver_10_500.tab
bgzip ND1_liver_10_500.tab
tabix -p vcf ND1_liver_10_500.tab.gz

Please let me know if you have further problems. Thanks for using ViewBS.

Moonju411 commented 5 years ago

I'm really sorry that it still give me an error after converting file as you suggested.

Error message is like this

Maximum depth that will be calculed is 3 Use of uninitialized value in division (/) at /media/user/DATA1/ViewBS-0.1.7/lib/Meth/Coverage.pm line 83. Illegal division by zero at /media/user/DATA1/ViewBS-0.1.7/lib/Meth/Coverage.pm line 83.

xie186 commented 5 years ago

This is weird.It seems that there is something wrong with the reference genome. Could you please make sure the reference genome is not empty? Otherwise I probably need the files for debugging.

xie186 commented 5 years ago

Moreover, it seems that the depth of the data is very shallow.

Moonju411 commented 5 years ago

Reference genome mm10.fa was downloaded from UCSC converted from mm10.2bit and when I checked it, it's not empty.

Is low depth making trouble with running MethCoverage command line?

xie186 commented 5 years ago

I probably need to get some example data from you to repeat the error you got. Could you please provide me the information? You don't need to give me the whole dataset you have. Just part of the files that can help me to repeat the error will be fine. Thanks.

xie186 commented 5 years ago

Please re-open this issue if you have further questions. Thanks.