Skip to content

Commit

Permalink
add new field exon_frames to json
Browse files Browse the repository at this point in the history
  • Loading branch information
Christine Lo committed Aug 20, 2015
1 parent b0b16d0 commit 3e44f32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyhgvs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def read_refgene(infile):
exon_starts = map(int, row[9].split(',')[:-1])
exon_ends = map(int, row[10].split(',')[:-1])
exon_frames = map(int, row[15].split(',')[:-1])
exons = zip(exon_starts, exon_ends, exon_frames)
exons = zip(exon_starts, exon_ends)

yield {
'chrom': row[2],
Expand All @@ -60,6 +60,7 @@ def read_refgene(infile):
'cds_end': int(row[7]),
'gene_name': row[12],
'exons': exons,
'exon_frames': exon_frames
}


Expand Down Expand Up @@ -93,7 +94,7 @@ def make_transcript(transcript_json):
if not transcript.tx_position.is_forward_strand:
exons = reversed(exons)

for exon_number, (exon_start, exon_end, exon_frame) in enumerate(exons, 1):
for exon_number, (exon_start, exon_end) in enumerate(exons, 1):
transcript.exons.append(
Exon(transcript=transcript,
tx_position=Position(
Expand Down

0 comments on commit 3e44f32

Please sign in to comment.