Closed tdelhomme closed 5 years ago
@tdelhomme Sorry it took awhile for me to get to this. You say covs
object has the correct dimensions but it would still be helpful to see it. Here is an example of adding a new geno field where the replacement has the correct number of rows/columns:
> example(readVcf)
> geno(vcf)
List of length 1
names(1): HQ
> geno(vcf)$HQ
, , 1
NA00001 NA00002 NA00003
rs6054257 51 51 NA
20:17330_T/A 58 65 NA
rs6040355 23 18 NA
20:1230237_T/. 56 51 NA
microsat1 NA NA NA
, , 2
NA00001 NA00002 NA00003
rs6054257 51 51 NA
20:17330_T/A 50 3 NA
rs6040355 27 2 NA
20:1230237_T/. 60 51 NA
microsat1 NA NA NA
> geno(vcf)$newField <- matrix(1:15, nrow=5)
Warning message:
geno fields with no header: newField
> geno(vcf)
List of length 2
names(2): HQ newField
If you're still having this problem, please show what covs
looks like or provide a reproducible example. Also post your sessionInfo()
.
Thanks. Valerie
Hi @vobencha, Thanks a lot for your answer, will give a try asap and let you know what I get!
Closing this issue. If you have other problems using the package please post on the support site (https://support.bioconductor.org/) or bioc-devel@r-project.org.
Hi,
I would like to add a GENO field in my VCF (
CollapsedVCF
object), so here is what I did:and I get this:
It seems that this create an "NA" field in the GENO, and I can not change this into my true name: