|Class||Analysis and data manipulation command|
|Arguments||[<pedigree file name>]|
Writes a GAS type pedigree file from the current dataset. Default is to screen. Note that this command respects the set printstyle <mask> command, where the mask controls whether or not each of the first five fields are printed, the set gen command (sets the allele separator for writing genotypes), and the set mis (sets the missing data token).
>> set loc q1 qua >> set loc m1 mar >> read pedigree inline ped1 Bob Mark Alice m 10 a/b ;;;; >> run >> write Writing 1 pedigrees: ! ! S ! e !Ped Perso Fath Mothe x q1 m1 ! ped1 Alice x x f x x/x ped1 Mark x x m x x/x ped1 Bob Mark Alice m 10.0000 a/b >> set printstyle 01001 >> set missing . >> set genotype_separator " " >> write Writing 1 pedigrees: ! S ! e ! Per x q1 m1 ! Alice f . . . Mark m . . . Bob m 10.0000 a b
|print data where expression true|
|set printstyle||output style for print command|
|set gen||allele separator for writing genotypes|
|set mis||set missing data token for printing|
|Class||Analysis and data manipulation command|
|Arguments||<format>||<pedigree file name>||<modifier>|
|dot||[<trait> [(<marker> | <trait>) [<colour-y> [<colour-n> [<colour-x> [<marker-background-colour>]]]]]]|
|fimpute||[chip <chip_variable>] [<filter_trait>]|
The write command writes the current dataset to a file in the format used by a variety of other programs for genetic analysis. Quantitative values are written as Fw.d (default F9.4 , see set ndecimal) or F8.4 (for programs such as MENDEL).
Use of the keywords pedigree or gas writes a GAS type pedigree file from the current dataset. If the header modifier keyword is present, then a line of the variable names is prepended.
The keyword dot writes a script that will draw all the active pedigrees using the dot program as a marriage node graph (a binary trait locus and a second locus of any type can be represented by colour and a written genotype or value in the node respectively). The colours can also be specified.
The keyword gda writes a GDA Nexus datafile containing all current marker genotypes for founders. If the keyword all is added, nonfounders will be included as well, but the "gdatype" format will not differentiate between relatives.
Similarly, arlequin writes a data file for the program Arlequin containing haplotypes from one informative child per family, or two parents of such a child if the par keyword is added. Only if the all keyword is added will all genotyped individuals be printed.
The keywords linkage and ppd write a pedigree file from the current dataset suitable for use by the LINKAGE (and FASTLINK) programs, the former type requires preprocessing by the Makeped program (note that if a quantitative trait value is zero -- that is nonmissing -- it is recoded to 0.0001);
aspex, fbat, or tcl, writes a linkage style pedigree file but with the marker locus names as the first line, as the ASPEX programs prefer;
gh writes a linkage style pedigree file with a dummy affection trait as the first trait and all the quantitative traits last, with "-" for missing quantitative trait values. The dummy option added to linkage or gh writes a dummy affection locus as the the first trait (everybody affected). The numbered_allele option skips recoding alleles to numbered alleles.
The haploview option is a linkage style file with recoding of letter alleles from "ACGT" to "1234".
merlin writes a pedigree file suitable for Merlin -- actually a LINKAGE "pre" format file with zygosity included as the first trait, if the "set twin" command has been previously issued;
The sage keyword writes a pedigree file from the current dataset suitable for use by the program FSP included in the SAGE package.
The mendel keyword writes a pedigree file from the current dataset suitable for use by the programs MENDEL or SIMWALK; fisher writes a pedigree file from the current dataset suitable for use by the related program FISHER.
phe writes the "pheno.dat" style file required by Mapmaker-Sibs;
plink writes PLINK format .bed, .bim and .fam files. If a (trailing) trait name is given, this is written as the trait in the .fam file.
cri writes the ".gen" style file required by CRI-MAP;
Both csv and solar give a comma delimited file, with header naming columns, from which the pedigree ID column can be dropped via the nop option, and the SOLAR phenotype (or genotype) file written by the phe (gen) option. The SOLAR pedigree file has two additional columns: MZ twin indicator (requiring a previous "set twin") and a household (actually pedigree) indicator. For csv, one can append the delimiter character (defaulting to ",") and a missing value token (defaulting to "NA"). The categorical trait values are replaced by labels when these are specified in the annotation.
The sas keyword gives a SAS script containing a datastep describing the variables followed by the pedigree data inlined as "cards". The pedigree data is actually being written as "csv", with the delimiter set to "|", and the missing data token to "." (so these could be changed by adding the extra modifiers).
The sib-pair keyword gives a Sib-pair script containing the marker declarations followed by inline pedigree data. If the merge modifier is present, the inline data is following an inline merge statement and has a header prepended.
The structure and beagle commands write genotype data files for Structure and Beagle respectively (and can be restricted to writing just founder data using the founders option). The trios option will write the unphased parent-offspring trio data format.
The snp modifier writes a PLINK .tped file (row-major pedigree file)
The snap writes a similar file for WOMBAT.
A VCF file containing the genotypes of the currently active markers is written when the vcf modifier is present. The ped_id modifier tells Sib-pair to write a combination pedigree and individual ID, where the VCF IDs take the form <pedigreeID>_<individualID>. If a trait name is given, then only individuals where this trait is non-missing will have data written to the output file.
The fimpute writes genotype data files for the FImpute imputation program of Sargolzaei et al. The chip modifier gives the trait identifying which SNP array (or genotyping method) was used for that individual. A trait name at the end of the command restricts the outputted data to those where the trait is non-missing.
>> write csv lincl.csv
|set liability||Declare a quantitative trait to be a liability class indicator|
|write locus||Write a locus file|
|<< (head)||Up to index||>> (write bin)|