参考

1. 介绍

软件 TopHat 的小工具

  • -A/--all: convert all reads (mapped and unmapped) (but discarding those flagged as QC failed, unless -Q)
  • -P: paired reads are expected and converted into two output files (see comments below)
  • -Q: convert unmapped reads even when flagged as QC failed
  • -M/--maped-only: convert only mapped reads
  • -N: for -P, append /1 and /2 suffixes to read names
  • -O: ignore the original quality values (OQ tag) and write the current quality values (default is to use OQ data if found)
  • -C/--color: reads are in ABI SOLiD color format
  • -s/-t/--sam: input is a SAM text file (default: BAM input expected)
  • -a/--fasta: output FASTA records, not FASTQ (discard quality values)
  • -o: output file name or template (see below)
  1. $ bam2fastx
  2. bam2fastx v2.1.1 (ecf7617) usage:
  3. bam2fastx [--fasta|-a] [-C|--color] [-P|--paired] [-N]
  4. [-A|--all|-M|--mapped-only] [-Q] [--sam|-s|-t] [-o <outfname>] <in.bam>
  5. By default, bam2fastx only converts the unmapped reads from the input file,
  6. discarding those unmapped reads flagged as QC failed.
  7. The input BAM/SAM file MUST be sorted by read name (-n option for samtools
  8. sort). If the input file name is "-", stdin will be used instead.
  9. <outfname> serves as a name template when -P option is provided, as suffixes
  10. .1 and .2 will be automatically inserted before the file extension in
  11. <outfname>, such that two file names will be created.
  12. If <outfname> ends in .gz or .bz2 then bam2fastx will write the
  13. output compressed by gzip or bzip2 respectively.
  14. Example of converting all paired reads from a BAM file to FASTQ format:
  15. bam2fastx -PANQ -o sample.fq.gz sample.sortedbyname.bam
  16. In this example the output will be written in two files:
  17. sample.1.fq.gz and sample.2.fq.gz