GithubHelp home page GithubHelp logo

sonic's Introduction

sonic

Some Organism's Nucleotide Information Container

Compilation

Library only:

make

Standalone SONIC builder:

make exe

Standalone SONIC builder example:

sonic --ref hg19.fasta --dups hg19.dups.bed --reps hg19_repeats.out --gaps hg19.gap.bed --make-sonic ucsc_hg19.sonic --info "UCSC_hg19"

Duplications and gaps are expected in BED format. Repeats are in RepeatMasker .out format.

Building a SONIC file

int sonic_build(char *ref_genome, char *gaps, char *reps, char *dups, char *info, char *sonic);

ref_genome: path to the reference genome file (FASTA) [input]. Also requires the ref_genome.fai file in the same directory (samtools faidx).
gaps: path to the gaps file (BED) [input].
reps: path to the repeat annotation file (UCSC/RepeatMasker .out) [input].
dups: path to the segmental duplications annotation file (BED) [input].
info: information string to annotate the SONIC file [input].
sonic: path to the SONIC file [output].

RETURN VALUES:
	1: success
	5: file open error
	7: annotation files error

Loading a SONIC file

sonic *sonic_load(char *sonic_file_name);

sonic_file_name: path to the SONIC file [input].

RETURN VALUE:
	a SONIC.

General-purpose interval search

sonic_interval *sonic_intersect(sonic *sonic, char *chromosome, int start, int end, sonic_interval_type interval_type);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).
interval_type:
	SONIC_GAP: search gap annotation.
	SONIC_DUP: search segmental duplication annotation.
	SONIC_REP: search repeats annotation.

RETURN VALUE:
	pointer to a SONIC interval data structure on success.
	NULL if not found.

Check if interval hits a satellite region

int sonic_is_satellite(sonic *sonic, char *chromosome, int start, int end);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).

RETURN VALUE:
	1 if the interval is in a satellite region.
	0 if it is not.

Check if interval hits a gap

int sonic_is_gap(sonic *sonic, char *chromosome, int start, int end);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).

RETURN VALUE:
	1 if the interval is in a gap region.
	0 if it is not.

Check if interval hits a segmental duplication region

int sonic_is_segmental_duplication(sonic *sonic, char *chromosome, int start, int end);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).

RETURN VALUE:
	1 if the interval is in a segmental duplication region.
	0 if it is not.

Check if interval hits a mobile element

sonic_repeat *sonic_is_mobile_element(sonic *sonic, char *chromosome, int start, int end, char *mei_string);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).
mei_string: a colon-seperated of MEI keywords, i.e. "Alu:L1:HERV".

RETURN VALUE:
	pointer to a SONIC repeat data structure if the interval hits a mobile element.
	NULL if it is not.

Get GC content over a region (as pre-calculated in non-overlapping 100 bp intervals).

float sonic_get_gc_content(sonic *sonic, char *chromosome, int start, int end);

sonic: Loaded SONIC.
chromosome: name of the chromosome of the interval of interest.
start: start coordinate of the interval of interest (inclusive -- BED-like).
end: end coordinate of the interval of interest (exclusive -- BED-like).

RETURN VALUE:
	GC% over the region, returned in [0-100] interval.

sonic's People

Contributors

calkan avatar f0t1h avatar asylvz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.