Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage2cytosine dies when --merge_CpG and --zero were specified #98

Closed
FelixKrueger opened this issue Mar 31, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@FelixKrueger
Copy link
Owner

"I'm having some problems with coverage2cytosine.
It's terminating with exit code 25, and at the end of the output are the lines:

he strand of line 1 and line 2 were not + and -:

line1:  Methylated      2       -       0       0       CG CGA
line2:  Methylated      21      +       25      1       CG CGG

This is an analysis of spike in methylation controls and so the genome is very small.

@FelixKrueger FelixKrueger self-assigned this Mar 31, 2017
@FelixKrueger
Copy link
Owner Author

The genome sequence was: TCGAGAGGC..., so the first CG positions were 2 and 3. Genome wide CpG reports may report the methylation state of a CG on the top strand starting at position 1, but not for the C on the reverse strand at position 2 because it can't determine a tri-nucleotide context. Thus we discard only the first line and read in a new one if the position of the first C was 1.

Now when the option --zero is specified however the first cytosines are reported as positions 1 and 2, which triggers the above correction behaviour, which I have now changed to take the 0-based coords into account. The resulting coverage file was also changed to now use 0-based genomic start and 1-based genomic end coordinates (zero-based, half-open), like used in the bedGraph file, like so:

Methylated      1       3       96.000000       24      1
Methylated      21      23      97.500000       39      1
Methylated      24      26      100.000000      41      0

Addressed in 71a6600 and f45f2c2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant