virus-evolution / gofasta

MIT License
34 stars 1 forks source link

What are the flags for sam toMultiAlign #5

Closed josephhughes closed 3 years ago

josephhughes commented 3 years ago

I've tried using the Mac binary with the -o flag for outputting fast but get: unknown shorthand flag: 'o' in -o

benjamincjackson commented 3 years ago

Hi Joseph, I've tried to include useful help messages in the functions as of v0.0.3, e.g.:

❯ gofasta sam toMultiAlign -h
Convert a SAM file to a multiple alignment in fasta format

Insertions relative to the reference are omitted, so all sequences
in the output are the same ( = reference) length.

Example usage:
    gofasta sam toMultiAlign -s aligned.sam -o aligned.fasta

If you want, you can trim (and optionally pad) the output alignment to coordinates of your choosing:
    gofasta sam toMultiAlign -s aligned.sam --trim --trimstart 250 --trimend 29000 --pad -o aligned.fasta

If input and output files are not specified, the behaviour is to read the sam file from stdin and write
the fasta file to stdout, e.g.:
    minimap2 -a -x asm5 reference.fasta unaligned.fasta | gofasta sam toMultiAlign > aligned.fasta

Usage:
  gofasta sam toMultiAlign [flags]

Flags:
  -o, --fasta-out string   Where to write the alignment (default "stdout")
      --trim               Trim the alignment
      --pad                If trim, replace the trimmed regions with Ns
      --trimstart int      Start coordinate for trimming (default -1)
      --trimend int        End coordinate for trimming (default -1)
  -h, --help               help for toMultiAlign

Global Flags:
  -r, --reference string   Reference fasta file used to generate the sam file
  -s, --samfile string     samfile to read. If none is specified, will read from stdin
  -t, --threads int        Number of threads to use (default 1)