Documentation
¶
Index ¶
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
This section is empty.