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

read.junctions #58

Merged
merged 3 commits into from
Dec 7, 2021
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
8 changes: 3 additions & 5 deletions R/JaBbA.R
Original file line number Diff line number Diff line change
Expand Up @@ -3211,8 +3211,6 @@ jbaLP = function(kag.file = NULL,
kag.gg$edges$mark(cn = NULL)
kag.gg$nodes[cn > M]$mark(cn = NA, weight = NA)

## browser()

## add lower bounds depending on ALT junction tier
if (tfield %in% colnames(kag.gg$edges$dt)) {
lbs = ifelse(kag.gg$edges$dt[, ..tfield] == 1, 1, 0)
Expand Down Expand Up @@ -6722,14 +6720,14 @@ read.junctions = function(rafile,
, tier := ifelse(
tier==2, ifelse(grepl("1", this.geno), 2, 3), 3)]
values(this.ra) = this.dt
return(this.ra)
return(verify.junctions(this.ra))
})
loose=FALSE ## TODO: temporary until we figure out how
}
}

if (!get.loose | is.null(vgr$mix)){
return(ra)
return(verify.junctions(ra))
} else {
npix = is.na(vgr$mix)
## these are possible "loose ends" that we will add to the segmentation
Expand All @@ -6744,7 +6742,7 @@ read.junctions = function(rafile,
values(vgr.loose) = cbind(vcf@fixed[bix[npix], ], info(vcf)[bix[npix], ])
}

return(list(junctions = ra, loose.ends = vgr.loose))
return(list(junctions = verify.junctions(ra), loose.ends = vgr.loose))
}
} else{
rafile = data.table::fread(rafile)
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test_filterloose.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_that(desc = "Testing LP JaBbA with .bw coverage input",
slack.penalty = 10,
tilim = 60,
cfield = 'ratio',
reiterate = 2,
verbose = 2,
outdir = 'JaBbA.filter',
overwrite = TRUE,
Expand Down Expand Up @@ -61,7 +62,7 @@ test_that(desc = "Testing LP JaBbA with .bw coverage input",
rescue.all = FALSE,
filter_loose = FALSE))
},
regexp = "Resetting rescue.all to TRUE")
regexp = "Skipping loose end annotation")
})

test_that(desc = "Testing LP JaBbA with .bw coverage input",
Expand Down