Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TAPE/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# 1. GeneLength.txt
def counts2FPKM(counts, genelen):
genelen = pd.read_csv(genelen, sep=',')
genelen['TranscriptLength'] = genelen['Transcript end (bp)'] - genelen['Transcript start (bp)']
if 'TranscriptLength' not in genelen.columns:
genelen['TranscriptLength'] = genelen['Transcript end (bp)'] - genelen['Transcript start (bp)']
genelen = genelen[['Gene name', 'TranscriptLength']]
genelen = genelen.groupby('Gene name').max()
# intersection
Expand Down