Skip to content

Commit

Permalink
Merge pull request #10 from DEploid-dev/change_submodule_path
Browse files Browse the repository at this point in the history
Change submodule path
  • Loading branch information
shajoezhu authored Dec 22, 2024
2 parents 51706d0 + dbc8a2e commit 651cec1
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 2,795 deletions.
32 changes: 26 additions & 6 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,33 @@
LICENSE
.github
\*\.o
src/vcf/vcfReader.o
src/vcf/gzstream/gzstream.o
src/vcf/txtReader.o
src/vcf/variantIndex.o
src/vcf/vcfReaderDebug.o
DEploid.utils/libs/DEploid.utils.so
\*\.png
\*\.pdf
DEploid-vcf-lib
codecov.yml


# submodule
vcf/src/gzstream/version
src/vcf/.git
src/vcf/.ci/
src/vcf/.circleci/
src/vcf/.github/
src/vcf/.gitignore
src/vcf/Brewfile
src/vcf/COPYING
src/vcf/CPPLINT.cfg
src/vcf/Makefile.am
src/vcf/README.md
src/vcf/bootstrap
src/vcf/configure.ac
src/vcf/coverage/
src/vcf/data/
src/vcf/main.cpp
src/vcf/tests/
src/vcf/version
src/vcf/src/gzstream/gzstream.o
src/vcf/src/txtReader.o
src/vcf/src/variantIndex.o
src/vcf/src/vcfReader.o
src/vcf/src/vcfReaderDebug.o
2 changes: 2 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "DEploid-vcf-lib"]
path = DEploid-vcf-lib
path = src/vcf
url = https://github.com/DEploid-dev/DEploid-vcf-lib
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: DEploid.utils
Title: 'DEploid' Data Analysis and Results Interpretation
Version: 0.0.1
Version: 0.0.2
Authors@R: c(
person("Joe", "Zhu", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-7566-2787")),
Expand Down
1 change: 0 additions & 1 deletion DEploid-vcf-lib
Submodule DEploid-vcf-lib deleted from dc03c0
9 changes: 7 additions & 2 deletions R/errorAnalysis.r
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ dEploidOutError_3 <- function(h.pair, h.pair.true, rel.cost.switch = 2, do.plot

dropTimes <- sum(diff(drop.strain) != 0)
dropError <- sum(drop.strain != 0)
cat("\nDecoding gives:\nNo. switches:\t", n.s - dropTimes, "\nNo. GT errs:\t", n.gt, "\nNo. Drop errs:\t", dropError, "\n")
message(paste0("\nDecoding gives:\nNo. switches:\t", n.s - dropTimes,
"\nNo. GT errs:\t", n.gt,
"\nNo. Drop errs:\t", dropError, "\n"))
return(list(
switchError = n.s - dropTimes,
mutError = n.gt,
Expand Down Expand Up @@ -299,7 +301,10 @@ dEploidOutError_2 <- function(h.pair, h.pair.true, rel.cost.switch = 2, do.plot
# definite.switch = sum(!changed.permn.at %in% changed.k.eff.at)
dropTimes <- sum(diff(drop.strain) != 0) # length(changed.k.eff.at)
dropError <- sum(drop.strain != 0)
cat("\nDecoding gives:\nNo. switches:\t", n.s - dropTimes, "\nNo. GT errs:\t", n.gt, "\nNo. Drop switches", dropTimes, "\nNo. Drop errs:\t", dropError, "\n")
message(paste0("\nDecoding gives:\nNo. switches:\t",n.s - dropTimes,
"\nNo. GT errs:\t", n.gt,
"\nNo. Drop switches", dropTimes,
"\nNo. Drop errs:\t", dropError, "\n"))


hap.pair.true.idx <- array(unlist(possible.permn[op]), c(2, length(op)))
Expand Down
16 changes: 8 additions & 8 deletions R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ plot_total_coverage <- function(ref, alt, chroms, cex.lab = 1, cex.main = 1, cex
}


fun_dataExplore <- function(coverage, PLAF, prefix = "", pdfBool, threshold = 0.995, window.size = 10) {
fun_dataExplore <- function(coverage, PLAF, prefix = tempdir(), pdfBool, threshold = 0.995, window.size = 10) {
# PLAF = plafInfo$PLAF
ref <- coverage$refCount
alt <- coverage$altCount
Expand Down Expand Up @@ -189,7 +189,7 @@ fun_dataExplore <- function(coverage, PLAF, prefix = "", pdfBool, threshold = 0.
}


fun_interpretDEploid_best <- function(coverage, PLAF, dEploidPrefix, prefix = "", exclude, pdfBool) {
fun_interpretDEploid_best <- function(coverage, PLAF, dEploidPrefix, prefix = tempdir(), exclude, pdfBool) {
ref <- coverage$refCount
alt <- coverage$altCount

Expand Down Expand Up @@ -243,7 +243,7 @@ fun_interpretDEploid_best <- function(coverage, PLAF, dEploidPrefix, prefix = ""
}


fun_interpretDEploid_1 <- function(coverage, PLAF, dEploidPrefix, prefix = "", exclude, pdfBool) {
fun_interpretDEploid_1 <- function(coverage, PLAF, dEploidPrefix, prefix = tempdir(), exclude, pdfBool) {
# PLAF = plafInfo$PLAF
ref <- coverage$refCount
alt <- coverage$altCount
Expand Down Expand Up @@ -375,7 +375,7 @@ plot_wsaf_vs_index <- function(coverage, expWSAF = c(), expWSAFChrom = c(), excl
}


fun_interpretDEploid_2 <- function(coverage, dEploidPrefix, prefix = "", exclude, pdfBool, ringBool = FALSE, dEploid_v = "classic") {
fun_interpretDEploid_2 <- function(coverage, dEploidPrefix, prefix = tempdir(), exclude, pdfBool, ringBool = FALSE, dEploid_v = "classic") {
dEploidOutput <- fun_dEploidPrefix(dEploidPrefix, dEploid_v)
if (dEploid_v == "classic") {
tmpProp <- read.table(dEploidOutput$propFileName, header = F)
Expand Down Expand Up @@ -464,7 +464,7 @@ plot_postProb_ofCase <- function(inPrefix, outPrefix, case, strainNumber, pdfBoo
}


fun_interpretDEploid_3 <- function(inPrefix, outPrefix = "", pdfBool, inbreeding = FALSE) {
fun_interpretDEploid_3 <- function(inPrefix, outPrefix = tempdir(), pdfBool, inbreeding = FALSE) {
strainI <- 0
while (file.exists(paste(inPrefix, ".single", strainI, sep = ""))) {
plot_postProb_ofCase(inPrefix, outPrefix, paste("single", strainI, sep = ""), strainI, pdfBool)
Expand All @@ -476,7 +476,7 @@ fun_interpretDEploid_3 <- function(inPrefix, outPrefix = "", pdfBool, inbreeding
}


fun_interpretDEploid_4 <- function(inPrefix, outPrefix = "", pdfBool) {
fun_interpretDEploid_4 <- function(inPrefix, outPrefix = tempdir(), pdfBool) {
inFile <- paste(inPrefix, ".ibd.probs", sep = "")
if (!file.exists(inFile)) {
warning("In file not exist")
Expand Down Expand Up @@ -508,7 +508,7 @@ fun_interpretDEploid_4 <- function(inPrefix, outPrefix = "", pdfBool) {
}


fun_interpretDEploid_3_ring <- function(inPrefix, outPrefix = "", pdfBool, inbreeding = FALSE, coverage, exclude, ringDecreasingOrder, trackHeight = 0.8, transformP = FALSE) {
fun_interpretDEploid_3_ring <- function(inPrefix, outPrefix = tempdir(), pdfBool, inbreeding = FALSE, coverage, exclude, ringDecreasingOrder, trackHeight = 0.8, transformP = FALSE) {
if (pdfBool == TRUE) {
cexSize <- 3
if (inbreeding) {
Expand Down Expand Up @@ -639,7 +639,7 @@ plot_ibd_change <- function(changeAt, titlePrefix, nFigures) {
}


# fun_interpretDEploid_4 <- function(inPrefix, outPrefix = "", pdfBool){
# fun_interpretDEploid_4 <- function(inPrefix, outPrefix = tempdir(), pdfBool){
# fileName = paste(inPrefix, ".extra", sep = "")
# if ( file.exists(fileName) ){
# obj = read.table(fileName , header=T)
Expand Down
12 changes: 6 additions & 6 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
OBJECTS.vcfr = rvcf.o \
RcppExports.o \
vcf/txtReader.o \
vcf/variantIndex.o \
vcf/vcfReader.o \
vcf/gzstream/gzstream.o \
vcf/vcfReaderDebug.o
vcf/src/txtReader.o \
vcf/src/variantIndex.o \
vcf/src/vcfReader.o \
vcf/src/gzstream/gzstream.o \
vcf/src/vcfReaderDebug.o

OBJECTS = $(OBJECTS.vcfr)
PKG_CXXFLAGS = -I/usr/share/R/include/ -Ivcf/ -Ivcf/gzstream/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS
PKG_CXXFLAGS = -I/usr/share/R/include/ -Ivcf/src/ -Ivcf/src/gzstream/ -DVERSION="\"R\"" -DRBUILD -DSTRICT_R_HEADERS
PKG_LIBS = -lz
2 changes: 1 addition & 1 deletion src/rvcf.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Rcpp.h>
#include "vcf/vcfReader.hpp"
#include "vcf/src/vcfReader.hpp"

using namespace Rcpp;

Expand Down
1 change: 1 addition & 0 deletions src/vcf
Submodule vcf added at 9942cf
Loading

0 comments on commit 651cec1

Please sign in to comment.