Skip to content

Commit

Permalink
Recognize SURVIVOR simSV file #43
Browse files Browse the repository at this point in the history
  • Loading branch information
lsantuari committed Mar 31, 2020
1 parent c746e05 commit d733ffc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/R/vcf2bedpe.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ p <- add_argument(p, "-p", help="SVTYPE=INS if insertion length >= SV length * p
type="numeric", default=0.7)
p <- add_argument(p, "-l", help="Minimum SV length to consider", type="int",
default=50)
p <- add_argument(p, "-s", help="Is the input file from SURVIVOR simSV? TRUE/FALSE",
type="boolean", default=FALSE)

# parse the command line arguments
argv <- parse_args(p)
Expand Down Expand Up @@ -65,9 +63,9 @@ apply_svtype <- function(gr, p_inslen)

sv_callset_vcf <- VariantAnnotation::readVcf(argv$i)

if(argv$s)
# handle SURVIVOR simSV SVTYPE <TRA> as TIGRA <CTX>
if("TRA" %in% info(sv_callset_vcf)$SVTYPE & !("CT" %in% names(info(sv_callset_vcf))))
{
# handle SURVIVOR simSV SVTYPE <TRA> as TIGRA <CTX>
info(sv_callset_vcf)$SVTYPE[info(sv_callset_vcf)$SVTYPE=="TRA"] <- "CTX"
}

Expand Down

0 comments on commit d733ffc

Please sign in to comment.