Skip to content

Commit

Permalink
add gene name in gencode index
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Feb 22, 2016
1 parent c3eef99 commit 863e9ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Reference/Gencode/index.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const GENCODE_INDEX_VER = 1
const GENCODE_INDEX_VER = 2

immutable GencodeExon
number::Int32
Expand All @@ -16,6 +16,7 @@ end

type GencodeGene
name::ASCIIString
chr::ASCIIString
id::ASCIIString
start_pos::Int64
end_pos::Int64
Expand Down Expand Up @@ -92,7 +93,7 @@ function parse_gencode(filename::AbstractString)
if row.feature == "gene"
gene_id = strip(row.attributes["gene_id"], '"')
gene_name = strip(row.attributes["gene_name"], '"')
gene = GencodeGene(gene_name, gene_id, row.start_pos, row.end_pos, row.strand, row.attributes, Array{GencodeTranscript, 1}())
gene = GencodeGene(gene_name, row.seqname, gene_id, row.start_pos, row.end_pos, row.strand, row.attributes, Array{GencodeTranscript, 1}())
if !haskey(index, row.seqname)
index[row.seqname] = []
end
Expand Down

0 comments on commit 863e9ff

Please sign in to comment.