Documentation
¶
Index ¶
- func BZExtension(name string) (bzipped bool)
- func CloseWriteFile(f io.Closer, filename string)
- func GetReader(inputfile string) (io.Closer, *bufio.Reader, error)
- func GetReaderFromReader(gzipped bool, rd io.Reader) (reader *bufio.Reader, err error)
- func GzipExtension(name string) (gzipped bool)
- func OpenFile(inputfile string) (*os.File, error)
- func ParseAlignmentAuto(r *bufio.Reader, rootinputstrict bool) (al align.Alignment, format int, err error)
- func ParseMultiAlignmentsAuto(f io.Closer, r *bufio.Reader, rootinputstrict bool) (alchan *align.AlignChannel, format int, err error)
- func ReadAlign(file string, format int) (outAlign align.Alignment, err error)
- func Readln(r *bufio.Reader) (string, error)
- func XZExtension(name string) (xzipped bool)
- type StringWriterCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BZExtension ¶ added in v0.3.4
func CloseWriteFile ¶ added in v0.3.6
func GetReaderFromReader ¶ added in v0.2.4
Returns a buffered reader (gzip or not) for the given reader
func GzipExtension ¶ added in v0.2.4
func ParseAlignmentAuto ¶ added in v0.2.4
func ParseAlignmentAuto(r *bufio.Reader, rootinputstrict bool) (al align.Alignment, format int, err error)
Parses the input buffer while automatically detecting the format between Newick, Phylip, and Nexus
If several alignments are present in the onput file, only the first will be parsed.
Returned format may be align.FORMAT_PHYLIP, align.FORMAT_FASTA, or align.FORMAT_NEXUS
rootinpustrict: In the case of phylip detected format: should we consider it as strict or not?
There is no new go routine here because only 1 alignment is parsed. No need to give a closer. If the reader comes from a file, the file must be closed in the calling function.
func ParseMultiAlignmentsAuto ¶ added in v0.2.4
func ParseMultiAlignmentsAuto(f io.Closer, r *bufio.Reader, rootinputstrict bool) (alchan *align.AlignChannel, format int, err error)
Parses the input buffer while automatically detecting the format between Newick, Phylip, and Nexus
If several alignments are present in the input file, they are queued in the channel ¶
rootinpustrict: In the case of phylip detected format: should we consider it as strict or not?
If there is something to close ( f!=nil) after the parsing (like input file, etc.), f will be closed after parsing is finished (even in the go routine in the case of several input alignments). If the alignment comes from a file for exemple, the file will be closed by this function, so no need to do it in the calling function
func ReadAlign ¶ added in v0.3.4
ReadAlign reads a single multiple sequence alignment in the given format from the given file name.
format is defined in github.com/evolbioinfo/goalign/align/ and may be: - align.FORMAT_PHYLIP - align.FORMAT_NEXUS - align.FORMAT_CLUSTAL - align.FORMAT_FASTA - any other value is interpreted as align.FORMAT_FASTA
func Readln ¶ added in v0.3.4
Readln returns a single line (without the ending \n) from the input buffered reader. An error is returned iff there is an error with the buffered reader.
func XZExtension ¶ added in v0.3.4
Types ¶
type StringWriterCloser ¶ added in v0.3.6
func OpenWriteFile ¶ added in v0.3.6
func OpenWriteFile(file string) (f StringWriterCloser, err error)