# Example of GENEPOP file
data(jsmackerel)
jsm.genepop.file <- tempfile()
cat(jsmackerel$MS.genepop, file=jsm.genepop.file, sep="\n")
# Remove markers designated by their names
clipped_by_name.jsm.genepop.file <- tempfile()
clip.genepop(infile=jsm.genepop.file,
outfile=clipped_by_name.jsm.genepop.file,
remove.list=c("Sni21","Sni26"))
# Remove markers with high major allele frequencies (in this example, > 0.5)
clipped_by_af.jsm.genepop.file <- tempfile()
clip.genepop(infile=jsm.genepop.file,
outfile=clipped_by_af.jsm.genepop.file,
major.af=0.5)
# Remove markers both by their names and by major allele frequencies
clipped_by_both.jsm.genepop.file <- tempfile()
clip.genepop(infile=jsm.genepop.file,
outfile=clipped_by_both.jsm.genepop.file,
remove.list=c("Sni21","Sni26"), major.af=0.5)
# See four text files in temporary directory.
# jsm.genepop.file : original data of five markers
# clipped_by_name.jsm.genepop.file : clipped data by marker names
# clipped_by_af.jsm.genepop.file : clipped data by allele frequency
# clipped_by_both.jsm.genepop.file : clipped data by both names and frequency
Run the code above in your browser using DataLab