Created
December 2, 2024 19:08
-
-
Save mgaynor1/a12584cbe8b722c93e746a513b4c5968 to your computer and use it in GitHub Desktop.
AlternativeFunction-nQuack
This file contains hidden or 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
| process_data_chrom <- function(file, min.depth = 2, max.depth.quantile.prob = 0.9, | |
| error = 0.01, trunc = c(0,0), chrom){ | |
| df <- data.table::fread(file, sep = "\t") | |
| if(ncol(df) != 7){ | |
| message("Did you run `prepare_data()` on this file? Your data is in the wrong format, please correct and try again.") | |
| } else{ | |
| df <- df[which(df$chr == chrom), 3:7] | |
| df <- stats::na.omit(df) | |
| dfm <- as.matrix(df) | |
| allelefreq <- process_rcpp(dfm, min.depth, max.depth.quantile.prob, trunc, error ) | |
| return(allelefreq) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.