-
Notifications
You must be signed in to change notification settings - Fork 3
Madc2vcf updates #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Madc2vcf updates #53
Changes from all commits
5c0b590
9afb265
c31118d
5d54f0d
7c12d49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -60,8 +60,11 @@ madc2vcf_all <- function(madc = NULL, | |||||||||||||||||
| multiallelic_SNP_sample_thr = 0, | ||||||||||||||||||
| alignment_score_thr = 40, | ||||||||||||||||||
| out_vcf = NULL, | ||||||||||||||||||
| markers_info = NULL, | ||||||||||||||||||
| verbose = TRUE){ | ||||||||||||||||||
|
|
||||||||||||||||||
| vmsg("Checking inputs", verbose = verbose, level = 0, type = ">>") | ||||||||||||||||||
|
|
||||||||||||||||||
| # Input checks | ||||||||||||||||||
| if(!is.null(madc) & !file.exists(madc)) stop("MADC file not found. Please provide a valid path.") | ||||||||||||||||||
| if(!is.null(botloci_file) & !file.exists(botloci_file)) stop("Botloci file not found. Please provide a valid path.") | ||||||||||||||||||
|
|
@@ -85,8 +88,8 @@ madc2vcf_all <- function(madc = NULL, | |||||||||||||||||
| bigr_meta <- paste0('##BIGrCommandLine.madc2vcf_all=<ID=madc2vcf_all,Version="', | ||||||||||||||||||
| packageVersion("BIGr"), '",Data="', | ||||||||||||||||||
| Sys.time(),'", CommandLine="> madc2vcf_all(',deparse(substitute(madc)),', ', | ||||||||||||||||||
| "botloci= ", botloci_file, ', ', | ||||||||||||||||||
| "hap_seq= ", hap_seq_file, ', ', | ||||||||||||||||||
| "botloci_file= ", botloci_file, ', ', | ||||||||||||||||||
| "hap_seq_file= ", hap_seq_file, ', ', | ||||||||||||||||||
| "n.cores= ", n.cores, ', ', | ||||||||||||||||||
| "rm_multiallelic_SNP= ", rm_multiallelic_SNP, ', ', | ||||||||||||||||||
| "multiallelic_SNP_dp_thr= ", multiallelic_SNP_dp_thr, ', ', | ||||||||||||||||||
|
|
@@ -95,7 +98,53 @@ madc2vcf_all <- function(madc = NULL, | |||||||||||||||||
| "out_vcf= ", out_vcf, ', ', | ||||||||||||||||||
| "verbose= ", verbose,')">') | ||||||||||||||||||
|
|
||||||||||||||||||
| if(!is.null(madc)) report <- read.csv(madc, check.names = FALSE) else stop("Please provide a MADC file") | ||||||||||||||||||
| report <- read.csv(madc, check.names = FALSE) | ||||||||||||||||||
| checks <- check_madc_sanity(report) | ||||||||||||||||||
|
Comment on lines
99
to
+102
|
||||||||||||||||||
|
|
||||||||||||||||||
| messages_results <- mapply(function(check, message) { | ||||||||||||||||||
| if (check) message[1] else message[2] | ||||||||||||||||||
|
||||||||||||||||||
| if (check) message[1] else message[2] | |
| if (isTRUE(check)) { | |
| message[1] | |
| } else if (isFALSE(check)) { | |
| message[2] | |
| } else { | |
| NA_character_ | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import(ggplot2)was added, butggplot2is not declared in DESCRIPTIONImports/Depends(it's not currently listed). This will failR CMD check(namespace imports must be declared). Either addggplot2to DESCRIPTIONImports, or move it toSuggestsand userequireNamespace()conditionally in plotting code.