mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Code reefactoring
This commit is contained in:
@@ -17,24 +17,24 @@ func __expand_list_of_files__(check_ext bool, filenames ...string) ([]string, er
|
||||
|
||||
err = filepath.Walk(fn,
|
||||
func(path string, info os.FileInfo, err error) error {
|
||||
|
||||
var e error
|
||||
for info.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||
path, err = filepath.EvalSymlinks(path)
|
||||
if err != nil {
|
||||
return err
|
||||
path, e = filepath.EvalSymlinks(path)
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
|
||||
info, err = os.Stat(path)
|
||||
if err != nil {
|
||||
return err
|
||||
info, e = os.Stat(path)
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
if path != fn {
|
||||
subdir, err := __expand_list_of_files__(true, path)
|
||||
if err != nil {
|
||||
return err
|
||||
subdir, e := __expand_list_of_files__(true, path)
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
list_of_files = append(list_of_files, subdir...)
|
||||
} else {
|
||||
|
||||
@@ -86,7 +86,7 @@ func LoadSelectedTaxonomy() (*obitax.Taxonomy, error) {
|
||||
return __selected_taxonomy__, nil
|
||||
}
|
||||
|
||||
return nil, errors.New("No NCBII taxdump selected using option -t|--taxdump")
|
||||
return nil, errors.New("no NCBI taxdump selected using option -t|--taxdump")
|
||||
}
|
||||
|
||||
func OptionSet(options *getoptions.GetOpt) {
|
||||
|
||||
@@ -153,6 +153,8 @@ func IAssemblePESequencesBatch(iterator obiseq.IPairedBioSequenceBatch,
|
||||
bar.Add(59)
|
||||
processed += 59
|
||||
}
|
||||
A.Destroy()
|
||||
B.Destroy()
|
||||
}
|
||||
bar.Add(batch.Length() - processed)
|
||||
new_iter.Channel() <- obiseq.MakeBioSequenceBatch(
|
||||
|
||||
Reference in New Issue
Block a user