mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 00:30:27 +00:00
debug url reading
This commit is contained in:
@@ -112,7 +112,6 @@ func ReadSequencesFromFile(filename string,
|
|||||||
var err error
|
var err error
|
||||||
|
|
||||||
options = append(options, OptionsSource(obiutils.RemoveAllExt((path.Base(filename)))))
|
options = append(options, OptionsSource(obiutils.RemoveAllExt((path.Base(filename)))))
|
||||||
|
|
||||||
file, err = obiutils.Ropen(filename)
|
file, err = obiutils.Ropen(filename)
|
||||||
|
|
||||||
if err == obiutils.ErrNoContent {
|
if err == obiutils.ErrNoContent {
|
||||||
|
|||||||
@@ -234,7 +234,6 @@ func (taxo *TaxonSet) AsPhyloTree(root *TaxNode) (*obiphylo.PhyloNode, error) {
|
|||||||
nodes := make(map[*string]*obiphylo.PhyloNode, taxo.Len())
|
nodes := make(map[*string]*obiphylo.PhyloNode, taxo.Len())
|
||||||
tsi := taxo.Iterator()
|
tsi := taxo.Iterator()
|
||||||
|
|
||||||
log.Warnf("Coucou")
|
|
||||||
for tsi.Next() {
|
for tsi.Next() {
|
||||||
taxon := tsi.Get()
|
taxon := tsi.Get()
|
||||||
id := taxon.Node.Id()
|
id := taxon.Node.Id()
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ func ExpandListOfFiles(check_ext bool, filenames ...string) ([]string, error) {
|
|||||||
list_of_files := orderedset.NewOrderedSet()
|
list_of_files := orderedset.NewOrderedSet()
|
||||||
for _, fn := range filenames {
|
for _, fn := range filenames {
|
||||||
|
|
||||||
|
if strings.HasPrefix(fn, "http://") ||
|
||||||
|
strings.HasPrefix(fn, "https://") ||
|
||||||
|
strings.HasPrefix(fn, "ftp://") {
|
||||||
|
list_of_files.Add(fn)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
err = filepath.Walk(fn,
|
err = filepath.Walk(fn,
|
||||||
func(path string, info os.FileInfo, err error) error {
|
func(path string, info os.FileInfo, err error) error {
|
||||||
var e error
|
var e error
|
||||||
@@ -147,7 +154,6 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return obiiter.NilIBioSequence, err
|
return obiiter.NilIBioSequence, err
|
||||||
}
|
}
|
||||||
|
|
||||||
switch CLIInputFormat() {
|
switch CLIInputFormat() {
|
||||||
case "fastq", "fq":
|
case "fastq", "fq":
|
||||||
reader = obiformats.ReadFastqFromFile
|
reader = obiformats.ReadFastqFromFile
|
||||||
@@ -178,8 +184,10 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
nreader,
|
nreader,
|
||||||
opts...,
|
opts...,
|
||||||
)
|
)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if len(list_of_files) > 0 {
|
if len(list_of_files) > 0 {
|
||||||
|
|
||||||
iterator, err = reader(list_of_files[0], opts...)
|
iterator, err = reader(list_of_files[0], opts...)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user