Convert a SOLAR-formatted phi2 file into a multic-formatted share.out file.

Description

phi2share reads in the specified files and generates a multic-formatted share.out file. share.out contains unique identifiers, expected shared genetic material, and sibling, spousal, and parent-offspring true/false values.

Usage

1
2
phi2share(phi2, pedigree.file, pedindex.out, pedindex.cde,
          output.directory=".")

Arguments

phi2

a character value to specify the location of a SOLAR-formatted phi2 (or similarly formatted) file. Due to the general size of a typical phi2 file, it is often stored in .gz format. phi2share will manage this for the user. Whether the user specifies the file with a .gz suffix or not will not effect how phi2share operates on the file.

pedigree.file

a character value to specify the location of a .ped (or similarly formatted) file. This file must have a header of famid, id, fa, mo, and sex (case insensitive). The file must also be comma separated.

pedindex.out

a character value to specify the location of a pedindex.out file. This file must be the same that was output from SOLAR. It provides a mapping between the sequential number system assigned by SOLAR and the original family and individual identifiers.

pedindex.cde

a character value to specify the location of a pedindex.cde file. This file must be the same that was output from SOLAR. This file describes how pedindex.out is organized. This is necessary to read pedindex.out correctly.

output.directory

a character value specifying which directory to place the output share.out. If output.directory (including supporting path) does not exist yet, it will be created. The default directory is the current directory.

Side Effects

phi2share creates a local copy of, gunzip's, and removes the copy of phi2. It also will overwrite share.out and share.out.gz if they exist in output.directory.

See Also

solar2mloci, solar2multic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
phi2share(phi2 = "phi2",
          pedigree.file = "chrom18.ped",
          pedindex.out = "pedindex.out",
          pedindex.cde = "pedindex.cde",
          output.directory = "multicInput")
phi2share("solarOutput/phi2.gz",
          "solarOutput/chrom18.ped",
          "solarOutput/pedindex.out",
          "solarOutput/pedindex.cde")

## End(Not run)