Comments (10)
Hi Paulo,
Just run library(VariantAnnotation)
before running your script.
from polyrad.
Unfortunately it is still not working. It might be the GRanges and IRanges. I'm using the zipfile cataloge.vcf file generated by Stacks, but I cannot work out where the problem is. I tried running without "which=...", but it didn't work either.
from polyrad.
What error are you getting?
from polyrad.
Hi Lindsay,
This is the beginning of script followed by error:
myRAD <- VCF2RADdata("catalog.alleles.tsv.gz",
-
svparam = ScanVcfParam(fixed = "ALT", info = NA, geno = "AD",
-
which = GRanges("06", IRanges(1, 937644))),
-
yieldSize = NA)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'object' in selecting a method for function 'samples': [internal] _hts_rewind() failed
from polyrad.
from polyrad.
Hi Clark,
I'm a bit stuck in the "object" to be used. In one of your scripts you show the following path:
VCF2RADdata(file, phaseSNPs = TRUE, tagsize = 80, refgenome = NULL,
tol = 0.01, al.depth.field = "AD", min.ind.with.reads = 200,
min.ind.with.minor.allele = 10, possiblePloidies = list(2),
taxaPloidy = 2L, contamRate = 0.001,
samples = VariantAnnotation::samples(VariantAnnotation::scanVcfHeader(file)),
svparam = VariantAnnotation::ScanVcfParam(fixed = "ALT", info = NA,
geno = al.depth.field,
samples = samples),
yieldSize = 5000, expectedAlleles = 5e+05, expectedLoci = 1e+05,
maxLoci = NA)
I'm not sure which VCF files to use. Would it be "populations.snps.vcf? or "populations.haps.vcf"?
And what about the catalog.alleles.tsv?
I have tried many ways, but none worked.
Cheers
from polyrad.
Hi Paulo,
That looks like the usage section of the VCF2RADdata
documentation. The argument defaults are shown, and you don't have to type the arguments if you are okay with the defaults.
I haven't used Stacks in a long time. If your VCF looks like this:
https://github.com/galaxyproject/tools-iuc/blob/main/tools/stacks2/test-data/populations/populations.haps.vcf
it won't work because the AD field is not included. However one like this should work: https://github.com/galaxyproject/tools-iuc/blob/main/tools/stacks2/test-data/populations/populations.snps.vcf
Your code (in its simplest version) would look like:
mydata <- VCF2RADdata("populations.snps.vcf")
You don't need catalog.alleles.tsv if you are using VCF2RADdata
. That file is only needed for readStacks
.
Best,
Lindsay
from polyrad.
from polyrad.
Should be okay. I was concerned about the missing AD field for missing genotypes (./.
) but did a quick test and polyRAD handles those appropriately. If you continue to have issues, please provide your code and a small dataset so that I can reproduce the problem on my own machine.
from polyrad.
That being said, you will have to lower the values for the min.ind.with.reads
and min.ind.with.minor.allele
arguments to VCF2RADdata
since you have so few samples. polyRAD's genotyping algorithms may perform poorly on a sample size this small but you can use the naΓ―ve protocol shown in https://lvclark.r-universe.dev/articles/polyRADtutorials/population_genetics.html (just search the page for mydataNaive
and follow that protocol for genotyping).
from polyrad.
Related Issues (15)
- Export to additional population genetics formats HOT 3
- RADdata2VCF with asSNPs=TRUE gives error HOT 1
- Export to and import from updog HOT 2
- How to use user input VCF file? HOT 1
- "ExpectedHindHe" not found while all other functions of polyRAD work HOT 12
- number of loci HOT 2
- Support multiploid populations
- Support pedigreed populations HOT 3
- Best practice for Multiparent population HOT 1
- Error message on R when reading isoloci HOT 7
- Error in RADdata2VCF HOT 6
- Export_MAPpoly error HOT 5
- TestOverdispersion: Genotype quality too low for this protocol
- HidHe is not found 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 polyrad.