Skip to content

Last 2 columns of output of wgbstools convert -L #101

@yunfeiguo

Description

@yunfeiguo

The last 2 columns of wgbstools convert -L command apparently are CpG start index and CpG end index. Are they 0-based or 1-based? They don't seem to be consistent with output of wgbstools convert -r. Example:

$ cat s.bed
chr1    185606  185761
$$ bedtools getfasta -fi reference.fa -bed s.bed
>chr1:185606-185761
GACCGGTGACTCCCTGTCCCCACCCCCATGACACTCCCCAGCCCTCCAAGGCCACTGTGTTTCCCAGTTAGCTCAGAGCCTCAGTCGATCCCTGACCCAGCACCAGGCACTGATGAGACAGCGGCGGTTTGAGGAGCCACCTCCCAGCCACCTCG
$wgbstools convert -r chr1:185607-185761 # here I assume `-r` option takes 1-based start and end
chr1:185607-185761 - 155bp, 5CpGs: 2175-2180
$wgbstools convert -L s.bed
chr1    185606  185761  2174    2180

2180-2174=6
2180-2174+1=7
So no matter how I calculate it, I cannot arrive at 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions