Class | Analysis and data manipulation command |
Name | flip |
Arguments | <marker> [to <marker2> ] [...<markerN>]. |
map <filename> | |
fasta<filename> |
If one or marker names are given, recodes SNP marker alleles to the complementary strand coding ie "[ACGT]" -> "[TGCA]".
If the map modifier is present, Compares observed alleles for each active SNP to reference alleles, either from the locus annotation (where they must be written [A/B] with A the consensus or reference allele) or those in an external VCF, GTF file, and flips or swaps the alleles to match. The locus annotation reference alleles are altered to match the external reference file.
If the external reference provides allele frequencies, these are used to test for ambiguous strand mixups ie A/T and G/C SNPs. In the case of a VCF file, Sib-pair reads the value of the AF INFO variable.
The flip fasta option changes only the locus annotation. The FASTA file must be indexed, ie have a .fai file produced by the samtools faidx program.
The operation that resulted from the latter two options are recorded in locstat, so one can keep/drop/undrop on the value of the comparison for each SNP.
Example:
>> wri 1 1 x x m A/G 1 2 x x f G/G 1 3 1 2 m A/G >> flip $m Recoding alleles at "m1" to complement. >> wri 1 1 x x m C/T 1 2 x x f C/C 1 3 1 2 m C/T
set loc m1 snp . [G/T] [A/C] set loc m2 snp . [G/T] set loc m3 snp . set loc m4 snp . [G/T] read cases inline 1 A/C A/C A/C G/T 2 A/A T/G T/G T/T 3 C/C G/G G/G T/T 4 C/C G/G G/G G/G 5 A/C T/G T/G T/T ;;;; run wri set ple 1 flip map sum tab
Gives:
Using reference alleles from annotation. Number of active markers = 4 Locus Alleles Reference Action -------------- --------- --------- ---------- m1 AC GT Recode A C to T G m2 ACGT GT Recode A C to T G m4 GT GT m4 is consistent Found 3 out of 4 loci with reference allele data. Test: "Allele consistency with reference: -1=bad 0=OK 1=flip 2=swap". Category Count ---------- ------- 0=OK 1 1=flip 2
<< (swap) | Up to index | >> (date) |