Sib-pair Command: recode


ClassAnalysis and data manipulation command
Namerecode
Arguments (<marker>|$(m|x)) (frequencies | letter | number | nucleotide)

Recodes alleles at that marker or set of markers to 1..N, where the ordering defaults to the allele size (or collation order for letter alleles). If the freq modifier is present, the numbering is by ascending allele frequency. If the let modifier is present, the numbering is "1..4" for "ACGT", and the reverse for num. The nuc modifier causes numeric (1,2) or alphabetic (A,B) alleles to be replaced by the alleles in the locus annotation, matched according to collation order of the present alleles. That is, if the annotation read "[A/G]", then A replaces 1, and G replaces 2.

Example:

>> wri

1 1 x x x   A/C
2 2 x x x   C/C
3 3 x x x   A/A
4 4 x x x   A/A

>> recode $m num

Recoding nucleotide letter alleles to number code (ACGT->1234).

>> wri
1 1 x x x   1/2
2 2 x x x   2/2
3 3 x x x   1/1
4 4 x x x   1/1

>> recode $m let
Recoding numbered alleles to nucleotide letter code (1234->ACGT).

>> recode $m fre
Renumbering alleles at "m" to 1..  2.
Ordering by sample allele frequency.

>> wri
1 1 x x x   1/2
2 2 x x x   1/1
3 3 x x x   2/2
4 4 x x x   2/2


Sib-pair Command: recode


ClassAnalysis and data manipulation command
Namerecode
Arguments (<marker>|$(m|x)) reference|major [<filter_trait>]

Recodes missing genotypes at that marker or set of markers to the wild type homozygote. An indicator trait can be used filter this so this restricted to a subset. This is either the reference allele from the locus annotation (reference), or the major allele based on frequency in the current dataset. Motivated by fact that sequence data VCF files do not usually include sites where the individual is homozygous for the reference allele.

Example:

>> macro declare_MC1R_loci
>>  read locus vcf %1.vcf.gz chr16:89981325 chr16:89987405
>> ;;;;
>> macro read_MC1R_genotypes
>>  merge vcf %1.vcf.gz
>> ;;;;
>> read cases inline
>> exome1
>> exome2
>> exome3
>> exome4
>> ;;;;
>> run
>> eval (define plist (paste (pedigrees)))
>> 
>> declare_MC1R_loci { %plist }
>> read_MC1R_genotypes { %plist }
>> 
>> fre snp

Marker               NAll  Allele(s)    Freq   Het    Ntyped
-------------------- ---- -----------   ------ ------ ------
chr16:89981345          2     1 (T)     0.5000 0.6000      3 [T/TTG] 
chr16:89981381          2     1 (T)     0.5000 1.0000      1 [TTG/T]
chr16:89984370          2     C (T)     0.5000 0.6667      2 [T/C] 
...

>> recode $m reference
>> fre snp

Marker               NAll  Allele(s)    Freq   Het    Ntyped
-------------------- ---- -----------   ------ ------ ------
chr16:89981345          2     1 (T)     0.3750 0.5357      4 [T/TTG]
chr16:89981381          2     1 (T)     0.1250 0.2500      4 [TTG/T]
chr16:89984370          2     C (T)     0.2500 0.4286      4 [T/C]

Sib-pair Command: recode


ClassAnalysis and data manipulation command
Namerecode
Arguments <marker> <all1|value1>...<allN|valueN> to <new allele|new value> [...<newN>]..

Allows pooling and/or recoding of marker alleles prior to subsequent analysis. If there are fewer new values than old values, the last new value is recycled.

Example:

>> recode marker1 1 2 to A C

Recoding locus marker1
From:    1   2
To  :    A   C

Recoded     16 values.

>> recode marker2 100 102 104 to 99

Recoding locus marker2
From:  100 102 104
To  :   99

<< (get)Up to index>> (combine)