mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
correction of bug and format in obisplit
Former-commit-id: d600713a5f48c8d682971be9b8a09a1c021be28c
This commit is contained in:
@ -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.
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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
|
||||
`
|
||||
|
Reference in New Issue
Block a user