Patch sequence writers to remove definition from header when json format is used.

Former-commit-id: a8a74cccb52d577d4ea1c0ad88b121a8e511149d
This commit is contained in:
2023-10-05 07:31:31 +02:00
parent d23a911080
commit 0a8f7afb2a
5 changed files with 27 additions and 27 deletions

View File

@@ -63,9 +63,8 @@ func FormatFasta(seq *obiseq.BioSequence, formater FormatHeader) string {
}
info := formater(seq)
return fmt.Sprintf(">%s %s %s\n%s",
return fmt.Sprintf(">%s %s\n%s",
seq.Id(), info,
seq.Definition(),
folded)
}
@@ -199,7 +198,7 @@ func WriteFasta(iterator obiiter.IBioSequence,
// configuration options as variadic arguments. It appends the option to not close the file
// to the options slice and then calls the WriteFasta function passing the iterator,
// os.Stdout as the output file, and the options slice.
//
//
// The function returns the same bio sequence iterator and an error if any occurred.
func WriteFastaToStdout(iterator obiiter.IBioSequence,
options ...WithOption) (obiiter.IBioSequence, error) {