Skip to content

Commit

Permalink
read_index nan
Browse files Browse the repository at this point in the history
  • Loading branch information
ploy-np committed Mar 4, 2021
1 parent ac8014f commit d527fc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xpore/scripts/dataprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def index(eventalign_result,pos_start,out_paths,locks):
for index in list(dict.fromkeys(eventalign_result.index)):
transcript_id,read_index = index
pos_end += eventalign_result.loc[index]['line_length'].sum()
f_index.write('%s,%d,%d,%d\n' %(transcript_id,read_index,pos_start,pos_end))

try: # sometimes read_index is nan
f_index.write('%s,%d,%d,%d\n' %(transcript_id,read_index,pos_start,pos_end))
except:
pass
pos_start = pos_end

def parallel_index(eventalign_filepath,summary_filepath,chunk_size,out_dir,n_processes,resume):
Expand Down

0 comments on commit d527fc7

Please sign in to comment.