-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 4 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageUseDevtools: Yes | ||
PackageInstallArgs: --no-multiarch --with-keep.source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#' CNVMetrics: Copy number variant metrics | ||
#' | ||
#' This package implements metrics to facilite copy number variant | ||
#' comparison among samples and/or methods. | ||
#' | ||
#' @docType package | ||
#' | ||
#' @name CNVMetrics-package | ||
#' | ||
#' @aliases CNVMetrics-package CNVMetrics | ||
#' | ||
#' @author Astrid Deschênes and | ||
#' Pascal Belleau | ||
#' | ||
#' Maintainer: | ||
#' Astrid Deschenes <[email protected]> | ||
#' | ||
#' @keywords package | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#' @param filepath a \code{character} string, the path to the file to | ||
#' read. Alternatively can be a connection. | ||
#' | ||
#' @param uniqueTag a \code{character} string, the unique name assigned to | ||
#' the segment data associated to this file. Each imported file should | ||
#' have a unique tag. | ||
#' | ||
#' @param header a \code{logical}, when \code{TRUE}, the | ||
#' file has a header that should not be imported. Default: \code{FALSE}. | ||
#' | ||
#' @return a \code{GRanges} containing the segment information from the file. | ||
#' | ||
#' @examples | ||
#' | ||
#' # TODO | ||
#' | ||
#' @author Astrid Deschenes, Pascal Belleau | ||
#' @importFrom GenomicRanges GRanges | ||
#' @export | ||
readSEGFile <- function(filepath, uniqueTag, header=FALSE) { | ||
|
||
if (!is.character(uniqueTag)) { | ||
stop("uniqueTag must be a character string.") | ||
} | ||
|
||
if (!is.logical(header)) { | ||
stop("header must be a logical value.") | ||
} | ||
|
||
data <- read.table(filepath, header=header) | ||
|
||
if (nrow(data) < 6) { | ||
stop("The segment file must have at least 6 columns.") | ||
} | ||
|
||
dataRanges <- GRanges(seqnames = data$V2, | ||
ranges=IRanges(start=data$V3, end=data$V4), | ||
score=data$V6, source=uniqueTag) | ||
|
||
return(dataRanges) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
|
||
# CNVMetrics | ||
R Package to compare copy number variant (CNV) results from multiple samples | ||
|
||
A R package to compare copy number variant (CNV) results from multiple samples/methods. | ||
|
||
|
||
## Authors ## | ||
|
||
[Astrid Deschênes](http://ca.linkedin.com/in/astriddeschenes "Astrid Deschênes") and | ||
[Pascal Belleau](http://ca.linkedin.com/in/pascalbelleau "Pascal Belleau") | ||
|
||
|
||
## License ## | ||
|
||
This package and the underlying CNVMetrics code are distributed under | ||
the Artistic license 2.0. You are free to use and redistribute this software. | ||
|
||
For more information on Artistic 2.0 License see | ||
[http://opensource.org/licenses/Artistic-2.0](http://opensource.org/licenses/Artistic-2.0) |