patch a bug related to csv and qualities

This commit is contained in:
Eric Coissac
2025-02-05 19:27:00 +01:00
parent 773e54965d
commit f27e9bc91e
3 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ import (
// corresponds to the last commit, and not the one when the file will be // corresponds to the last commit, and not the one when the file will be
// commited // commited
var _Commit = "ceca339" var _Commit = "773e549"
var _Version = "Release 4.2.0" var _Version = "Release 4.2.0"
// Version returns the version of the obitools package. // Version returns the version of the obitools package.

View File

@ -33,6 +33,7 @@ func CLIWriteSequenceCSV(iterator obiiter.IBioSequence,
CSVDefinition(CLIPrintDefinition()), CSVDefinition(CLIPrintDefinition()),
CSVKeys(CLIToBeKeptAttributes()), CSVKeys(CLIToBeKeptAttributes()),
CSVSequence(CLIPrintSequence()), CSVSequence(CLIPrintSequence()),
CSVQuality(CLIPrintQuality()),
CSVAutoColumn(CLIAutoColumns()), CSVAutoColumn(CLIAutoColumns()),
) )

View File

@ -40,7 +40,7 @@ func CSVSequenceHeader(opt Options) obiitercsv.CSVHeader {
} }
if opt.CSVQuality() { if opt.CSVQuality() {
record.AppendField("quality") record.AppendField("qualities")
} }
return record return record
@ -100,9 +100,9 @@ func CSVBatchFromSequences(batch obiiter.BioSequenceBatch, opt Options) obiiterc
for j := 0; j < l; j++ { for j := 0; j < l; j++ {
ascii[j] = uint8(q[j]) + uint8(quality_shift) ascii[j] = uint8(q[j]) + uint8(quality_shift)
} }
record["quality"] = string(ascii) record["qualities"] = string(ascii)
} else { } else {
record["quality"] = opt.CSVNAValue() record["qualities"] = opt.CSVNAValue()
} }
} }