knausb / vcfR

Tools to work with variant call format files
248 stars 54 forks source link

Confusing description of "consensus" option in vcfR2DNAbin() #82

Closed V-Z closed 7 years ago

V-Z commented 7 years ago

Hello, ?vcfR2DNAbin states for consensus option "logical, at present, the only option is FALSE", but later in Details, its effect is widely described. When I use MY.dna <- vcfR2DNAbin(x=MY.vcf, consensus=TRUE, extract.haps=FALSE, unphased_as_NA=FALSE) I get correct number and labeling of sequences, if MY.dna <- vcfR2DNAbin(x=MY.vcf, consensus=FALSE, extract.haps=FALSE, unphased_as_NA=FALSE), I get twice higher number of sequences (haplotypes) and sequence names with suffixes _0 and _1. So as option consensus seems to work, update, please, ?vcfR2DNAbin.

knausb commented 7 years ago

Good catch! Its now updated on GitHub c0e9672bf9441c5fb2dcc5d4e23972bff9f14f7b. It will now read as follows in Arguments.

consensus logical, indicates whether an IUPAC ambiguity code should be used for diploid heterozygotes 

And expanded a bit in Details.

When the option \code{consensus} is TRUE and \code{extract.haps} is FALSE, each genotype is split into two alleles and the two alleles are converted into their IUPAC ambiguity code.

If you think this is more clear, feel free to close.

V-Z commented 7 years ago

Thank You, it looks good!