diff --git a/pkg/obioptions/version.go b/pkg/obioptions/version.go index 0917d0f..0323984 100644 --- a/pkg/obioptions/version.go +++ b/pkg/obioptions/version.go @@ -7,7 +7,7 @@ import ( // TODO: The version number is extracted from git. This induces that the version // corresponds to the last commit, and not the one when the file will be // commited -var _Commit = "5affee2" +var _Commit = "0e9a136" var _Version = "Release 4.2.0" // Version returns the version of the obitools package. diff --git a/pkg/obitools/obisplit/obisplit.go b/pkg/obitools/obisplit/obisplit.go index 3713847..e9397ec 100644 --- a/pkg/obitools/obisplit/obisplit.go +++ b/pkg/obitools/obisplit/obisplit.go @@ -168,6 +168,11 @@ func SplitPattern(sequence *obiseq.BioSequence, if from.name == to.name { sub.SetAttribute("obisplit_group", from.name) + if from.name == "extremity" { + sub.SetAttribute("obisplit_set", "NA") + } else { + sub.SetAttribute("obisplit_set", from.name) + } } else { fname := from.name tname := to.name @@ -179,6 +184,11 @@ func SplitPattern(sequence *obiseq.BioSequence, } } sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", fname, tname)) + if fname == "extremity" { + sub.SetAttribute("obisplit_set", tname) + } else { + sub.SetAttribute("obisplit_set", "NA") + } } sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start+1, end)) @@ -226,6 +236,12 @@ func SplitPattern(sequence *obiseq.BioSequence, sub.SetAttribute("obisplit_frg", nfrag) if from.name == to.name { sub.SetAttribute("obisplit_group", from.name) + if from.name == "extremity" { + sub.SetAttribute("obisplit_set", "NA") + } else { + sub.SetAttribute("obisplit_set", from.name) + } + } else { fname := from.name tname := to.name @@ -236,7 +252,13 @@ func SplitPattern(sequence *obiseq.BioSequence, fname, tname = tname, fname } } + sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", fname, tname)) + if fname == "extremity" { + sub.SetAttribute("obisplit_set", tname) + } else { + sub.SetAttribute("obisplit_set", "NA") + } } sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start+1, end)) diff --git a/pkg/obitools/obisplit/options.go b/pkg/obitools/obisplit/options.go index 5b56774..778cb23 100644 --- a/pkg/obitools/obisplit/options.go +++ b/pkg/obitools/obisplit/options.go @@ -76,11 +76,11 @@ func CLIConfig() []SplitSequence { header := records[0] - pattern_idx := slices.Index(header, "T-tag") + pattern_idx := slices.Index(header, "tag") pool_idx := slices.Index(header, "pcr_pool") if pattern_idx == -1 { - log.Fatalf("Config file %s doesn't contain `T-tag`column", CLIConfigFile()) + log.Fatalf("Config file %s doesn't contain `tag`column", CLIConfigFile()) } if pool_idx == -1 { @@ -128,7 +128,7 @@ func CLIAskConfigTemplate() bool { } func CLIConfigTemplate() string { - return `T-tag,pcr_pool + return `tag,pcr_pool CGGCACCTGTTACGCAGCCACTATCGGCT,pool_1 CGGCAAGACCCTATTGCATTGGCGCGGCT,pool_2 `