func convertCommand(c *cli.Context) error {
	if isPipe(c) {
		sequence := parseStdin(c)
		output := buildStdOut(c, sequence)
		fmt.Fprint(c.App.Writer, string(output))
	} else {
		if c.String("i") != "" {
			return errIllegalInputFlag
		}
		matches := getMatches(c)
		var wg sync.WaitGroup
		for _, match := range matches {
			wg.Add(1)
			go func(match string) {
				sequence := parseExt(match)
				writeFile(c, sequence, match)
				wg.Done()
			}(match)  
		}
		wg.Wait()
	}
	return nil
}
****************************************************************************

convert currently has two modes. Pipe and fileio.

The function isPipe() detects if input is coming from a pipe like:

cat data/bsub.gbk | poly c -i gbk -o json > test.json

In this case the output goes directly to standard out and can be redirected
into a file.

If not from a pipe convert checks args for file patterns to find, then iterates
over each matched file pattern to read in a file, then spit out the desired
output.

For example:

poly c -o json *.gbk *.gff

will read all files in a directory with ".gbk" or ".gff" as their extension
parse them, and then spit out a similiarly named file with the .json extension.

****************************************************************************
package main
import (
	"bufio"
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"sync"
	"github.com/TimothyStiles/poly/io/genbank"
	"github.com/TimothyStiles/poly/io/gff"
	"github.com/TimothyStiles/poly/io/poly"
	"github.com/TimothyStiles/poly/io/polyjson"
	"github.com/TimothyStiles/poly/seqhash"
	"github.com/urfave/cli/v2"
)
var errIllegalInputFlag error = errors.New("the '-i' flag can only be used with pipes")