Description Usage Arguments Details Value See Also
write.snps
is short hand for write.table
with some default options.
For AlphaImpute format see Siccuracy.
Writes genotypes in VCF class objects to files in AlphaImpute-format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | write.snps(x, file, row.names = TRUE, na = "9", ...)
## S3 method for class 'matrix'
write.snps(x, file, row.names = TRUE, na = "9", ...)
## S3 method for class 'oxford'
write.snps(x, file, row.names = TRUE, na = "9", ...)
## S3 method for class 'haps'
write.snps(x, file, row.names = TRUE, na = "9", newID = 0,
...)
## S3 method for class 'vcfR'
write.snps(x, file, row.names = TRUE, na = "9", newID = 0,
element = "GT", as.numeric = TRUE, convertNA = TRUE, ...)
|
x |
The matrix to write. |
file |
Filename or connection to write to. |
row.names |
If genotype matrix is "raw" and has first column with animals IDs, set this to |
na |
The string to use for |
... |
Passed on to write.table. |
newID |
... New ID, see |
element |
element to extract from vcf genotype, see |
as.numeric |
logical, should the matrix be converted to numerics. |
convertNA |
logical indicating whether to convert "." to |
The new integer IDs can be supplied. If not, they will be made for you.
newID
may be an integer vector and will be used as is.
If data.frame with columns sampID
and newID
, they will be reordered to match input file.
Returns data frame with ID mapping, truncated to those elements outputted.
write.table
, connections.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.