mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Add option for csv input format
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 = "b5cf586"
|
var _Commit = "fbe7d15"
|
||||||
var _Version = "Release 4.4.0"
|
var _Version = "Release 4.4.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
@ -23,6 +23,7 @@ var __input_embl_format__ = false
|
|||||||
var __input_genbank_format__ = false
|
var __input_genbank_format__ = false
|
||||||
var __input_fastq_format__ = false
|
var __input_fastq_format__ = false
|
||||||
var __input_fasta_format__ = false
|
var __input_fasta_format__ = false
|
||||||
|
var __input_csv_format__ = false
|
||||||
|
|
||||||
var __output_in_fasta__ = false
|
var __output_in_fasta__ = false
|
||||||
var __output_in_fastq__ = false
|
var __output_in_fastq__ = false
|
||||||
@ -65,6 +66,9 @@ func InputOptionSet(options *getoptions.GetOpt) {
|
|||||||
options.BoolVar(&__input_fasta_format__, "fasta", __input_fasta_format__,
|
options.BoolVar(&__input_fasta_format__, "fasta", __input_fasta_format__,
|
||||||
options.Description("Read data following the fasta format."))
|
options.Description("Read data following the fasta format."))
|
||||||
|
|
||||||
|
options.BoolVar(&__input_csv_format__, "csv", __input_csv_format__,
|
||||||
|
options.Description("Read data following the CSV format."))
|
||||||
|
|
||||||
options.BoolVar(&__no_ordered_input__, "no-order", __no_ordered_input__,
|
options.BoolVar(&__no_ordered_input__, "no-order", __no_ordered_input__,
|
||||||
options.Description("When several input files are provided, "+
|
options.Description("When several input files are provided, "+
|
||||||
"indicates that there is no order among them."))
|
"indicates that there is no order among them."))
|
||||||
@ -139,6 +143,8 @@ func CLIInputFormat() string {
|
|||||||
return "embl"
|
return "embl"
|
||||||
case __input_genbank_format__:
|
case __input_genbank_format__:
|
||||||
return "genbank"
|
return "genbank"
|
||||||
|
case __input_csv_format__:
|
||||||
|
return "csv"
|
||||||
default:
|
default:
|
||||||
return "guessed"
|
return "guessed"
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,12 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
iterator, err = obiformats.ReadEMBL(os.Stdin, opts...)
|
iterator, err = obiformats.ReadEMBL(os.Stdin, opts...)
|
||||||
case "genbank":
|
case "genbank":
|
||||||
iterator, err = obiformats.ReadGenbank(os.Stdin, opts...)
|
iterator, err = obiformats.ReadGenbank(os.Stdin, opts...)
|
||||||
|
case "fasta":
|
||||||
|
iterator, err = obiformats.ReadFasta(os.Stdin, opts...)
|
||||||
|
case "fastq":
|
||||||
|
iterator, err = obiformats.ReadFastq(os.Stdin, opts...)
|
||||||
|
case "csv":
|
||||||
|
iterator, err = obiformats.ReadCSV(os.Stdin, opts...)
|
||||||
default:
|
default:
|
||||||
iterator = obiformats.ReadFastSeqFromStdin(opts...)
|
iterator = obiformats.ReadFastSeqFromStdin(opts...)
|
||||||
}
|
}
|
||||||
@ -146,6 +152,8 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) {
|
|||||||
reader = obiformats.ReadFastqFromFile
|
reader = obiformats.ReadFastqFromFile
|
||||||
case "fasta":
|
case "fasta":
|
||||||
reader = obiformats.ReadFastaFromFile
|
reader = obiformats.ReadFastaFromFile
|
||||||
|
case "csv":
|
||||||
|
reader = obiformats.ReadCSVFromFile
|
||||||
case "ecopcr":
|
case "ecopcr":
|
||||||
reader = obiformats.ReadEcoPCRFromFile
|
reader = obiformats.ReadEcoPCRFromFile
|
||||||
case "embl":
|
case "embl":
|
||||||
|
Reference in New Issue
Block a user