Concatenated sequence tags are useful for phylogenetic methods where information on base frequencies and transition and transversion ratios are required (for example, Maximum Liklihood methods). Where relevant, heterozygous loci are resolved before concatenation by either assigning ambiguity codes or by random allele assignment.
gl2fasta(gl, method = 1, outfile = "output.fasta")-- name of the DArT genlight object [required]
-- 1 | 2 | 3 | 4. Type method=0 for a list of options [method=1]
-- name of the output file (fasta format) [output.fasta]
A new gl object with all loci rendered homozygous
Four methods are employed
Method 1 -- heterozygous positions are replaced by the standard ambiguity codes. The resultant sequence fragments are concatenated across loci to generate a single combined sequence to be used in subsequent ML phylogenetic analyses.
Method=2 -- the heterozyous state is resolved by randomly assigning one or the other SNP variant to the individual. The resultant sequence fragments are concatenated across loci to generate a single composite haplotype to be used in subsequent ML phylogenetic analyses.
Method 3 -- heterozygous positions are replaced by the standard ambiguity codes. The resultant SNP bases are concatenated across loci to generate a single combined sequence to be used in subsequent MP phylogenetic analyses.
Method=4 -- the heterozyous state is resolved by randomly assigning one or the other SNP variant to the individual. The resultant SNP bases are concatenated across loci to generate a single composite haplotype to be used in subsequent MP phylogenetic analyses.
Trimmed sequences for which the SNP has been trimmed out, rarely, by adaptor mis-identity are deleted.
The script writes out the composite haplotypes for each individual as a fastA file. Requires
'TrimmedSequence' and 'SNP' (position and type of transition/transversion of a locus) to be among the locus metrics (@other$loc.metrics) headers.
# NOT RUN {
gl <- gl.filter.repavg(testset.gl,t=1)
gl <- gl.filter.callrate(testset.gl,t=.98)
gl2fasta(gl, method=1, outfile="test.fasta")
# }
Run the code above in your browser using DataLab