Skip to content

Commit 86c662f

Browse files
committed
added tested version of get_transcript_sjs
1 parent ec55c23 commit 86c662f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/talon/post/get_transcript_sjs.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def find_edge_start_stop(v1, v2, strand):
174174
# get some fields from gtf that we care about
175175
chrom = line[0]
176176
entry_type = line[2]
177-
start = line[3]
178-
stop = line[4]
177+
start = int(line[3])
178+
stop = int(line[4])
179179
strand = line[6]
180180
fields = line[-1]
181181

@@ -184,11 +184,9 @@ def find_edge_start_stop(v1, v2, strand):
184184
attributes = get_fields(fields)
185185
tid = attributes['transcript_id']
186186
gid = attributes['gene_id']
187-
gname = attributes['gene_name']
188187

189188
# add transcript to dictionary
190189
transcript = {tid: {'gid': gid,
191-
'gname': gname,
192190
'tid': tid,
193191
'strand': strand,
194192
'exons': []}}
@@ -205,8 +203,8 @@ def find_edge_start_stop(v1, v2, strand):
205203
if eid not in exons:
206204
edge = {eid: {'eid': eid,
207205
'chrom': chrom,
208-
'v1': int(start),
209-
'v2': int(stop),
206+
'v1': start,
207+
'v2': stop,
210208
'strand': strand}}
211209
exons.update(edge)
212210

@@ -289,7 +287,6 @@ def find_edge_start_stop(v1, v2, strand):
289287

290288
transcripts = [{'tid': key,
291289
'gid': item['gid'],
292-
'gname': item['gname'],
293290
'path': item['path']} for key, item in transcripts.items()]
294291
t_df = pd.DataFrame(transcripts)
295292

0 commit comments

Comments
 (0)