Tutorial:Introduce OpenGene: an open source library for processing NGS data
0
4
Entering edit mode
8.7 years ago
chen ★ 2.5k

OpenGene, core libraries for NGS data analysis and bioinformatics, written in julia

OpenGene already supports fastq/fasta/vcf/gtf/bed reading and writing, and also gives sam/bam reading/writing support with HTSLIB

Call for contributors!

We need more heros to make OpenGene a fast, easy-to-use and powerful genetics toolkit.

Examples

read/write a single fastq/fasta file

using OpenGene

istream = fastq_open("input.fastq.gz")
ostream = fastq_open("output.fastq.gz","w")

while (fq = fastq_read(istream))!=false
    fastq_write(ostream, fq)
end

close(ostream)

fasta is supported similarly with fasta_open, fasta_read and fasta_write

read/write a pair of fastq files

using OpenGene

istream = fastq_open_pair("R1.fastq.gz", "R2.fastq.gz")
ostream = fastq_open_pair("Out.R1.fastq.gz","Out.R2.fastq.gz","w")

while (pair = fastq_read_pair(istream))!=false
    fastq_write_pair(ostream, pair)
end

close(ostream)

read/write a bed file

using OpenGene

intervals = bed_read_intervals("in.bed")
bed_write_intervals("out.bed",intervals)

read/write a VCF

using OpenGene

vcfobj = vcf_read("in.vcf")
vcf_write("out.vcf", vcfobj)

read/write a GTF

using OpenGene

gtfobj = gtf_read("in.gtf")
gtf_write("out.gtf", gtfobj)

gtfobj, stream = gtf_read("in.gtf", loaddata = false)
while (row = gtf_read_row(stream)) != false
    # do something with row ...
end

locate the gene/exon/intron

using OpenGene, OpenGene.Reference

index = gencode_load("GRCh37")

gencode_locate(index, "chr5", 149526621)
# 1-element Array{Any,1}:
#  Dict{ASCIIString,Any}("gene"=>"PDGFRB","number"=>1,"transcript"=>"ENST00000261799.4","type"=>"intron")
NGS sequencing Julia OpenGene • 3.7k views
ADD COMMENT
0
Entering edit mode

The above tutorial was helpful to give a good seminar in my class.

ADD REPLY
0
Entering edit mode

Hi sudharshanva, please use ADD REPLY for comments. The answer field is intended for answers only.

ADD REPLY

Login before adding your answer.

Traffic: 2107 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6