Skip to content

Simple c program for manipulating bed-like methylation files

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

dhslab/methfast

Repository files navigation

Introduction

methfast is a program for extracting methylation values from a bed-like file for a target bed file. It can accept gzipped or plain text files and by default assumes the format for the bed file with methylation is like this:

chrom start end methylation coverage

Other formats can be used by specifying the column numbers for the methylation and coverage values.

methfast is written in C using Heng Li's cgranges library to perform overlap queries between methylation and bed intervals.

Dependencies and Installation

methfast can be compiled via:

gcc methfast.c cgranges.c -o methfast -lz -lm

Usage

methfast <methylation_bed(.gz)> <target_bed> [-f <frac_col>] [-c <cov_col>] [-m <meth_col>] [-u <unmeth_col>]

Options: -f column number for methylation fraction (default is 4) -c column number for total coverage (default is 5) -m column number for methylated coverage (no default) -u column number for unmethylated coverage (no default)

Test data

A small test dataset is included, which can be tested via:

methfast meth.bed.gz regions.bed

https://github.com/samtools/htslib

https://github.com/lh3/cgranges/

About

Simple c program for manipulating bed-like methylation files

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published