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
|
||||
|
||||
options = append(options, OptionsSource(obiutils.RemoveAllExt((path.Base(filename)))))
|
||||
|
||||
file, err = obiutils.Ropen(filename)
|
||||
|
||||
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())
|
||||
tsi := taxo.Iterator()
|
||||
|
||||
log.Warnf("Coucou")
|
||||
for tsi.Next() {
|
||||
taxon := tsi.Get()
|
||||
id := taxon.Node.Id()
|
||||
|
||||
@@ -19,6 +19,13 @@ func ExpandListOfFiles(check_ext bool, filenames ...string) ([]string, error) {
|
||||
list_of_files := orderedset.NewOrderedSet()
|
||||
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,
|
||||
func(path string, info os.FileInfo, err error) error {
|
||||
var e error
|
||||
@@ -147,7 +154,6 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
||||
if err != nil {
|
||||
return obiiter.NilIBioSequence, err
|
||||
}
|
||||
|
||||
switch CLIInputFormat() {
|
||||
case "fastq", "fq":
|
||||
reader = obiformats.ReadFastqFromFile
|
||||
@@ -178,8 +184,10 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
||||
nreader,
|
||||
opts...,
|
||||
)
|
||||
|
||||
} else {
|
||||
if len(list_of_files) > 0 {
|
||||
|
||||
iterator, err = reader(list_of_files[0], opts...)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user