Skip to content

Commit

Permalink
Merge pull request #8 from rptashkin/feature/facets2N
Browse files Browse the repository at this point in the history
Feature/facets2 n
  • Loading branch information
rptashkin authored Jul 27, 2020
2 parents b3c1a43 + 068744c commit c28dfeb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Imports:
facets (>= 0.5.6),
facets2n (>= 0.2.6)
NeedsCompilation: no
Packaged: 2020-07-23 14:48:17 UTC; rptashkin
Packaged: 2020-07-23 15:08:07 UTC; rptashkin
Suggests:
covr (>= 3.2.0),
testthat (>= 2.1.0)
7 changes: 4 additions & 3 deletions R/read-snp-matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ read_snp_matrix = function(input_file,

read_snp_matrix_facets2n = function(filename, err.thresh=Inf, del.thresh=Inf, perl.pileup=FALSE,
MandUnormal=FALSE, spanT=0.2, spanA=0.2, spanX=0.2, gbuild="hg19",
ReferencePileupFile=NULL, ReferenceLoessFile=NULL, MinOverlap=0.9, useMatchedX=FALSE, refX=FALSE){
ReferencePileupFile=NULL, ReferenceLoessFile=NULL, MinOverlap=0.9, useMatchedX=FALSE, refX=FALSE, unmatched=FALSE){
#' #' Read in the snp-pileup generated SNP read count matrix file for facets2n processing
#' @importFrom utils read.csv
#' @param filename counts file from snp-pileup
Expand All @@ -54,6 +54,7 @@ read_snp_matrix_facets2n = function(filename, err.thresh=Inf, del.thresh=Inf, pe
#' @param del.thresh (numeric) Deletion threshold to be used to filter snp-pileup data frame.
#' @param perl.pileup (logical) Is the pileup data generated using perl pileup tool?
#' @param MandUnormal (logical) Is CNLR analysis to be peformed using unmatched reference normals?
#' @param unmatched (logical) is the tumor being analyzed unmatched
#' @param spanT (numeric) Default span value to be used for loess normalization in tumor sample.
#' @param spanA (numeric) Default span value to be used for loess normalization across autosomal chromosomes in the normal sample.
#' @param spanX (numeric) Default span value to be used for loess normalization in Chr X in the normal sample.
Expand All @@ -69,8 +70,8 @@ read_snp_matrix_facets2n = function(filename, err.thresh=Inf, del.thresh=Inf, pe
#' @importFrom pctGCdata getGCpct
#' @export
if (MandUnormal){
facets2n::readSnpMatrix(filename, MandUnormal = MandUnormal, ReferencePileupFile = ReferencePileupFile, ReferenceLoessFile = ReferenceLoessFile, useMatchedX = useMatchedX, refX = refX)
facets2n::readSnpMatrix(filename, MandUnormal = MandUnormal, ReferencePileupFile = ReferencePileupFile, ReferenceLoessFile = ReferenceLoessFile, useMatchedX = useMatchedX, refX = refX, unmatched=unmatched)
}else{
facets2n::readSnpMatrix(filename, MandUnormal = MandUnormal)
facets2n::readSnpMatrix(filename, MandUnormal = MandUnormal, unmatched=unmatched)
}
}
5 changes: 4 additions & 1 deletion man/read_snp_matrix_facets2n.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion run-facets-wrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ if (dir.exists(directory)) {
# Read SNP counts file
message(paste('Reading', args$counts_file))
if(args$facets2n_lib_path != ''){
read_counts = read_snp_matrix_facets2n(args$counts_file,MandUnormal= args$MandUnormal, ReferencePileupFile=args$reference_snp_pileup, ReferenceLoessFile=args$reference_loess_file, useMatchedX=args$useMatchedX, refX=args$refX)
read_counts = read_snp_matrix_facets2n(args$counts_file,MandUnormal= args$MandUnormal, ReferencePileupFile=args$reference_snp_pileup, ReferenceLoessFile=args$reference_loess_file, useMatchedX=args$useMatchedX, refX=args$refX, unmatched=args$unmatched)
}else{
read_counts = read_snp_matrix(args$counts_file)
}
Expand Down

0 comments on commit c28dfeb

Please sign in to comment.