Skip to content

Commit

Permalink
In generateMapSnvSel change read.csv2 to read.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
belleau authored and belleau committed Aug 31, 2024
1 parent 79712a4 commit 930b62d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions R/process1KG.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ generateMapSnvSel <- function(cutOff=0.01, fileSNV, fileSNPsRDS, fileFREQ) {
}

## Read the bulk SNP information file
mapSNVSel <- read.csv2(fileSNV)

# mapSNVSel <- read.csv2(fileSNV)
mapSNVSel <- read.csv(fileSNV)
## Identify SNPs that have a frequency equal or superior to the cut-off
## in at least one super population
listSNP <- which(rowSums(mapSNVSel[,c("EAS_AF",
Expand Down
Binary file modified inst/extdata/matFreqSNV_Demo.txt.bz2
Binary file not shown.
1 change: 0 additions & 1 deletion man/RAIDS-package.Rd

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

Binary file modified tests/testthat/fixtures/matFreqSNV_Demo.txt.bz2
Binary file not shown.
24 changes: 12 additions & 12 deletions tests/testthat/test-process1KG.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,18 @@ test_that("generateMapSnvSel() must generate expected output", {
54489, 54707, 54715),
REF=c("T", "T", "C", "G", "G", "G", "C"),
ALT=c("G", "A", "A", "A", "A", "C", "T"),
AF=as.character(c(0.02, 0.11, 0.08, 0.07,
0.1, 0.23, 0.21)),
EAS_AF=c("0.0", "0.0", "0.05", "0.01",
"0.0", "0.08", "0.07"),
EUR_AF=c("0.04", "0.2", "0.12", "0.14",
"0.18", "0.38", "0.34"),
AFR_AF=c("0.03", "0.02", "0.05", "0.06",
"0.02", "0.18", "0.16"),
AMR_AF=c("0.03", "0.12", "0.06", "0.07",
"0.1", "0.25", "0.24"),
SAS_AF=c("0.02", "0.22", "0.1", "0.09",
"0.21", "0.28", "0.27"),
AF=c(0.02, 0.11, 0.08, 0.07,
0.1, 0.23, 0.21),
EAS_AF=c(0.0, 0.0, 0.05, 0.01,
0.0, 0.08, 0.07),
EUR_AF=c(0.04, 0.2, 0.12, 0.14,
0.18, 0.38, 0.34),
AFR_AF=c(0.03, 0.02, 0.05, 0.06,
0.02, 0.18, 0.16),
AMR_AF=c(0.03, 0.12, 0.06, 0.07,
0.1, 0.25, 0.24),
SAS_AF=c(0.02, 0.22, 0.1, 0.09,
0.21, 0.28, 0.27),
stringsAsFactors = FALSE)

expect_equivalent(readRDS(filterSNVFile), snpFilteredExpected)
Expand Down

0 comments on commit 930b62d

Please sign in to comment.