Description Usage Arguments Details Value See Also Examples
This function runs through a single file and masks specified columns of specified rows.
It is a simplified version of rbind_snp_files
.
1 2 3 4 5 |
fn |
Input filename. |
outfn |
Output filename. |
masking |
List that specifies how to mask. Positions given here refer to columns in |
snps |
Vector of column indicies to use in output file. Defaults to all. |
snpsinnew |
Logical, when |
dropIDs |
IDs to exclude from output. |
na |
Value to use for masking. |
int |
Logical (default |
format |
Character, Fortran edit descriptors for output. See parseformat. |
The masking
argument controls which samples / loci are masked as missing with na
.
It accepts three different objects:
1) an integer vector of loci to mask,
2) a list with first element containing integer vector of IDs for samples to mask and second element an integer vector of loci to mask for those samples,
or
a list of 2).
For 1), the given loci are masked for all samples. For 2) it is limited to those IDs given.
By default, the integer vector of loci to mask are mapped to the input file. To map them to output file, set snpsinnew=TRUE
.
Invisible list of vectors sent to Fortran subtroutine.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
SNPs <- Siccuracy:::make.true(9, 12)
snpfile <- tempfile()
write.snps(SNPs, snpfile)
masking = list(
list(1:3, c(1,3,5,7,9,11)),
list(4:6, c(2,4,6,8,10,12)),
list(7:9, c(1,3,9,10,12))
)
fn <- tempfile()
res <- mask_SNPs(snpfile, fn, masking=masking, na=9)
m <- read.snps(fn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.