Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 6 revisions

Biopiece: write_sam

Description

write_sam writes sequence from the data stream in SAM format if the stream contains the following keys:

  • Q_ID
  • S_ID
  • S_BEG
  • MAPQ
  • CIGAR
  • SEQ

possibly including these optional keys:

  • Q_ID2
  • S_BEG2
  • TLEN
  • SCORES
  • NM
  • MD

write_sam is provisional only - no header section is output.

For more about the SAM format:

http://samtools.sourceforge.net/SAM1.pdf

Usage

... | write_sam [options]

Options

[-?          | --help]               #  Print full usage description.
[-x          | --no_stream]          #  Do not emit records.
[-o <file>   | --data_out=<file>]    #  Write result to file.
[-I <file!>  | --stream_in=<file!>]  #  Read input from stream file  -  Default=STDIN
[-O <file>   | --stream_out=<file>]  #  Write output to stream file  -  Default=STDOUT
[-Z          | --compress]           #  Compress output using gzip.
[-v          | --verbose]            #  Verbose output.

Examples

Writing entries to file 'test.sam'.

... | write_sam -o test.sam -x

Write zipped entries to file 'test.sam.gz'.

... | write_sam -Z -o test.sam.gz -x

See also

read_sam

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

mail@maasha.dk

February 2013

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

write_sam is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally