Skip to content

Commit f1a7f85

Browse files
committed
reverted precision to float for tpm and fpkm output
1 parent 2b66559 commit f1a7f85

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

stringtie.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -779,18 +779,15 @@ if(!mergeMode) {
779779
int nl;
780780
int istr;
781781
int tlen;
782-
double tcov;
783-
//float fpkm;
784-
double calc_fpkm;
785-
double calc_tpm;
782+
float tcov; //do we need to increase precision here ? (double)
783+
float calc_fpkm;
784+
float calc_tpm;
786785
int t_id;
787786
while(fgetline(linebuf,linebuflen,ftmp_in)) {
788-
sscanf(linebuf,"%d %d %d %d %lf", &istr, &nl, &tlen, &t_id, &tcov);
789-
//for the rare cases tcov < 0, invert it ??
790-
//if (tcov<0) tcov=-tcov; //should not happen
791-
if (tcov<=0.0) tcov=0.0;
792-
calc_fpkm=tcov*1000000000.0/Frag_Len;
793-
calc_tpm=tcov*1000000.0/Cov_Sum;
787+
sscanf(linebuf,"%d %d %d %d %g", &istr, &nl, &tlen, &t_id, &tcov);
788+
if (tcov<0) tcov=0;
789+
calc_fpkm=tcov*1000000000/Frag_Len;
790+
calc_tpm=tcov*1000000/Cov_Sum;
794791
if(istr) { // this is a transcript
795792
if (ballgown && t_id>0) {
796793
guides_RC_tdata[t_id-1]->fpkm=calc_fpkm;

0 commit comments

Comments
 (0)