forked from knausb/vcfR
-
Notifications
You must be signed in to change notification settings - Fork 1
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
35 changed files
with
620 additions
and
95 deletions.
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
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ Description: Facilitates easy manipulation of variant call format (VCF) data. | |
Once processing is complete data may be written to a VCF file (*.vcf.gz). | ||
It also may be converted into other popular R objects (e.g., genlight, DNAbin). | ||
VcfR provides a link between VCF data and familiar R software. | ||
Version: 1.1.0 | ||
Version: 1.2.0 | ||
Authors@R: c(person(c('Brian', 'J.'), 'Knaus', role = c('cre', 'aut'), | ||
email = '[email protected]'), | ||
person(c('Niklaus', 'J.'), 'Grunwald', role = 'aut', | ||
|
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -217,13 +217,20 @@ extract.info <- function(x, element, as.numeric=FALSE, mask=FALSE){ | |
stop("Expecting an object of class vcfR or chromR.") | ||
} | ||
|
||
values <- unlist( | ||
lapply(strsplit(unlist( | ||
# lapply(strsplit([email protected]$INFO, split=";"), | ||
lapply(strsplit(x@fix[,'INFO'], split=";"), | ||
function(x){grep(paste("^", element, "=", sep=""), x, value=TRUE)})), | ||
split="="), function(x){x[2]}) | ||
) | ||
# values <- unlist( | ||
# lapply(strsplit(unlist( | ||
# lapply(strsplit(x@fix[,'INFO'], split=";"), | ||
# function(x){grep(paste("^", element, "=", sep=""), x, value=TRUE)})), | ||
# split="="), function(x){x[2]}) | ||
# ) | ||
|
||
values <- strsplit(x@fix[,'INFO'], split=";") | ||
values <- lapply(values, function(x){grep(paste("^", element, "=", sep=""), x, value=TRUE)}) | ||
values <- lapply(values, function(x){ unlist( strsplit(x, split="=") ) }) | ||
values <- lapply(values, function(x){x[2]}) | ||
values <- lapply(values, function(x){ if(is.null(x)){NA}else{x} }) | ||
values <- unlist(values) | ||
|
||
|
||
if(as.numeric == TRUE){ | ||
values <- as.numeric(values) | ||
|
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
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
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
Oops, something went wrong.