Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add split reads 2 to arriba split_cnt in cff, fix logic for FC split … #132

Merged
merged 5 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#127](https://github.com/mskcc/forte/pull/127) - allow dynamic increase of memory for process_single label

- [#132](https://github.com/mskcc/forte/pull/132) - fix generate cff split/span logic for fusioncatcher and arriba

### `Dependencies`

### `Deprecated`
Expand Down
12 changes: 4 additions & 8 deletions bin/make_cff_from_forte.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ make_arriba <- function(sample_file) {
df$strand2 <-
str_split_fixed(sample_file$`strand2(gene/fusion)`, "/", 2)[, 1]
df$tool <- "arriba"
df$split_cnt <- apply(sample_file[,c("split_reads1","split_reads2")], 1, sum,na.rm=TRUE)
df$split_cnt <-
ifelse(!is.na(sample_file$split_reads1),
sample_file$split_reads1,
ifelse( !is.na(df$split_cnt),
df$split_cnt,
-1)
df$span_cnt <-
ifelse(!is.na(sample_file$discordant_mates),
Expand Down Expand Up @@ -85,12 +86,7 @@ make_fusioncatcher <- function(sample_file) {
df$strand2 <-
str_split_fixed(sample_file[, "Fusion_point_for_gene_2(3end_fusion_partner)"], ":", 3)[, 3]
df$tool <- "fusioncatcher"
df$split_cnt <-
ifelse(
!is.na(sample_file$Spanning_unique_reads),
sample_file$Spanning_unique_reads,
-1
)
df$split_cnt <- -1
df$span_cnt <-
ifelse(!is.na(sample_file$Spanning_pairs),
sample_file$Spanning_pairs,
Expand Down
Loading