Comments (3)
Fixed this by adding a filter.common.markers arg to the tidy_vcf call in the function (lines 67-74):
if (data.type == "vcf.file") {
if (verbose)
message("Importing and tidying the VCF...")
input <- radiator::tidy_vcf(data = data, strata = strata.df,
parallel.core = parallel.core, verbose = verbose,
whitelist.markers = whitelist.markers, filename = NULL,
vcf.metadata = vcf.metadata, vcf.stats = vcf.stats,
gt.vcf.nuc = TRUE, gt.vcf = TRUE, gt = TRUE, gt.bin = TRUE,
path.folder = path.folder, internal = TRUE, tidy.check = FALSE, filter.common.markers = filter.common.markers)
biallelic <- radiator::detect_biallelic_markers(input)
}
from radiator.
Somewhat related: I'm importing the vcf that was output from a previous run of filter_rad. It would probably be easier to just directly import the .rad that filter_rad produced, but I ran filter_rad without strata but now want them. Using tidy_genomic_data() on the vcf seemed like the easiest way to do this. Is there a way to import a tidy genomic file into R an apply a strata, or change strata on a tidy genomic object already in memory?
edit: I just tried using read_rad + read_strata + join_strata, but get an error when running join_strata.
>tidy.test <- read_rad(data="sphanorth124spatial.radiator.50pctmsng.oneSNPmac3.rad")
>strata.test <- read_strata(strata="sphanorth124spatial_popcoords_radiator_strata.txt")
>tidy.test2 <- join_strata(data=tidy.test,
> strata=strata.test)
Synchronizing data and strata...
Error in UseMethod("filter_") :
no applicable method for 'filter_' applied to an object of class "list"
from radiator.
about the strata, the reason you're getting an error is that the function read_strata
return a list (doc).
It was an internal function that I was using to blacklist id, set levels, etc. Made it public, but but realize that the return object is not natural and you have to read the function. This might change in the future.
so you could try this to add or change existing strata.
old.tidy <- radiator::read_rad(data="sphanorth124spatial.radiator.50pctmsng.oneSNPmac3.rad")
new.strata <- radiator::read_strata(strata="sphanorth124spatial_popcoords_radiator_strata.txt") %$% strata
new.tidy <- radiator::join_strata(
data = old.tidy,
strata = new.strata
)
I've change the example in read_strata to make it more obvious.
This will be covered in the vignette
from radiator.
Related Issues (20)
- filter_rad error: Column `READ_DEPTH` is a `SeqVarDataList` object. HOT 1
- filter_rad issue error/dplyr:::mutate_error ! & DynamicClusterCall()
- error in reading VCF file HOT 1
- The GDS node "$ref" does not exist. HOT 5
- Genomic converter error 'no more individuals in your data' HOT 9
- Error in file(con, "r") : cannot open the connection HOT 1
- Error when using genomic_converter genlight --> pcadapt HOT 3
- Potential help error with DArT HOT 3
- The GDS node "$ref" does not exist. HOT 4
- genomic_converter errors HOT 5
- Error in `dplyr::mutate()` - No Variants Selected HOT 5
- genomic converter() Error:>! `everything()` must be used within a *selecting* function. HOT 1
- Error Converting VCF to Genepop HOT 12
- read_vcf file access error with parallel.core = 1L argument HOT 3
- ERROR with detect_duplicate_genome + tidy format obtained from genomic_converter HOT 3
- Error with genomic_converter HOT 2
- Help with bayescan 2.1 installation on linux system HOT 1
- genomic_converter:bed -> genind. strata HOT 2
- error Sexy_markers operator is invalid for atomic vectors HOT 2
- Error in "generate_id_stats" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radiator.