Skip to content

Commit 63c1412

Browse files
authored
Merge pull request #517 from GoekeLab/devel_pre_v4_dplyr
This pull request is for fix redundant single exon in final output. And this will also fix the dplyr warning.
2 parents cf1817b + 151aae3 commit 63c1412

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

R/bambu-extendAnnotations-utilityCombine.R

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -304,23 +304,14 @@ makeUnsplicedTibble <- function(combinedNewUnsplicedSe,newUnsplicedSeList,
304304
} , BPPARAM = bpParameters))
305305
newUnsplicedTibble <- newUnsplicedTibble %>%
306306
left_join(rowDataCombined, by = "row_id") %>%
307-
separate(row_id, c("sample","rcName"), sep = "\\-") %>%
308-
mutate(sample_id = as.integer(gsub("s","",sample))) %>%
309-
mutate(sample_name = colDataNames[sample_id]) %>%
310-
select(-sample, -sample_id) %>%
311307
mutate(readCount_tmp = readCount) %>%
312-
group_by(chr,strand, start, end, sample_name) %>%
308+
group_by(chr,strand, start, end) %>%
313309
summarise(readCount = sum(readCount),
314-
geneReadProp = sum(geneReadProp),
315-
txScore = weighted.mean(txScore, readCount_tmp),
316-
txScore.noFit = weighted.mean(txScore.noFit, readCount_tmp)) %>%
317-
group_by(chr, strand, start, end) %>%
318-
summarise(readCount = sum(readCount),
319-
maxTxScore = txScore,
320-
maxTxScore.noFit = txScore.noFit,
321-
NSampleReadCount = sum(readCount >= min.readCount),
322-
NSampleReadProp = sum(geneReadProp >=
323-
min.readFractionByGene),
324-
NSampleTxScore = sum(maxTxScore > min.txScore.singleExon))
310+
maxTxScore = weighted.mean(txScore, readCount_tmp),
311+
maxTxScore.noFit = weighted.mean(txScore.noFit, readCount_tmp),
312+
NSampleReadCount = sum(readCount_tmp >= min.readCount),
313+
NSampleReadProp = sum(geneReadProp >=
314+
min.readFractionByGene),
315+
NSampleTxScore = sum(txScore > min.txScore.singleExon))
325316
return(newUnsplicedTibble)
326317
}

0 commit comments

Comments
 (0)