saveAlignment.PhyloSim: Save the alignment stored in a PhyloSim object in a Fasta...

Description Usage Arguments Value Author(s) See Also Examples

Description

Save the alignment stored in a PhyloSim object in a Fasta file.

Usage

1
2
## S3 method for class 'PhyloSim'
saveAlignment(this, file="phylosim.fas", skip.internal=FALSE, paranoid=FALSE, ...)

Arguments

this

A PhyloSim object.

file

The name of the output file.

skip.internal

Do not save sequences corresponding to internal nodes.

paranoid

Check the consistency of the alignment.

...

Not used.

Value

The PhyloSim object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see PhyloSim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
	# Create a PhyloSim object.
	# Provide the phylo object
	# and the root sequence.
	sim<-PhyloSim(
		name="TinySim",
		phylo=rcoal(3),
		root.seq=NucleotideSequence(string="ATG",processes=list(list(JC69())))
	);
	# run the simulation
	Simulate(sim)
	# save the alignment
	file<-paste("PhyloSim_dummy_fasta_",Sys.getpid(),".fas",sep="");
	saveAlignment(sim,file=file,paranoid=TRUE);
	# print out the Fasta file
	cat(paste(scan(file=file,what=character(),sep="\n"),collapse="\n"));cat("\n");
	# delete Fasta file
	unlink(file);
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.