{"modulePath":"github.com/MG-RAST/Shock","version":"v0.9.29","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sam\n\nPackage to read and write SAM format files\n\n## Variables\n\n```go\nvar (\n\tRegex = regexp.MustCompile(`^[\\n\\r]*[@[A-Z][A-Z][ \\t]+[\\S \\t]+[\\n\\r]]*`)\n)\n```\n\n## Functions\n\n```go\nfunc Format(s *seq.Seq, w io.Writer) (n int, err error)\n```\nTo-do: not finished Format a single sequence into sam string\n\n```go\nfunc NewReader(f file.SectionReader) seq.ReadRewinder\n```\nReturns a new Sam format reader using r.\n\n```go\nfunc NewReaderName(name string) (r seq.ReadRewinder, err error)\n```\nReturns a new Sam format reader using a filename.\n\n## Types\n\n```go\ntype Reader struct {\n\t// contains filtered or unexported fields\n}\n```\nSam sequence format reader type.\n\n```go\nfunc (self *Reader) GetReadOffset() (n int, err error)\n```\nRead a single sequence and return read offset for indexing.\n\n```go\nfunc (self *Reader) Read() (sequence *seq.Seq, err error)\n```\nRead a single sequence and return it or an error.\n\n```go\nfunc (self *Reader) Rewind() (err error)\n```\nRewind the reader.\n\n```go\nfunc (self *Reader) SeekChunk(offSet int64, lastIndex bool) (n int64, err error)\n```\n\n```go\ntype Writer struct {\n\t// contains filtered or unexported fields\n}\n```\nFasta sequence format writer type.\n\n```go\nfunc NewWriter(f io.WriteCloser, width int) *Writer\n```\nReturns a new sam format writer using f.\n\n```go\nfunc NewWriterName(name string, width int) (w *Writer, err error)\n```\nReturns a new sam format writer using a filename, truncating any existing file. If appending is required use NewWriter and os.OpenFile.\n\n```go\nfunc (self *Writer) Close() (err error)\n```\nClose the writer, flushing any unwritten sequence.\n\n```go\nfunc (self *Writer) Flush() error\n```\nFlush the writer.\n\n```go\nfunc (self *Writer) Write(s *seq.Seq) (n int, err error)\n```\nWrite a single sequence and return the number of bytes written and any error.\n\n","path":"github.com/MG-RAST/Shock/shock-server/node/file/format/sam","name":"sam","synopsis":"Package to read and write SAM format files","isRedistributable":true}
