bam2fastq
Format
cg bam2fastq ?options? bamfile fastqfile1 ?fastqfile2?
Summary
Extracts reads from a bamfile into fastq. The actual extraction is
based on picard's SamToFastq or samtools bam2fq, but the data is
prepared first (ao. sorted by name to avoid the problems caused by
position sorted fq files)
Arguments
- bamfile
- bamfile
- fastqfile1
- name of the fastq file that will contain the first read of
each pair. If it has an extension .gz, the fastqs will be
compressed
- fastqfile2
- name of the fastq file that will contain the matching second
read of each pair
Options
- -m biobambam/picard/sam (--method)
- which method is used underneath (default = sam)
- -namesort 0/1
- sort (based on name) before converting; this should be done
to avoid biases during (re)alignment because of position based sort
(default = 1). Set to 0 if the source bamfile is already
namesorted.
- -sortmethod biobambam/samtools/collate
- method used to (name)sort the bam file. Default is collate,
which is the fastest (by not doing full name sorting, but it is
sufficient for this purpose). collate as sortmethod can only be
used with th sam bam2fastq method
- -single file (-s)
- file to write single reads
- -unmatched file (-u)
- file to write unmatched first reads from pair
- -unmatched2 file (-u2)
- file to write unmatched second reads from pair
Category
Format Conversion