Skip to content

Commit

Permalink
Add gencode example
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Feb 16, 2016
1 parent b2c99c8 commit 487db9a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,18 @@ while (row = gtf_read_row(stream)) != false
# do something with row ...
end
```

***locate the gene/exon/intron***
```julia
using OpenGene, OpenGene.Reference

# load the gencode dataset, it will download a file from gencode website if it not downloaded before
# once it's loaded, it will be cached so future loads will be fast
index = gencode_load("GRCh37")

# locate which gene chr:pos is in
gencode_locate(index, "chr5", 149526621)
# it will return
# 1-element Array{Any,1}:
# Dict{ASCIIString,Any}("gene"=>"PDGFRB","number"=>1,"transcript"=>"ENST00000261799.4","type"=>"intron")
```

0 comments on commit 487db9a

Please sign in to comment.