mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
add extensions fq in directory scanning
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
|||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "c10df07"
|
var _Commit = "b9bee5f"
|
||||||
var _Version = "Release 4.2.0"
|
var _Version = "Release 4.2.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
@ -55,6 +55,8 @@ func ExpandListOfFiles(check_ext bool, filenames ...string) ([]string, error) {
|
|||||||
strings.HasSuffix(path, "fasta.gz") ||
|
strings.HasSuffix(path, "fasta.gz") ||
|
||||||
strings.HasSuffix(path, "fastq") ||
|
strings.HasSuffix(path, "fastq") ||
|
||||||
strings.HasSuffix(path, "fastq.gz") ||
|
strings.HasSuffix(path, "fastq.gz") ||
|
||||||
|
strings.HasSuffix(path, "fq") ||
|
||||||
|
strings.HasSuffix(path, "fq.gz") ||
|
||||||
strings.HasSuffix(path, "seq") ||
|
strings.HasSuffix(path, "seq") ||
|
||||||
strings.HasSuffix(path, "seq.gz") ||
|
strings.HasSuffix(path, "seq.gz") ||
|
||||||
strings.HasSuffix(path, "gb") ||
|
strings.HasSuffix(path, "gb") ||
|
||||||
@ -140,7 +142,7 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch CLIInputFormat() {
|
switch CLIInputFormat() {
|
||||||
case "fastq":
|
case "fastq", "fq":
|
||||||
reader = obiformats.ReadFastqFromFile
|
reader = obiformats.ReadFastqFromFile
|
||||||
case "fasta":
|
case "fasta":
|
||||||
reader = obiformats.ReadFastaFromFile
|
reader = obiformats.ReadFastaFromFile
|
||||||
@ -168,6 +170,7 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
opts...,
|
opts...,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
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 {
|
||||||
@ -183,7 +186,9 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
|
|
||||||
iterator = iterator.PairTo(ip)
|
iterator = iterator.PairTo(ip)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
iterator = obiiter.NilIBioSequence
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user