nloyfer / wgbs_tools

tools for working with Bisulfite Sequencing data while preserving reads intrinsic dependencies
Other
125 stars 33 forks source link

visualization for beta files #15

Closed roofya closed 1 year ago

roofya commented 1 year ago

Hi

I'm applying this tools for heart beta files and I used this command but it doesn't show any output. Please guide me whats the best way for visualization ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --heatmap chr3:119528843-119529245 - 403bp, 6CpGs: 5560971-5560977GSM5652212_Heart-Cardiomyocyte-Z0000044G.hg38 : ?????? GSM5652213_Heart-Cardiomyocyte-Z0000044K.hg38 : ?????? GSM5652214_Heart-Cardiomyocyte-Z0000044N.hg38 : ?????? GSM5652215_Heart-Cardiomyocyte-Z0000044P.hg38 : ?????? GSM5652216_Heart-Cardiomyocyte-Z0000044Q.hg38 : ?????? GSM5652217_Heart-Cardiomyocyte-Z0000044R.hg38 : ??????

Thank you

nloyfer commented 1 year ago

Hi, I am unsure what caused this, my best guess is that this is about your terminal. Try replacing the --heatmap flag with --no_color.

./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --no_color

Does it show numbers instead of question marks? If so, I think there are two possible problems:

  1. a problem with the "special" square characters. What happens when you run the same command without the --heatmap flag? does it show colorful numbers?
    ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245
  2. a problem with the ANSI color escape sequences. Try adding to your command the following: --color_scheme 16, for a more primitive color scheme.
    ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --color_scheme 16
roofya commented 1 year ago

Hi,

Thank you so much for all your help. These commands are working. [mr2329@cbsurf02 wgbs_tools]$ ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --no_color chr3:119528843-119529245 - 403bp, 6CpGs: 5560971-5560977 GSM5652212_Heart-Cardiomyocyte-Z0000044G.hg38 : 999399 GSM5652213_Heart-Cardiomyocyte-Z0000044K.hg38 : 999999 GSM5652214_Heart-Cardiomyocyte-Z0000044N.hg38 : 999599 GSM5652215_Heart-Cardiomyocyte-Z0000044P.hg38 : 997989 GSM5652216_Heart-Cardiomyocyte-Z0000044Q.hg38 : 999999 GSM5652217_Heart-Cardiomyocyte-Z0000044R.hg38 : 999999

Also, would you please help me to figure out how I can get methylation sites extracted in excel sheet from these files?

Best

roofya commented 1 year ago

I found that this command gives me the information for chr and region in the chromosome. Would you please explain what are the others number? [mr2329@cbsurf02 wgbs_tools]$ ./wgbstools view ../methylation_atlas/GSM5652212_Heart-Cardiomyocyte-Z0000044G.hg38.beta | head -5 chr1 10468 10470 1 15 chr1 10470 10472 2 7 chr1 10483 10485 7 8 chr1 10488 10490 8 8 chr1 10492 10494 6 7

Thank you

roofya commented 1 year ago

Hi Netanel,

how I can plot heatmap then not showing ????????.

Thank you

nloyfer commented 1 year ago

Regarding the view output columns: First 3 columns are the CpG position (fixed for any beta file, given a reference genome) 4'th and 5'th columns are the number of methylated and unmethylated observations of this site. For example,

chr1 10468 10470 1 15

Site CpG1 is located at chr1:10468-10470. It was covered by 16 reads. It was methylated in one of them, and unmethylated in 15.

Plotting with colors: I suspect the problem is with your terminal, it doesn't show ANSI color escape codes, for some reason. Maybe try a different terminal?

Anyway, there is another option - plot it with matplotlib, instead of in-terminal.

$ ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --plot
# or
$ ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --plot -o output_path.pdf
roofya commented 1 year ago

Regarding the view output columns: First 3 columns are the CpG position (fixed for any beta file, given a reference genome) 4'th and 5'th columns are the number of methylated and unmethylated observations of this site. For example,

chr1 10468 10470 1 15

Site CpG1 is located at chr1:10468-10470. It was covered by 16 reads. It was methylated in one of them, and unmethylated in 15.

Plotting with colors: I suspect the problem is with your terminal, it doesn't show ANSI color escape codes, for some reason. Maybe try a different terminal?

Anyway, there is another option - plot it with matplotlib, instead of in-terminal.

$ ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --plot
# or
$ ./wgbstools vis ../methylation_atlas/*.beta -r chr3:119528843-119529245 --plot -o output_path.pdf

Thank you so much for explanation